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
What are the maximum duration and resolution of songs grouped and ordered by languages?
assistant
SELECT MAX( T1.duration ) , MAX( T2.resolution ) , T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages;
human
* I have left the chat *
assistant
SELECT file_size , formats FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.languages ORDER BY T2.languages;
human
What are the maximum duration and resolution of songs grouped and ordered by country?
assistant
SELECT MAX( T1.duration ) , MAX( T2.resolution ) FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.country ORDER BY T2.country ;