How many songs have resolution higher than 1000?
select count(song_name) from song where resolution > 1000
What about higher than 720?
select count(song_name) from song where resolution > 720
Among those results, how may have mp4 format?
select count(*) from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = "mp4" and t2.resolution > 720
List the ids of these songs.
select f_id from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = "mp4" and t2.resolution > 720
What about the ids of the songs that in mp4 format or resolution above 720?
select f_id from files where formats = "mp4" union select f_id from song where resolution > 720