I need to create a query in SQL to get some invoices depending on the current date. I'm an intern in the company, so I only need to create the logic, not necessarily the query. Can anyone help me to translate this conditions into SQL (Snowflake)?
- If Current Date (today's date) is between day 14 and 27 of the month >>> Get invoices from day 14 of the current month
- If Current Date (today's date) is between day 28 and 31 of the month >>> Get invoices from day 28 of the current month
- If Current Date (today's date) is between day 1 and 13 of the month >>> Get invoices from day 28 of the last month
Thanks in advance!
