Context: CREATE TABLE song (genre_is VARCHAR, rating INTEGER, f_id VARCHAR); CREATE TABLE files (duration INTEGER, f_id VARCHAR)
Question: What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?
Answer: SELECT MIN(T1.duration), MIN(T2.rating), T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is