0

Hi I've been working on this query, and I can't quite figure out the where statement to show only the average price of products < 3

"List each Product Class, number of items in the class and the average Price (name this Avg_Price, Format $0.00) of the items in the class. List only those classes that have less than three (3) items"

This query shows me the results of the average prices of the products (results in image) COLUMN Avg_Price FORMAT $999,999.00 SELECT Product_Class, COUNT(*), AVG(Price) AS Avg_Price FROM Product GROUP BY Product_Class;

enter image description here

I need help only showing the counts avg PRICE that is < 3

Juan Carlos Oropeza
  • 47,252
  • 12
  • 78
  • 118

1 Answers1

1

Include Having at the end

  HAVING count(*) > 3
Juan Carlos Oropeza
  • 47,252
  • 12
  • 78
  • 118