How can I use the DISTINCT clause with WHERE? For example:
SELECT * FROM table WHERE DISTINCT email; -- email is a column name
I want to select all columns from a table with distinct email addresses.
If you mean all columns whose email is unique:
SELECT * FROM table WHERE email in
(SELECT email FROM table GROUP BY email HAVING COUNT(email)=1);