Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
select date_trunc('week', dates)::date as start_week, (date_trunc('week', dates) + '6 days') ::date as end_week from generate_series('2023-01-01', '2023-12-31', interval '1 day') as dates group by start_week, end_week order by start_week;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear