oracle中group by按月分组统计selecta.name"姓名",to_ 资源ID: select a.name "姓名", to_char(a.access_time, 'YYYY-MM') "月份", COUNT(a.name) "访问次数", sum((a.out_time - a.in_time) * 60 * 24) "总时间(分钟)" from test a GROUP BY A.NAME, to_char(a.access_time, 'YYYY-MM') ← 上一篇: 下一篇: →