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
with recursive month_dates(date) AS ( select '2005-07-01' union all select date_add(date, interval 1 day) from month_dates where date < '2005-07-31' ) select count(*) weekend_days from month_dates where dayofweek(date) IN (7, 1);

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

Copy Clear