判断某日期是否是月初或者月末
用EXTRACT 函数
SELECT CASE WHEN EXTRACT(DAY FROM your_date) = 1 THEN '月初'
WHEN EXTRACT(DAY FROM your_date) = EXTRACT(DAY FROM LAST_DAY(your_date)) THEN '月末' ELSE '非月初或月末' END AS date_part;
FROM TAB01