Skip to content

Instantly share code, notes, and snippets.

@bubbafat
Created July 3, 2013 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bubbafat/5915372 to your computer and use it in GitHub Desktop.
Save bubbafat/5915372 to your computer and use it in GitHub Desktop.
How do I do this with active record find method?
select count(*) as Count,
((elapsed / 1000) * 1000) + 1000 as LessThanSecond
from speedies
where elapsed is not null
group by ((elapsed / 1000) * 1000) + 1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment