DB Fiddle

SQL: Top Customers and Key Accounts with GROUP BY and HAVING

A beginner SQL walkthrough in the free DB Fiddle: total revenue per customer with GROUP BY, sort the biggest to the top, keep the top three with LIMIT and list key accounts with HAVING.

  • Free
  • No sign-up
  • 14 steps
  • ~12 min
Start the free practiceStart practicingDo every step yourself in a practice copyHands-on, ~12 min, best on a computer