Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Do This Average
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01325143
Message ID:
01325147
Views:
12
>In a report I have an average field called AveQuan, which averages this expression:
>
>
>ProdsHis.PHUnits + ProdsHis.SMUnits - ProdsHis.LMUnits
>
>
>The expression is reset when ProdCode changes. Is it possible to code this somehow in a query?
SELECT ProdCode, AVG(PHUnits + SMUnits - LMUnits) AS AveQuan
FROM ProdsHis
GROUP BY ProdCode
not tested
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform