MySQL SELECT DISTINCT multiple columns

I know that the question is too old, anyway:

SELECT a, b
FROM mytable
GROUP BY a, b;

This will give your all the combinations.

Leave a Comment