Last active
October 31, 2015 11:57
-
-
Save stamaniorec/5461c59a33a326e24586 to your computer and use it in GitHub Desktop.
#sql #mosko
This file contains hidden or 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 | |
| COUNT(*) | |
| FROM | |
| ( | |
| SELECT | |
| clubs.club_name, kids.name | |
| FROM | |
| clubs | |
| INNER JOIN | |
| kids_and_clubs | |
| ON clubs.id = kids_and_clubs.club_id | |
| INNER JOIN | |
| kids | |
| ON kids_and_clubs.kid_id = kids.id | |
| ORDER BY | |
| clubs.club_name | |
| ) AS derived | |
| WHERE | |
| derived.club_name = "History club"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment