Dates, Timestamps and Intervals:
*
Count the number of records per week
SELECT date_trunc(‘week’, <>) AS “Week” , count(*)
FROM <>
GROUP BY 1
ORDER BY 1;