human
Schema:
genre (g_name, rating, most_popular_in)
artist (artist_name, country, gender, preferred_genre)
files (f_id, artist_name, file_size, duration, formats)
song (song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution)
Please answer with SQL.
assistant
Sure, I understand.
human
List all the song names by the resolution in ascending order.
assistant
SELECT song_name FROM song ORDER by resolution desc;
human
How many songs have resolution higher than 800?
assistant
SELECT COUNT( song_name ) FROM song WHERE resolution > 800;
human
What about lower?
assistant
SELECT COUNT( song_name ) FROM song WHERE resolution < 800;
human
What are the file size and format of them?
assistant
SELECT DISTINCT T1.file_size , T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T2.resolution < 800 ;