List all the song names by the resolution in ascending order.
select song_name from song order by resolution desc
How many songs have resolution higher than 900?
select count(song_name) from song where resolution > 900
What about lower than 800?
select count(song_name) from song where resolution < 800
Among those results, how may have mp3 format?
select count(*) from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = "mp3" and t2.resolution < 800
What is the average duration of those songs?
select avg(t1.duration) from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = "mp3" and t2.resolution < 800