Need to add gross and net quantities by load number (ie load). Cannot get it to work, still shows multiple row with same load number.
select "load",
date,
branded,
name,
sum(cast(gross as decimal(15,2))),
sum(cast(net as decimal(15,2)))
from [SFM-TP6000-1].TP6000.dbo.loadcomp as load1
inner join [SFM-TP6000-1].TP6000.dbo.product as prod1 on prod1.product = load1.branded
where load1.branded = 'ULS'
group by "load", date, branded, name
select "load",
date,
branded,
name,
sum(cast(gross as decimal(15,2))),
sum(cast(net as decimal(15,2)))
from [SFM-TP6000-1].TP6000.dbo.loadcomp as load1
inner join [SFM-TP6000-1].TP6000.dbo.product as prod1 on prod1.product = load1.branded
where load1.branded = 'ULS'
group by "load", date, branded, name