I want to do a request to my table where I select the rows where I found one times the customer id
My table structure looks like this:
id , date_commande, id_customer
I don’t want to return the lines if I found customer id twice or more
example of data:
id | date_commande | id_customer
--------------------------------
01 | 2011-12-01 | 10
02 | 2011-12-01 | 11
03 | 2011-12-02 | 14
04 | 2011-12-03 | 10
I want just return the line
id | date_commande | id_customer
--------------------------------
02 | 2011-12-01 | 11
03 | 2011-12-02 | 14
This is a slightly improved version of the query that @Florin suggested..