Skip to content

Instantly share code, notes, and snippets.

@bds
Created February 12, 2012 01:01
Show Gist options
  • Save bds/1805529 to your computer and use it in GitHub Desktop.
Save bds/1805529 to your computer and use it in GitHub Desktop.
Rails + Postgres Time Series Model Counts
Model.order("DATE(created_at)").group("DATE(created_at)").count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment