문제
Spotify 랭킹 리스트에서 각 아티스트가 몇 번 등장했는지 찾아주세요.
아티스트 이름과 해당하는 등장 횟수를 함께 출력해주세요.
기록은 등장 횟수가 많은 순으로 정렬해주세요.
테이블설명
예상결과
✏️ 풀이
SELECT artist, COUNT(*) AS n_occurences
FROM spotify_worldwide_daily_song_ranking
GROUP BY artist
ORDER BY n_occurences DESC;
'[코딩테스트] > [SQL]' 카테고리의 다른 글
[StrataScratch - SQL] (Easy) Number of Shipments Per Month (0) | 2025.04.21 |
---|---|
[StrataScratch - SQL] (Easy) Captain Base Pay (0) | 2025.04.19 |
[StrataScratch - SQL] (Easy) Lyft Driver Wages (0) | 2025.04.18 |
[StrataScratch - SQL] (Easy) Popularity of Hack (0) | 2025.04.18 |
[StrataScratch - SQL] (Easy) Find all posts which were reacted to with a heart (0) | 2025.04.17 |