Created
May 5, 2010 20:04
-
-
Save oleander/391350 to your computer and use it in GitHub Desktop.
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 gigs.id, gigs.channel_id | |
FROM | |
`gigs` | |
JOIN( | |
SELECT gigs.id,COUNT(gigs.channel_id) as theCount | |
FROM `gigs` | |
LEFT OUTER JOIN `songs` ON `songs`.`id` = `gigs`.`song_id` | |
HAVING theCount < 5 | |
ORDER BY gigs.channel_id ) | |
AS dt USING (gigs.channel_id); | |
The following errors were reported:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.channel_id)' at line 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment