Oracle分組查詢3——grouping sets

多個單列查詢彙總 eg. 按入職日期、部門、職務 分別彙總工資和 select to_char(b.hiredate) as 上班日期,a.dname as 部門,b.job as 職務,sum(b.sal) sum_sal from dept a, emp b where a.deptno=b.deptno group by grouping sets(  to_char(b.hiredate)
相關文章
相關標籤/搜索