How do you count the number of rows returned by the following statement:
WITH TEMP1 (D) AS
(VALUES DATE('01/01/2004') UNION ALL SELECT (D + 1 DAY) FROM TEMP1 WHERE (D + 1 DAY) < DATE('01/02/2004'))
(SELECT D,DAYOFWEEK(D) FROM TEMP1)
WITH TEMP1 (D) AS
(VALUES DATE('01/01/2004') UNION ALL SELECT (D + 1 DAY) FROM TEMP1 WHERE (D + 1 DAY) < DATE('01/02/2009'))
(SELECT COUNT(*) FROM TEMP1 WHERE DAYOFWEEK(D) IN (2,3,4,5,6))
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.