@_dt.sql_func_last_day_in_period.register
def sql_func_last_day_in_period(codata: SnowflakeColumn, col, period):
    return ((_dt.date_trunc(codata, col, period) + sql.text(("interval '1 %s'" % period))) - sql.text("interval '1 day'"))
@_dt.sql_func_last_day_in_period.register
def sql_func_last_day_in_period(codata: SnowflakeColumn, col, period):
    return ((_dt.date_trunc(codata, col, period) + sql.text(("interval '1 %s'" % period))) - sql.text("interval '1 day'"))