postgresql Count the number of records per week


Example

SELECT date_trunc('week', <>) AS "Week" , count(*) FROM <> GROUP BY 1 ORDER BY 1;