human
Schema:
Songs (SongId, Title)
Albums (AId, Title, Year, Label, Type)
Band (Id, Firstname, Lastname)
Instruments (SongId, BandmateId, Instrument)
Performance (SongId, Bandmate, StagePosition)
Tracklists (AlbumId, Position, SongId)
Vocals (SongId, Bandmate, Type)
Please answer with SQL.
assistant
Sure, I understand.
human
Find all the songs whose name contains the word 'the'.
assistant
SELECT title FROM songs WHERE title LIKE '% the %'
human
What are all the songs in albums under label 'Universal Music Group'?
assistant
SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = 'Universal Music Group'
human
What is the label that has the most albums?
assistant
SELECT label FROM albums GROUP BY label ORDER BY count(*) DESC LIMIT 1
human
Find the number of songs in all the studio albums.
assistant
SELECT count(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.type = 'Studio'
human
What are the albums produced in year 2010?
assistant
SELECT * FROM Albums WHERE YEAR = 2010
human
Find all the albums in 2012.
assistant
SELECT * FROM Albums WHERE YEAR = 2012 ;