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