brief_instruction stringlengths 16 224 | instruction stringlengths 687 8.77k | output stringlengths 18 577 |
|---|---|---|
Find all the songs whose name contains the word "the". |
-- 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.
Translate `Find all the songs whose name contains the word "the".` to a syntactically-correct PostgreSQL query.
| SELECT title FROM songs WHERE title LIKE '% the %' |
What are the names of the songs whose title has the word "the"? |
-- 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.
Translate `What are the names of the songs whose title has the word "the"?` to a syntactically-correct PostgreSQL query.
| SELECT title FROM songs WHERE title LIKE '% the %' |
What are all the instruments used? |
-- 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.
Translate `What are all the instruments used?` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT instrument FROM Instruments |
What are the different instruments listed in the database? |
-- 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.
Translate `What are the different instruments listed in the database?` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT instrument FROM Instruments |
What instrument did the musician with last name "Heilo" use in the song "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.
Translate `What instrument did the musician with last name "Heilo" use in the song "Le Pop"?` to a syntactically-correct PostgreSQL query.
| 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 = "Le Pop" |
What instruments did the musician with the last name "Heilo" play in the song "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.
Translate `What instruments did the musician with the last name "Heilo" play in the song "Le Pop"?` to a syntactically-correct PostgreSQL query.
| 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 = "Le Pop" |
What is the most used instrument? |
-- 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.
Translate `What is the most used instrument?` to a syntactically-correct PostgreSQL query.
| SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1 |
What instrument is used the most? |
-- 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.
Translate `What instrument is used the most?` to a syntactically-correct PostgreSQL query.
| SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1 |
How many songs have used the instrument "drums"? |
-- 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.
Translate `How many songs have used the instrument "drums"?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM instruments WHERE instrument = "drums" |
How many songs use drums as an instrument? |
-- 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.
Translate `How many songs use drums as an instrument?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM instruments WHERE instrument = "drums" |
What instruments does the the song "Le Pop" use? |
-- 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.
Translate `What instruments does the the song "Le Pop" use?` to a syntactically-correct PostgreSQL query.
| SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" |
What are the instruments are used in the song "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.
Translate `What are the instruments are used in the song "Le Pop"?` to a syntactically-correct PostgreSQL query.
| SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" |
How many instruments does the song "Le Pop" use? |
-- 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.
Translate `How many instruments does the song "Le Pop" use?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" |
How many different instruments are used in the song "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.
Translate `How many different instruments are used in the song "Le Pop"?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" |
How many instrument does the musician with last name "Heilo" use? |
-- 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.
Translate `How many instrument does the musician with last name "Heilo" use?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" |
How many different instruments does the musician with the last name "Heilo" use? |
-- 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.
Translate `How many different instruments does the musician with the last name "Heilo" use?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" |
Find all the instruments ever used by the musician with last name "Heilo"? |
-- 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.
Translate `Find all the instruments ever used by the musician with last name "Heilo"?` to a syntactically-correct PostgreSQL query.
| SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" |
What are all the instruments used by the musician with the last name "Heilo"? |
-- 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.
Translate `What are all the instruments used by the musician with the last name "Heilo"?` to a syntactically-correct PostgreSQL query.
| SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" |
Which song has the most vocals? |
-- 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.
Translate `Which song has the most vocals?` to a syntactically-correct PostgreSQL query.
| SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY count(*) DESC LIMIT 1 |
What is the song with the most vocals? |
-- 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.
Translate `What is the song with the most vocals?` to a syntactically-correct PostgreSQL query.
| SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY count(*) DESC LIMIT 1 |
Which vocal type is the most frequently appearring type? |
-- 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.
Translate `Which vocal type is the most frequently appearring type?` to a syntactically-correct PostgreSQL query.
| SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1 |
What is the type of vocables that appears most frequently? |
-- 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.
Translate `What is the type of vocables that appears most frequently?` to a syntactically-correct PostgreSQL query.
| SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1 |
Which vocal type has the band mate with last name "Heilo" played the most? |
-- 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.
Translate `Which vocal type has the band mate with last name "Heilo" played the most?` to a syntactically-correct PostgreSQL query.
| SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = "Heilo" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1 |
What is the type of vocals that the band member with the last name "Heilo" played the most? |
-- 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.
Translate `What is the type of vocals that the band member with the last name "Heilo" played the most?` to a syntactically-correct PostgreSQL query.
| SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = "Heilo" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1 |
What are the vocal types used in song "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.
Translate `What are the vocal types used in song "Le Pop"?` to a syntactically-correct PostgreSQL query.
| SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" |
What are the types of vocals used in the song "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.
Translate `What are the types of vocals used in the song "Le Pop"?` to a syntactically-correct PostgreSQL query.
| SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" |
Find the number of vocal types used in song "Demon Kitty Rag"? |
-- 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.
Translate `Find the number of vocal types used in song "Demon Kitty Rag"?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Demon Kitty Rag" |
What are the types of vocals used in the song "Demon Kitty Rag"? |
-- 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.
Translate `What are the types of vocals used in the song "Demon Kitty Rag"?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Demon Kitty Rag" |
How many songs have a lead vocal? |
-- 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.
Translate `How many songs have a lead vocal?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "lead" |
How many songs have vocals of type lead? |
-- 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.
Translate `How many songs have vocals of type lead?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "lead" |
Which vocal type did the musician with first name "Solveig" played in the song with title "A Bar in Amsterdam"? |
-- 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.
Translate `Which vocal type did the musician with first name "Solveig" played in the song with title "A Bar in Amsterdam"?` to a syntactically-correct PostgreSQL query.
| 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.firstname = "Solveig" AND T2.title = "A Bar In Amsterdam" |
What are the types of vocals that the musician with the first name "Solveig" played in the song "A Bar in Amsterdam"? |
-- 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.
Translate `What are the types of vocals that the musician with the first name "Solveig" played in the song "A Bar in Amsterdam"?` to a syntactically-correct PostgreSQL query.
| 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.firstname = "Solveig" AND T2.title = "A Bar In Amsterdam" |
Find all the songs that do not have a lead vocal. |
-- 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.
Translate `Find all the songs that do not have a lead vocal.` to a syntactically-correct PostgreSQL query.
| 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 = "lead" |
What are the names of the songs without a lead vocal? |
-- 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.
Translate `What are the names of the songs without a lead vocal?` to a syntactically-correct PostgreSQL query.
| 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 = "lead" |
Find all the vocal types. |
-- 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.
Translate `Find all the vocal types.` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT TYPE FROM vocals |
What are the different types of vocals? |
-- 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.
Translate `What are the different types of vocals?` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT TYPE FROM vocals |
What are the albums produced in year 2010? |
-- 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.
Translate `What are the albums produced in year 2010?` to a syntactically-correct PostgreSQL query.
| SELECT * FROM Albums WHERE YEAR = 2010 |
What information is there on albums from 2010? |
-- 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.
Translate `What information is there on albums from 2010?` to a syntactically-correct PostgreSQL query.
| SELECT * FROM Albums WHERE YEAR = 2010 |
Who performed the song named "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.
Translate `Who performed the song named "Le Pop"?` to a syntactically-correct PostgreSQL query.
| 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 = "Le Pop" |
What is the first and last name of artist who performed "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.
Translate `What is the first and last name of artist who performed "Le Pop"?` to a syntactically-correct PostgreSQL query.
| 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 = "Le Pop" |
What is the last name of the musician that have produced the most songs? |
-- 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.
Translate `What is the last name of the musician that have produced the most songs?` to a syntactically-correct PostgreSQL query.
| 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 |
What is the last name of the artist who sang the most songs? |
-- 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.
Translate `What is the last name of the artist who sang the most songs?` to a syntactically-correct PostgreSQL query.
| 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 |
What instrument did the musician with last name "Heilo" use in the song "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.
Translate `What instrument did the musician with last name "Heilo" use in the song "Badlands"?` to a syntactically-correct PostgreSQL query.
| 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" |
What instruments did the musician with the last name "Heilo" play in "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.
Translate `What instruments did the musician with the last name "Heilo" play in "Badlands"?` to a syntactically-correct PostgreSQL query.
| 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" |
How many instruments does the song "Badlands" use? |
-- 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.
Translate `How many instruments does the song "Badlands" use?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Badlands" |
How many different instruments are used in the song "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.
Translate `How many different instruments are used in the song "Badlands"?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Badlands" |
What are the vocal types used in song "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.
Translate `What are the vocal types used in song "Badlands"?` to a syntactically-correct PostgreSQL query.
| SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Badlands" |
What types of vocals are used in the song "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.
Translate `What types of vocals are used in the song "Badlands"?` to a syntactically-correct PostgreSQL query.
| SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Badlands" |
Find the number of vocal types used in song "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.
Translate `Find the number of vocal types used in song "Le Pop"` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" |
How many vocal types are used in the song "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.
Translate `How many vocal types are used in the song "Le Pop"?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" |
How many songs have a shared vocal? |
-- 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.
Translate `How many songs have a shared vocal?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "shared" |
How many different songs have shared vocals? |
-- 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.
Translate `How many different songs have shared vocals?` to a syntactically-correct PostgreSQL query.
| SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "shared" |
Find all the songs that do not have a back vocal. |
-- 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.
Translate `Find all the songs that do not have a back vocal.` to a syntactically-correct PostgreSQL query.
| 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" |
What are the different names of all songs without back vocals? |
-- 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.
Translate `What are the different names of all songs without back vocals?` to a syntactically-correct PostgreSQL query.
| 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" |
Which vocal type has the band mate with first name "Solveig" played the most? |
-- 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.
Translate `Which vocal type has the band mate with first name "Solveig" played the most?` to a syntactically-correct PostgreSQL query.
| 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 |
What are the types of vocals that the band member with the first name "Solveig" played the most? |
-- 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.
Translate `What are the types of vocals that the band member with the first name "Solveig" played the most?` to a syntactically-correct PostgreSQL query.
| 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 |
Which vocal type did the musician with last name "Heilo" played in the song with 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.
Translate `Which vocal type did the musician with last name "Heilo" played in the song with title "Der Kapitan"?` to a syntactically-correct PostgreSQL query.
| 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" |
What are the types of vocals that the musician with the last name "Heilo" played in "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.
Translate `What are the types of vocals that the musician with the last name "Heilo" played in "Der Kapitan"?` to a syntactically-correct PostgreSQL query.
| 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" |
Find the first name of the band mate that has performed in most songs. |
-- 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.
Translate `Find the first name of the band mate that has performed in most songs.` to a syntactically-correct PostgreSQL query.
| 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 |
What is the first name of the band mate who perfomed in the most songs? |
-- 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.
Translate `What is the first name of the band mate who perfomed in the most songs?` to a syntactically-correct PostgreSQL query.
| 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 |
Which vocal type has the band mate with first name "Marianne" played the most? |
-- 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.
Translate `Which vocal type has the band mate with first name "Marianne" played the most?` to a syntactically-correct PostgreSQL query.
| 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 |
What is the vocal type of the band mate whose first name is "Marianne" played the most? |
-- 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.
Translate `What is the vocal type of the band mate whose first name is "Marianne" played the most?` to a syntactically-correct PostgreSQL query.
| 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 |
Who is performing in the back stage position for the song "Der Kapitan"? Show the first name and last name. |
-- 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.
Translate `Who is performing in the back stage position for the song "Der Kapitan"? Show the first name and last name.` to a syntactically-correct PostgreSQL query.
| 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" |
What is the first and last name of the artist who performed back stage for the song "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.
Translate `What is the first and last name of the artist who performed back stage for the song "Der Kapitan"?` to a syntactically-correct PostgreSQL query.
| 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" |
Find the name of songs that does not have a back vocal. |
-- 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.
Translate `Find the name of songs that does not have a back vocal.` to a syntactically-correct PostgreSQL query.
| 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" |
What are the names of the songs that do not have back vocals? |
-- 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.
Translate `What are the names of the songs that do not have back vocals?` to a syntactically-correct PostgreSQL query.
| 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" |
What are the songs in album "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.
Translate `What are the songs in album "A Kiss Before You Go: Live in Hamburg"?` to a syntactically-correct PostgreSQL query.
| 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" |
What are the song titles on the album "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.
Translate `What are the song titles on the album "A Kiss Before You Go: Live in Hamburg"?` to a syntactically-correct PostgreSQL query.
| 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" |
What are all the songs in albums under 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.
Translate `What are all the songs in albums under label "Universal Music Group"?` to a syntactically-correct PostgreSQL query.
| 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" |
What are the names of all the songs whose album is under the label of "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.
Translate `What are the names of all the songs whose album is under the label of "Universal Music Group"?` to a syntactically-correct PostgreSQL query.
| 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" |
Find the number of songs in all the studio albums. |
-- 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.
Translate `Find the number of songs in all the studio albums.` to a syntactically-correct PostgreSQL query.
| 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" |
How many songs appear in studio albums? |
-- 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.
Translate `How many songs appear in studio albums?` to a syntactically-correct PostgreSQL query.
| 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" |
Who is the founder of 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.
Translate `Who is the founder of Sony?` to a syntactically-correct PostgreSQL query.
| SELECT founder FROM manufacturers WHERE name = 'Sony' |
Return the founder of 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.
Translate `Return the founder of Sony.` to a syntactically-correct PostgreSQL query.
| SELECT founder FROM manufacturers WHERE name = 'Sony' |
Where is the headquarter of the company founded by 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.
Translate `Where is the headquarter of the company founded by James?` to a syntactically-correct PostgreSQL query.
| SELECT headquarter FROM manufacturers WHERE founder = 'James' |
What is the headquarter of the company whose founder is 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.
Translate `What is the headquarter of the company whose founder is James?` to a syntactically-correct PostgreSQL query.
| SELECT headquarter FROM manufacturers WHERE founder = 'James' |
Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first. |
-- 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.
Translate `Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.` to a syntactically-correct PostgreSQL query.
| SELECT name , headquarter FROM manufacturers ORDER BY revenue DESC |
What are the names and headquarters of all manufacturers, ordered by revenue descending? |
-- 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.
Translate `What are the names and headquarters of all manufacturers, ordered by revenue descending?` to a syntactically-correct PostgreSQL query.
| SELECT name , headquarter FROM manufacturers ORDER BY revenue DESC |
What are the average, maximum and total revenues of all companies? |
-- 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.
Translate `What are the average, maximum and total revenues of all companies?` to a syntactically-correct PostgreSQL query.
| SELECT avg(revenue) , max(revenue) , sum(revenue) FROM manufacturers |
Return the average, maximum, and total revenues across all 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.
Translate `Return the average, maximum, and total revenues across all manufacturers.` to a syntactically-correct PostgreSQL query.
| SELECT avg(revenue) , max(revenue) , sum(revenue) FROM manufacturers |
How many companies were created by Andy? |
-- 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.
Translate `How many companies were created by Andy?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM manufacturers WHERE founder = 'Andy' |
Return the number of companies created by Andy. |
-- 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.
Translate `Return the number of companies created by Andy.` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM manufacturers WHERE founder = 'Andy' |
Find the total revenue created by the companies whose headquarter is located at Austin. |
-- 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.
Translate `Find the total revenue created by the companies whose headquarter is located at Austin.` to a syntactically-correct PostgreSQL query.
| SELECT sum(revenue) FROM manufacturers WHERE headquarter = 'Austin' |
What is the sum of revenue from companies with headquarters in Austin? |
-- 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.
Translate `What is the sum of revenue from companies with headquarters in Austin?` to a syntactically-correct PostgreSQL query.
| SELECT sum(revenue) FROM manufacturers WHERE headquarter = 'Austin' |
What are the different cities listed? |
-- 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.
Translate `What are the different cities listed?` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT headquarter FROM manufacturers |
Give the distinct headquarters of 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.
Translate `Give the distinct headquarters of manufacturers.` to a syntactically-correct PostgreSQL query.
| SELECT DISTINCT headquarter FROM manufacturers |
Find the number of manufactures that are based in Tokyo or Beijing. |
-- 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.
Translate `Find the number of manufactures that are based in Tokyo or Beijing.` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing' |
How many manufacturers have headquarters in either Tokyo or Beijing? |
-- 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.
Translate `How many manufacturers have headquarters in either Tokyo or Beijing?` to a syntactically-correct PostgreSQL query.
| SELECT count(*) FROM manufacturers WHERE headquarter = 'Tokyo' OR headquarter = 'Beijing' |
Find the founder of the company whose name begins with the letter 'S'. |
-- 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.
Translate `Find the founder of the company whose name begins with the letter 'S'.` to a syntactically-correct PostgreSQL query.
| SELECT founder FROM manufacturers WHERE name LIKE 'S%' |
Who is the founders of companies whose first letter is S? |
-- 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.
Translate `Who is the founders of companies whose first letter is S?` to a syntactically-correct PostgreSQL query.
| SELECT founder FROM manufacturers WHERE name LIKE 'S%' |
Find the name of companies whose revenue is between 100 and 150. |
-- 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.
Translate `Find the name of companies whose revenue is between 100 and 150.` to a syntactically-correct PostgreSQL query.
| SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150 |
What are the names of companies with revenue between 100 and 150? |
-- 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.
Translate `What are the names of companies with revenue between 100 and 150?` to a syntactically-correct PostgreSQL query.
| SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150 |
What is the total revenue of all companies whose main office is at Tokyo or Taiwan? |
-- 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.
Translate `What is the total revenue of all companies whose main office is at Tokyo or Taiwan?` to a syntactically-correct PostgreSQL query.
| SELECT sum(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan' |
Return the total revenue of companies with headquarters in Tokyo or Taiwan. |
-- 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.
Translate `Return the total revenue of companies with headquarters in Tokyo or Taiwan.` to a syntactically-correct PostgreSQL query.
| SELECT sum(revenue) FROM manufacturers WHERE Headquarter = 'Tokyo' OR Headquarter = 'Taiwan' |
Find the name of product that is produced by both companies Creative Labs and 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.
Translate `Find the name of product that is produced by both companies Creative Labs and Sony.` to a syntactically-correct PostgreSQL query.
| SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony' |
What are the names of products produced by both Creative Labs and 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.
Translate `What are the names of products produced by both Creative Labs and Sony?` to a syntactically-correct PostgreSQL query.
| SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer = T2.code WHERE T2.name = 'Sony' |
Find the name, headquarter and founder of the manufacturer that has the highest revenue. |
-- 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.
Translate `Find the name, headquarter and founder of the manufacturer that has the highest revenue.` to a syntactically-correct PostgreSQL query.
| SELECT name , headquarter , founder FROM manufacturers ORDER BY revenue DESC LIMIT 1 |
What are the names, headquarters and founders of the company with the highest revenue? |
-- 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.
Translate `What are the names, headquarters and founders of the company with the highest revenue?` to a syntactically-correct PostgreSQL query.
| SELECT name , headquarter , founder FROM manufacturers ORDER BY revenue DESC LIMIT 1 |
Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order. |
-- 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.
Translate `Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.` to a syntactically-correct PostgreSQL query.
| SELECT name , headquarter , revenue FROM manufacturers ORDER BY revenue DESC |
What are the names, headquarters and revenues for manufacturers, sorted by revenue descending? |
-- 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.
Translate `What are the names, headquarters and revenues for manufacturers, sorted by revenue descending?` to a syntactically-correct PostgreSQL query.
| SELECT name , headquarter , revenue FROM manufacturers ORDER BY revenue DESC |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.