![]() ![]() ![]() MS SQL Server, speed demon though it is, lacks nice functions for this. Whether your period is an hour, day, week, or month, Postgres nerds do it with date_trunc: select date_trunc('week', created_at), count(1) from. The bread and butter of SQL analysis is grouping by a period of time and then counting the rows for each period.
0 Comments
Leave a Reply. |