Challenge: Rating of Singers
Завдання
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.
Рішення
9
1
2
3
4
5
6
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
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 3
9
1
SELECT _ _ _
No query executed yet... |
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат