sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 name of tracks whose genre is Rock?
SQL: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 name of all tracks in the Rock genre?
SQL: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 title of album which track Balls to the Wall belongs to?
SQL: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 name of the album that has the track Ball to the Wall?
SQL: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T2.name = "Balls to the Wall";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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: List name of all tracks in Balls to the Wall.
SQL: SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 name of all tracks in the album named Balls to the Wall?
SQL: SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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: List title of albums have the number of tracks greater than 10.
SQL: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id)  >  10;
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 of the albums that have more than 10 tracks?
SQL: SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id)  >  10;
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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: List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.
SQL: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" AND T3.name = "MPEG audio file";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 of all Rock tracks that are stored on MPEG audio files?
SQL: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" AND T3.name = "MPEG audio file";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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: List the name of tracks belongs to genre Rock or media type is MPEG audio file.
SQL: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 of all tracks that belong to the Rock genre and whose media type is MPEG?
SQL: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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: List the name of tracks belongs to genre Rock or genre Jazz.
SQL: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 of the tracks that are Rock or Jazz songs?
SQL: SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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: List the name of all tracks in the playlists of Movies.
SQL: SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 of all tracks that are on playlists titled Movies?
SQL: SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies";
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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: List the name of playlist which has number of tracks greater than 100.
SQL: SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id)  >  100;
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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 of all playlists that have more than 100 tracks?
SQL: SELECT T2.name FROM playlist_tracks AS T1 JOIN playlists AS T2 ON T2.id = T1.playlist_id GROUP BY T1.playlist_id HAVING count(T1.track_id)  >  100;
-- Language PostgreSQL
        -- Tables: 
             -- Table: sqlite sequence 
columns : [['name', 'number'], ['seq', 'text']]

 -- Table: artists 
columns : [['id', 'text'], ['name', 'text']]

 -- Table: albums 
columns : [['id', 'number'], ['title', 'text'], ['artist id', 'number']]

 -- Table: employees 
columns : [['id', 'number'], ['last name', 'text'], ['first name', 'text'], ['title', 'text'], ['reports to', 'number'], ['birth date', 'time'], ['hire date', 'time'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text']]

 -- Table: customers 
columns : [['id', 'number'], ['first name', 'text'], ['last name', 'text'], ['company', 'text'], ['address', 'text'], ['city', 'text'], ['state', 'text'], ['country', 'text'], ['postal code', 'text'], ['phone', 'text'], ['fax', 'text'], ['email', 'text'], ['support rep id', 'number']]

 -- Table: genres 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: invoices 
columns : [['id', 'number'], ['customer id', 'number'], ['invoice date', 'time'], ['billing address', 'text'], ['billing city', 'text'], ['billing state', 'text'], ['billing country', 'text'], ['billing postal code', 'text'], ['total', 'number']]

 -- Table: media types 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: tracks 
columns : [['id', 'number'], ['name', 'text'], ['album id', 'number'], ['media type id', 'number'], ['genre id', 'number'], ['composer', 'text'], ['milliseconds', 'number'], ['bytes', 'number'], ['unit price', 'number']]

 -- Table: invoice lines 
columns : [['id', 'number'], ['invoice id', 'number'], ['track id', 'number'], ['unit price', 'number'], ['quantity', 'number']]

 -- Table: playlists 
columns : [['id', 'number'], ['name', 'text']]

 -- Table: playlist tracks 
columns : [['playlist id', 'number'], ['track id', '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: List all tracks bought by customer Daan Peeters.
SQL: SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "Daan" AND T4.last_name = "Peeters";