logo Data Mastery SQL Course
  • Basic
  • Joins and Subqueries
  • Aggregates

Aggregation Begin!

Aggregation is one of those capabilities that really make you appreciate the power of relational database systems. This category covers aggregation at length, making use of standard grouping as well as more recent window functions.

  1. Count the number of facilities
  2. Count the number of expensive facilities
  3. Count the number of recommendations each member makes.
  4. List the total slots booked per facility
  5. List the total slots booked per facility in a given month
  6. List the total slots booked per facility per month
  7. Find the count of members who have made at least one booking
  8. List facilities with more than 1000 slots booked
  9. Find the total revenue of each facility
  10. Find facilities with a total revenue less than 1000
  11. Output the facility id that has the highest number of slots booked
  12. List the total slots booked per facility per month, part 2
  13. List the total hours booked per named facility
  14. List each member's first booking after September 1st 2012
  15. Produce a list of member names, with each row containing the total member count
  16. Produce a numbered list of members
  17. Output the facility id that has the highest number of slots booked, again
  18. Rank members by (rounded) hours used
  19. Find the top three revenue generating facilities
  20. Classify facilities by value
  21. Calculate the payback time for each facility
  22. Calculate a rolling average of total revenue
Site content licensed under CC BY-SA 3.0, based on PGExercises by Alisdair Owens