摘要:
SELECT CASE WHEN (new_yweek = MIN(new_yweek)OVER(PARTITION BY mon ORDER BY new_yweek)) THEN mon_name ELSE NULL END AS month,new_yweek AS yweek,ROW_NUMBER() over(PARTITION BY mon ORDER BY new_yweek) AS mweek,SUM(DECODE(wday, '1', mday, NULL)) AS sun,SUM(DECODE(wday, '2', mday, NULL)) 阅读全文