🗄️

SQL Professional

Capstone: write an analytics query graded by the Academy AI.

1 lessons 🛠 Project-based
Lessons Project Certificate

📚 Lessons

1 Brief & rubric

This level is project-based. Write the SQL described below in the editor. The Academy AI grades accuracy, cleanliness and performance — reach 70% to earn the certificate.

Schema: users(id, name, country) and orders(id, user_id, total, created_at).

🛠 Capstone Project

Top customers by revenue, last 30 days

Write one SQL query that returns each customer's name and total revenue for orders in the last 30 days, for customers who spent more than 500, ordered by revenue (highest first), limited to the top 10.

Requirements

  • SELECT explicit columns (no SELECT *)
  • JOIN orders to users with an ON condition
  • Aggregate revenue with SUM()
  • GROUP BY the customer
  • Filter groups with HAVING SUM(...) > 500
  • ORDER BY revenue DESC and LIMIT 10

When you submit, the Academy AI evaluates your code on accuracy (50%), code cleanliness (25%) and performance (25%). Score 70%+ to earn your certificate.

SQL · your solution

            

🎓 Certificate of Completion

🔒 Pass the project evaluation above (70%+) to unlock your downloadable certificate.