This is my first post and sorry if this is not the correct place to post. I’m attempting to write a more dremio friendly version of the statement below. Essentially using current date to get x months returned based on current date. I have failed to write a version that runs correctly in dremio. Any help you can provide will be greatly appreciated.
to_date([date field]) >= add_months(trunc(current_date(), ‘MM’),-1) and to_date([date field]) < add_months(trunc(current_date(), ‘MM’),0)