Morpheus7
asked on
Groupings And Percentages
Hi,
I have a table containing the following columns:
ProdGroup, ProductID, PercentFat, PercentProt.
I would like to be able to get the average PercentFat and PercentProt per ProdGroup.
The fields are all of type INT. There are multiple ProductIDs within each ProdGroup.
So to be able to return one row for each ProdGroup, together with the average percentage PercentFat and PercentProt
Any assistance would be appreciated
Thanks
I have a table containing the following columns:
ProdGroup, ProductID, PercentFat, PercentProt.
I would like to be able to get the average PercentFat and PercentProt per ProdGroup.
The fields are all of type INT. There are multiple ProductIDs within each ProdGroup.
So to be able to return one row for each ProdGroup, together with the average percentage PercentFat and PercentProt
Any assistance would be appreciated
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes. - Make sure you do the CAST or CONVERT inside the AVG, i.e. AVG(CAST instead of CAST(AVG(
ASKER
Many thanks
ASKER
Thanks