请你带路好吗。我有下面的输入表。我试过了。
select distinct sum(amount) over partition by date from table1;
表中的日期是string类型,金额是double类型。
xriantvc1#
您可以添加 where 在执行分组方式和求和之前,要删除日期为空的行,请执行以下操作:
where
select date, sum(amount)from table1where date != ''group by date
select date, sum(amount)
from table1
where date != ''
group by date
1条答案
按热度按时间xriantvc1#
您可以添加
where
在执行分组方式和求和之前,要删除日期为空的行,请执行以下操作: