Here is the performance stats of the solution by dozauk for TSQL Challenge18.
--Simon_Mendoza_TSQLChallenge_18.sql
-- Standard 'Numbers Table' CTE
WITH N3( n ) AS ( SELECT 1 UNION SELECT 0 )
, N2( n ) AS ( SELECT 1 FROM N3 n1 CROSS JOIN N3 n2 )
, N1( n ) AS ( SELECT 1 FROM N2 n1 CROSS JOIN N2 n2 )
, N0( n ) AS ( SELECT 1 FROM N1 n1 CROSS JOIN N1 n2 )
, Num AS ( SELECT n = ROW_NUMBER() OVER (ORDER BY n) FROM N0 )
-- Get first day of month and a unique ID for each requested month
, Months AS (SELECT Mth
, Yr