Created
February 3, 2017 14:21
-
-
Save mmmayo13/e0e719794b0b9cc59eb9c9616c84e87c 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
# births per year | |
q = """ | |
SELECT | |
strftime("%Y", date) | |
, SUM(births) | |
FROM births | |
GROUP BY 1 | |
ORDER BY 1; | |
""" | |
print sqldf(q, locals()) | |
# strftime("%Y", date) SUM(births) | |
# 0 1975 3136965 | |
# 1 1976 6304156 | |
# 2 1979 3333279 | |
# 3 1982 3612258 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment