摘要:
1.按年份分组 select to_char(exportDate,‘yyyy’),sum(amount) from table1 group by to_char(exportDate,‘yyyy’); 年份 数量 ----------------------------- 2009 68 2010 137 2008 103 2.按月份分组 select to_char(exportDate,‘yyyy-mm’),sum(amount) from table1 group by to_char(exportDate,‘yyyy-mm’) order by to_char(e... 阅读全文