摘要: 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... 阅读全文
posted @ 2013-05-07 09:53 微硬 阅读(1869) 评论(0) 推荐(0) 编辑