1 --Group_ID:用于消除Group By子句中的返回的重复记录,Group by子句不接受任何参数2 --如果某个特定的分组重复n次,那么GROUP_ID返回0—n-1之间的一个整数3 --下面是实例:4 select a.division_id, a.job_id, avg(a.salary), group_id()5 from employees2 a6 group by a.division_id, rollup(a.division_id, a.job_id)7 having group_id() = 0 /*用于消除重复*/8 order by a.division_id, a.job_id9