Created
April 28, 2017 14:58
-
-
Save hectorperez/8a933aeb4abffa5fae018d0f9935a0dd to your computer and use it in GitHub Desktop.
mysql subquery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM some_table | |
WHERE relevant_field IN | |
( | |
SELECT * FROM | |
( | |
SELECT relevant_field | |
FROM some_table | |
GROUP BY relevant_field | |
) AS subquery | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment