两个时间之间的相差天数
date_part('day',cast(now() as TIMESTAMP)-cast('2022-01-01 00:00:00' as TIMESTAMP))
当前季度的初始月
date_trunc('quarter',current_date)
当前月的前一个月的最后一天
date_trunc('month', now()) - interval '1 day'
本周的星期一
current_date +cast(-1*(to_number(to_char(current_date ,'D'),'99')-2) ||' days' as interval)
今天是星期几
extract(dow from current_date)