SQL practice: Views

Chapter 30 · 8 questions · included in full access

  1. Question 1 · easy

    Create a view customer_summary with customer_name, total_orders, total_spent.

    Solve it in your browser
  2. Question 2 · easy

    Query it for customers who spent over 50000.

    Solve it in your browser
  3. Question 3 · medium

    Query it for customers who have never ordered.

    Solve it in your browser
  4. Question 4 · medium

    Create a view product_performance with product name, units sold and revenue.

    Solve it in your browser
  5. Question 5 · medium

    Use that view to find the top 5 products by revenue.

    Solve it in your browser
  6. Question 6 · medium

    Create a view showing employees without their salary column.

    Solve it in your browser
  7. Question 7 · hard

    Drop the view from 30-6. (Look up DROP VIEW.)

    Solve it in your browser
  8. Question 8 · hard

    Explain why customer_summary needs LEFT JOIN rather than JOIN.

    Solve it in your browser

These questions are part of full access.

The first chapters of every track are free. Full access is a one-time payment.

See pricing