Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. SELECT CategoryID, AVG(Price)
  2. FROM Products
  3. WHERE CategoryID="3"
  4. GROUP BY CategoryID
  5.  
  6. CategoryID AVG(Price)
  7. 3 25.16
  8.  
  9. SELECT CategoryID, AVG(Price)
  10. FROM Products
  11. WHERE Price > 30
  12. GROUP BY CategoryID;
  13.  
  14. CategoryID AVG(Price)
  15. 1 154.75
  16. 2 41.95
  17. 3 51.3575
  18. 4 38.300000000000004
  19. 5 35.625
  20. 6 73.14750000000001
  21. 7 49.3
  22. 8 46.75
  23.  
  24. SELECT CategoryID, AVG(Price)
  25. FROM Products
  26. WHERE CategoryID="3"
  27. GROUP BY CategoryID
  28. having AVG(Price)>x
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement