IniziaInizia gratis

Practice the essentials

In this exercise you are preparing list of your top paying active customers. The data you will need are the names of the customer sorted by the amount they paid.

Questo esercizio fa parte del corso

Applying SQL to Real-World Problems

Visualizza il corso

Istruzioni dell'esercizio

  • Return the first_name, last_name and amount.
  • INNER JOIN the tables you need for this query: payment and customer using the customer_id for the join.
  • Ensure only active customers are returned.
  • Sort the results in DESCending order by the amount paid.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

SELECT ___,
	   ___,
       ___
FROM ___ AS p
INNER JOIN ___ AS c
  ON p.___ = c.___
WHERE ___
ORDER BY ___ ___;
Modifica ed esegui il codice