My order table looks like this:
id fk_customer
1 34
2 34
3 34
4 7
5 7
6 8
I would like to select only those customers who have more than two orders.
However, this does not work:
SELECT * FROM order WHERE COUNT DISTINCT fk_customer > 2
Please advice!
thank
source
share