Искате функции на прозореца:
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;
Искате функции на прозореца:
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;