select month, ranking, song_name, play_pv from ( select *, row_number() over (partition by month order by play_pv desc,song_id asc) ranking from ( select month(p.fdate) as month, s.song_name, s.song_id, count(p.song_id) as play_pv from play_log p left join user_info u on p.user_id = u.user_id left j...