select song_id,sum(points_100) as points,avg(avg_100) as rank,sum(played_100) as stations
from rankings_aggregated as rankings use index (ra_created_artist_id_song_id) where created>=20150331 and created<=20150331 and artist_id=10639 group by song_id order by points desc limit 20