mysql – Select distinct pairs

mysql does not support multiple columns for select distinct(), so this works with a table I have that has width and height columns:

SELECT width,height
FROM orders
GROUP BY CONCAT(width, height)

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.