Reputation: 63
could you please guide.
I have following input table.
I tried below query.
select distinct sum(amount) over partition by date from table1;
Here in the table date is type string and amount is of type double.
Upvotes: 0
Views: 318
Reputation: 42422
You can add a where
to remove the rows with blank dates, before doing a group by and sum:
select date, sum(amount)
from table1
where date != ''
group by date
Upvotes: 1