Du vil have vinduesfunktioner:
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;
Du vil have vinduesfunktioner:
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;