请指导一下。
我有以下输入表。
我尝试了以下查询。
select distinct sum(amount) over partition by date from table1;
这里表中的日期是字符串类型,金额是双精度类型。
在进行分组和求和之前,您可以添加 where 以删除具有空白日期的行:
where
select date,sum(amount) from table1 where date != '' group by date