Leecode - 2298. Tasks Count in the Weekend
Problem
Solution
SELECT COUNT(weekend) AS weekend_cnt, COUNT(working) AS working_cnt
FROM (
SELECT CASE WHEN WEEKDAY(submit_date) > 4 THEN 'weekend' END as weekend,
CASE WHEN WEEKDAY(submit_date) < 5 THEN 'working' END as working
FROM Tasks
) AS Temp