Flagging a Snippet, takes the snippet to Moderator Attention;
The first day of the current month can be computed as,
SELECT ADD_MONTHS(input_date - EXTRACT(DAY FROM input_date)+1, 0)
How it works ?
First we extract the day from the date and subtracting from the date itself. So that we are getting the last date of the last month.
input_date - EXTRACT(DAY FROM input_date) ---> last month's end date.
After that we add '1' to that, so the first date of the present month will be the result.
Please note that whenever we compute the first and last date(s) of a month, it is better to proceed from the start date of the month. (Because, the last date will vary for months i.e. Feb-28, Oct- 31, Nov - 30)
Now we have got the start date of the current month and we are using ADD_MONTHS just to get the date output in proper format.
Example: Consider, date_1 table is having data like below
ADD_MONTHS(input_date - EXTRACT(DAY FROM input_date)+1, 0) AS current_start