Created
January 30, 2012 17:47
-
-
Save maxjustus/1705643 to your computer and use it in GitHub Desktop.
group by partial date with postgres
This file contains hidden or 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
select date_trunc('day', created_at), sum(value) from channel_stats group by date_trunc('day', created_at); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment