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.
Este ejercicio forma parte del curso
Applying SQL to Real-World Problems
Instrucciones del ejercicio
- Return the
first_name
,last_name
andamount
. INNER JOIN
the tables you need for this query:payment
andcustomer
using thecustomer_id
for the join.- Ensure only
active
customers are returned. - Sort the results in
DESC
ending order by the amount paid.
Ejercicio interactivo práctico
Prueba este ejercicio completando el código de muestra.
SELECT ___,
___,
___
FROM ___ AS p
INNER JOIN ___ AS c
ON p.___ = c.___
WHERE ___
ORDER BY ___ ___;