エラーが発生する理由がわかりません: ncorrect syntax near 'desc'. 最後の行が問題かそのあたりだと言っています...
select e.DealID,
e.TestID,
e.Quantity,
case
Description
when 'Active' then 'Positive' else e.Description
end as Description,
(SUM(e.Price * e.SalePrice) / NULLIF(SUM(e.SalePrice), 0)) as Price
from Product e
WHERE ArchiveID = @ArchiveID
group by e.TestID,
Description,
e.Quantity
order by e.TestID,
Description