SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
with recursive t1 as ( select date('2005-07-01') as date union all select date + interval 1 day from t1 where t1.date < '2005-07-31' and dayofweek in (1,7) ) select * from t1 -- select -- sum(case when dayofweek(t1.date) in (1, 7) then 1 else 0 end) as weekend_days -- from t1

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear