first and last day of the month
Here is a quick way to find the first and last day of the month :
with temp1 (first_day_of_month,last_day_of_month)
as
(values ((current date – day(current date + 1 month) days) + 1 DAY,
 (current date + 1 month) – day(current date +1 month) days)
)
select * from temp1;