sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the last name of the artist who sang the most songs?
SQL: 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
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What instrument did the musician with last name "Heilo" use in the song "Badlands"?
SQL: SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId JOIN Instruments AS T4 ON T4.songid  =  T3.songid AND T4.bandmateid  =  T2.id WHERE T2.lastname  =  "Heilo" AND T3.title  =  "Badlands"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What instruments did the musician with the last name "Heilo" play in "Badlands"?
SQL: SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId JOIN Instruments AS T4 ON T4.songid  =  T3.songid AND T4.bandmateid  =  T2.id WHERE T2.lastname  =  "Heilo" AND T3.title  =  "Badlands"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many instruments does the song "Badlands" use?
SQL: SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Badlands"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many different instruments are used in the song "Badlands"?
SQL: SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Badlands"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the vocal types used in song "Badlands"?
SQL: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Badlands"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What types of vocals are used in the song "Badlands"?
SQL: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Badlands"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the number of vocal types used in song "Le Pop"
SQL: SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Le Pop"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many vocal types are used in the song "Le Pop"?
SQL: SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Le Pop"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many songs have a shared vocal?
SQL: SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE TYPE  =  "shared"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many different songs have shared vocals?
SQL: SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE TYPE  =  "shared"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find all the songs that do not have a back vocal.
SQL: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid WHERE TYPE  =  "back"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the different names of all songs without back vocals?
SQL: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid WHERE TYPE  =  "back"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Which vocal type has the band mate with first name "Solveig" played the most?
SQL: 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
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the types of vocals that the band member with the first name "Solveig" played the most?
SQL: 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
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Which vocal type did the musician with last name "Heilo" played in the song with title "Der Kapitan"?
SQL: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid JOIN band AS T3 ON T1.bandmate  =  T3.id WHERE T3.lastname  =  "Heilo" AND T2.title  =  "Der Kapitan"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the types of vocals that the musician with the last name "Heilo" played in "Der Kapitan"?
SQL: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid JOIN band AS T3 ON T1.bandmate  =  T3.id WHERE T3.lastname  =  "Heilo" AND T2.title  =  "Der Kapitan"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the first name of the band mate that has performed in most songs.
SQL: 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
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the first name of the band mate who perfomed in the most songs?
SQL: 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
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Which vocal type has the band mate with first name "Marianne" played the most?
SQL: 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
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the vocal type of the band mate whose first name is "Marianne" played the most?
SQL: 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
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Who is performing in the back stage position for the song "Der Kapitan"? Show the first name and last name.
SQL: SELECT T2.firstname ,  T2.lastname 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  =  "Der Kapitan" AND T1.StagePosition  =  "back"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the first and last name of the artist who performed back stage for the song "Der Kapitan"?
SQL: SELECT T2.firstname ,  T2.lastname 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  =  "Der Kapitan" AND T1.StagePosition  =  "back"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the name of songs that does not have a back vocal.
SQL: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid WHERE TYPE  =  "back"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names of the songs that do not have back vocals?
SQL: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid WHERE TYPE  =  "back"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the songs in album "A Kiss Before You Go: Live in Hamburg"?
SQL: 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.title  =  "A Kiss Before You Go: Live in Hamburg"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the song titles on the album "A Kiss Before You Go: Live in Hamburg"?
SQL: 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.title  =  "A Kiss Before You Go: Live in Hamburg"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are all the songs in albums under label "Universal Music Group"?
SQL: 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"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names of all the songs whose album is under the label of "Universal Music Group"?
SQL: 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"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find the number of songs in all the studio albums.
SQL: 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"
-- Language PostgreSQL
        -- Tables: 
             -- Table: songs 
columns : [['song id', 'number'], ['title', 'text']]

 -- Table: albums 
columns : [['aid', 'number'], ['title', 'text'], ['year', 'number'], ['label', 'text'], ['type', 'text']]

 -- Table: band 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text']]

 -- Table: instruments 
columns : [['song id', 'number'], ['bandmate id', 'number'], ['instrument', 'text']]

 -- Table: performance 
columns : [['song id', 'number'], ['bandmate', 'number'], ['stage position', 'text']]

 -- Table: track lists 
columns : [['album id', 'number'], ['position', 'number'], ['song id', 'number']]

 -- Table: vocals 
