sum不能对date类型字段求和。
一般使用如下:
select sum(your_number_field) from your_table where to_char(start_time,'yyyymmdd')>=20030101 and to_char(end_time,'yyyymmdd')<=20030612;
一般使用如下:
select sum(your_number_field) from your_table where to_char(start_time,'yyyymmdd')>=20030101 and to_char(end_time,'yyyymmdd')<=20030612;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货