hi friends,
i want to get the sum of quantity from the below query. how i write the group by clause in below mention query.
select top 1
EvrId,
TimeStamp,
Date,
BnhTnkMik1 as Quantity,
(select TnkCode from Tanklar where TnkId=BnhTnkId) as Tank,
FuelCode,
InvoiceNo from Evrak
join Hareket on (BnhEvrId=EvrId)
join Stoklar on (StokId=BnhStok)
where EvrTip=14 and EvrStatu='A'