columns : [['song id', 'number'], ['bandmate', 'number'], ['type', 'text']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many songs appear in studio albums?
SQL: 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"
-- Language PostgreSQL
        -- Tables: 
             -- Table: manufacturers 
columns : [['code', 'number'], ['name', 'text'], ['headquarter', 'text'], ['founder', 'text'], ['revenue', 'number']]

 -- Table: products 
columns : [['code', 'number'], ['name', 'text'], ['price', 'number'], ['manufacturer', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Who is the founder of Sony?
SQL: SELECT founder FROM manufacturers WHERE name  =  'Sony'
-- Language PostgreSQL
        -- Tables: 
             -- Table: manufacturers 
columns : [['code', 'number'], ['name', 'text'], ['headquarter', 'text'], ['founder', 'text'], ['revenue', 'number']]

 -- Table: products 
columns : [['code', 'number'], ['name', 'text'], ['price', 'number'], ['manufacturer', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Return the founder of Sony.
SQL: SELECT founder FROM manufacturers WHERE name  =  'Sony'
-- Language PostgreSQL
        -- Tables: 
             -- Table: manufacturers 
columns : [['code', 'number'], ['name', 'text'], ['headquarter', 'text'], ['founder', 'text'], ['revenue', 'number']]

 -- Table: products 
columns : [['code', 'number'], ['name', 'text'], ['price', 'number'], ['manufacturer', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Where is the headquarter of the company founded by James?
SQL: SELECT headquarter FROM manufacturers WHERE founder  =  'James'
-- Language PostgreSQL
        -- Tables: 
             -- Table: manufacturers 
columns : [['code', 'number'], ['name', 'text'], ['headquarter', 'text'], ['founder', 'text'], ['revenue', 'number']]

 -- Table: products 
columns : [['code', 'number'], ['name', 'text'], ['price', 'number'], ['manufacturer', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the headquarter of the company whose founder is James?
SQL: SELECT headquarter FROM manufacturers WHERE founder  =  'James'
-- Language PostgreSQL
        -- Tables: 
             -- Table: manufacturers 
columns : [['code', 'number'], ['name', 'text'], ['headquarter', 'text'], ['founder', 'text'], ['revenue', 'number']]

 -- Table: products 
columns : [['code', 'number'], ['name', 'text'], ['price', 'number'], ['manufacturer', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.
SQL: SELECT name ,  headquarter FROM manufacturers ORDER BY revenue DESC
-- Language PostgreSQL
        -- Tables: 
             -- Table: manufacturers 
columns : [['code', 'number'], ['name', 'text'], ['headquarter', 'text'], ['founder', 'text'], ['revenue', 'number']]

 -- Table: products 
columns : [['code', 'number'], ['name', 'text'], ['price', 'number'], ['manufacturer', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the names and headquarters of all manufacturers, ordered by revenue descending?
SQL: SELECT name ,  headquarter FROM manufacturers ORDER BY revenue DESC
-- Language PostgreSQL
        -- Tables: 
             -- Table: manufacturers 
columns : [['code', 'number'], ['name', 'text'], ['headquarter', 'text'], ['founder', 'text'], ['revenue', 'number']]

 -- Table: products 
columns : [['code', 'number'], ['name', 'text'], ['price', 'number'], ['manufacturer', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the average, maximum and total revenues of all companies?
SQL: SELECT avg(revenue) ,  max(revenue) ,  sum(revenue) FROM manufacturers
-- Language PostgreSQL
        -- Tables: 
             -- Table: manufacturers 
columns : [['code', 'number'], ['name', 'text'], ['headquarter', 'text'], ['founder', 'text'], ['revenue', 'number']]

 -- Table: products 
columns : [['code', 'number'], ['name', 'text'], ['price', 'number'], ['manufacturer', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Return the average, maximum, and total revenues across all manufacturers.
SQL: SELECT avg(revenue) ,  max(revenue) ,  sum(revenue) FROM manufacturers
-- Language PostgreSQL
        -- Tables: 
             -- Table: manufacturers 
columns : [['code', 'number'], ['name', 'text'], ['headquarter', 'text'], ['founder', 'text'], ['revenue', 'number']]

 -- Table: products 
columns : [['code', 'number'], ['name', 'text'], ['price', 'number'], ['manufacturer', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many companies were created by Andy?
SQL: SELECT count(*) FROM manufacturers WHERE founder  =  'Andy'