welshspoon
Technical User
hi
i need to find records with an average price greater than $10. I've managed to get the average price for each group and print it to screen but I cannot work out how to display only those records with an average greater than 10.
SELECT stor_id, CAST(AVG(Price)
AS numeric(12,2)) AS avg_price
FROM Stocks
GROUP BY stor_id
Thanx in advance
i need to find records with an average price greater than $10. I've managed to get the average price for each group and print it to screen but I cannot work out how to display only those records with an average greater than 10.
SELECT stor_id, CAST(AVG(Price)
AS numeric(12,2)) AS avg_price
FROM Stocks
GROUP BY stor_id
Thanx in advance