Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Rating of Singers | SQL Tasks
Data Manipulation using SQL

book
Challenge: Rating of Singers

Tâche

Swipe to start coding

Create a rating of the singers: from singer with the biggest average Song's price to the smallest one. Output the singer's name (naming) and avearge price (price) of his/her songs.

Solution

SELECT singers.naming, AVG(songs.price)
FROM singers
INNER JOIN songs
ON songs.singer_id = singers.id
GROUP BY singers.id
ORDER BY AVG(songs.price) DESC

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 3
SELECT _ _ _
Query ResultQuery Result
No query executed yet...

Demandez à l'IA

expand
ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

some-alt