琢磨着怎么去取当前年的第一天,用于过滤数据,就写下来了(PS:也不知道有没有已存在的函数用,懒得去搜了)。
SELECT VARCHAR_FORMAT(current timestamp - (MONTH (current timestamp) -1 )months-(DAY (current timestamp) -1 )days,'yyyy-mm-dd')
FROM sysibm.sysdummy1