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
Hom many musicians performed in the song 'Flash'?
assistant
SELECT count(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = 'Flash'
human
What is the last name of the musician that have produced the most number of songs?
assistant
SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1
human
Which vocal type has the band mate with first name 'Marianne' played the most?
assistant
SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Marianne' GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
human
Which vocal type has the band mate with last name 'Heilo' played the most?
assistant
SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = 'Heilo' GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
human
Which vocal type has the band mate with first name 'Solveig' played the most?
assistant
SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = 'Solveig' GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
human
What is the first name of the band mate who perfomed in the most songs?
assistant
SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate = t2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY firstname ORDER BY COUNT( * ) DESC LIMIT 1 ;