Created
June 18, 2013 02:40
-
-
Save andmcgregor/5802272 to your computer and use it in GitHub Desktop.
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
DELETE FROM voters | |
WHERE homeowner = 1 | |
AND employed = 1 | |
AND children_count = 0 | |
AND party_duration < 3 | |
AND (SELECT voters.id | |
FROM voters | |
INNER JOIN votes | |
ON voters.id = votes.voter_id | |
INNER JOIN congress_members | |
ON votes.politician_id = congress_members.id | |
GROUP BY votes.politician_id | |
HAVING congress_members.grade_current > 12) >= 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment