In Microsoft Access, Northwind database, I have to show min and max of avg UnitPrice in different product categories using GROUP BY and HAVING. Here's what I tried:
SELECT MAX(SELECT AVG(UnitPrice) FROM Products) AS MaxSV, MIN(SELECT AVG(UnitPrice) FROM Products) AS
MinSV FROM Products GROUP BY CategoryID, UnitPrice HAVING DISTINCT CategoryID;
Second thing I have to do is show average of max UnitPrice by CategoryID, also using GROUP BY and HAVING.