Challenge Having
Tâche
Swipe to start coding
Let's find the total value of each album with more than 1 song. To do that, you should group songs by their albums and count the total price of songs. Display the album
, the number of songs in it, and the price of the album, starting with the most expensive.
Solution
9
1
2
3
4
5
select album, count(id), sum(price)
from songs
group by album
having count(id)>1
order by sum(price) desc
Tout était clair ?
Merci pour vos commentaires !
Section 3. Chapitre 12
single
9
1
No query executed yet... |
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion