Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

average problem 1

Status
Not open for further replies.

welshspoon

Technical User
Dec 14, 2002
34
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top