Same as on StackOverflow :-)
This will return the start of the next month unless it's the first of the month:
Add one month to the day before the min date (i.e. only the 1st will result in the previous month), then get the 1st of that month.
Depending on your actual query you might filter using
qualify datecol >= trunc(add_months(min(datecol) over (partition by ??)-1,1), 'mon')