U wilt vensterfuncties:
select s.*,
(case when annual_unqiue_count <> 0
then sum(sales_volume) over (partition by customerId)
else 0
end) as sales_volume
from sales s;
U wilt vensterfuncties:
select s.*,
(case when annual_unqiue_count <> 0
then sum(sales_volume) over (partition by customerId)
else 0
end) as sales_volume
from sales s;