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 names of the songs whose rating is below the rating of all songs in English?
assistant
SELECT song_name FROM song WHERE rating < (SELECT min(rating) FROM song WHERE languages = 'english')
human
What are the names of all songs that have a lower rating than some song of blues genre?
assistant
SELECT song_name FROM song WHERE rating < (SELECT max(rating) FROM song WHERE genre_is = 'blues')
human
What is the name of the artist who produced the shortest song?
assistant
SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1
human
What is the name and country of origin of the artist who released a song that has 'love' in its title?
assistant
SELECT T1.artist_name , T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.song_name LIKE '%love%'
human
What is the id of the longest song?
assistant
SELECT f_id FROM files ORDER BY duration DESC LIMIT 1
human
What is the name of the song that was released most recently?
assistant
SELECT song_name , releasedate FROM song ORDER BY releasedate DESC LIMIT 1 ;