我有这样一个表, date unit num 2009-1-1 单位1 32 2009-1-1 单位2 22 2009-1-2 单位1 43 2009-1-2 单位2 65 2009-2-1 单位1 23 2009-2-1 单位2 34 其中date 列为一月数据,二月数据,直到当前月,我想通过一条sql语句,汇总出每一月的数据放入dataset怎么做,谢谢!
from tt
group by to_char(date,'yyyy-mm')
group by to_char(date,'yyyymm'),unit