Created
March 25, 2010 12:31
-
-
Save mperham/343496 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
# Don't query each rubygem version separately | |
rows = AR::Base.connection.select_rows "select count(*), version_id, date(created_at) from downloads group by version_id, date(created_at)" | |
rows.each do |(count, version_id, date)| | |
# do stuff | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment