SELECT ProductID, SUM(Quantity) AS TotalUnits
FROM OrderDetails
GROUP BY ProductID
HAVING SUM(Quantity) < 200;

SELECT SupplierID, AVG(UnitPrice) AS AveragePrice
FROM Products
GROUP BY SupplierID
HAVING AVG(UnitPrice) > 30
ORDER BY AveragePrice;

SELECT CustomerID, COUNT(OrderID) AS NumOrders
FROM Orders
GROUP BY CustomerID
HAVING COUNT(OrderID) > 15
ORDER BY NumOrders DESC;