sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: How many institutions are there?
SQL: SELECT count(*) FROM inst
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Count the number of institutions.
SQL: SELECT count(*) FROM inst
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: How many papers are published in total?
SQL: SELECT count(*) FROM papers
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Count the number of total papers.
SQL: SELECT count(*) FROM papers
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: What are the titles of papers published by "Jeremy Gibbons"?
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Jeremy" AND t1.lname  =  "Gibbons"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the titles of all the papers written by "Jeremy Gibbons"
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Jeremy" AND t1.lname  =  "Gibbons"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find all the papers published by "Aaron Turon".
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Aaron" AND t1.lname  =  "Turon"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the titles of all the papers written by "Aaron Turon".
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Aaron" AND t1.lname  =  "Turon"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: How many papers have "Atsushi Ohori" published?
SQL: SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Atsushi" AND t1.lname  =  "Ohori"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: How many papers are "Atsushi Ohori" the author of?
SQL: SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Atsushi" AND t1.lname  =  "Ohori"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: What is the name of the institution that "Matthias Blume" belongs to?
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "Matthias" AND t1.lname  =  "Blume"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which institution is the author "Matthias Blume" belong to? Give me the name of the institution.
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "Matthias" AND t1.lname  =  "Blume"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which institution does "Katsuhiro Ueno" belong to?
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "Katsuhiro" AND t1.lname  =  "Ueno"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: What is the name of the institution the author "Katsuhiro Ueno" belongs to?
SQL: SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "Katsuhiro" AND t1.lname  =  "Ueno"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Who belong to the institution "University of Oxford"? Show the first names and last names.
SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "University of Oxford"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the first names and last names of the authors whose institution affiliation is "University of Oxford".
SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "University of Oxford"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which authors belong to the institution "Google"? Show the first names and last names.
SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Google"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the first names and last names of the authors whose institution affiliation is "Google".
SQL: SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Google"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: What are the last names of the author of the paper titled "Binders Unbound"?
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "Binders Unbound"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Who is the author of the paper titled "Binders Unbound"? Give me the last name.
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "Binders Unbound"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the first and last name of the author(s) who wrote the paper "Nameless, Painless".
SQL: SELECT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "Nameless ,  Painless"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: What are the first and last name of the author who published the paper titled "Nameless, Painless"?
SQL: SELECT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "Nameless ,  Painless"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: What are the papers published under the institution "Indiana University"?
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Indiana University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: List the titles of the papers whose authors are from the institution "Indiana University".
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Indiana University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find all the papers published by the institution "Google".
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Google"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which papers were written by authors from the institution "Google"?
SQL: SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Google"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: How many papers are published by the institution "Tokohu University"?
SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Tokohu University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the number of papers published by authors from the institution "Tokohu University".
SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Tokohu University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the number of papers published by the institution "University of Pennsylvania".
SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "University of Pennsylvania"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: How many papers are written by authors from the institution "University of Pennsylvania"?
SQL: SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "University of Pennsylvania"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the papers which have "Olin Shivers" as an author.
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "Olin" AND t1.lname  =  "Shivers"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which papers did the author "Olin Shivers" write? Give me the paper titles.
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "Olin" AND t1.lname  =  "Shivers"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which papers have "Stephanie Weirich" as an author?
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "Stephanie" AND t1.lname  =  "Weirich"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the titles of the papers the author "Stephanie Weirich" wrote.
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "Stephanie" AND t1.lname  =  "Weirich"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which paper is published in an institution in "USA" and have "Turon" as its second author?
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "USA" AND t2.authorder  =  2 AND t1.lname  =  "Turon"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find papers whose second author has last name "Turon" and is affiliated with an institution in the country "USA".
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "USA" AND t2.authorder  =  2 AND t1.lname  =  "Turon"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the titles of papers whose first author is affiliated with an institution in the country "Japan" and has last name "Ohori"?
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "Japan" AND t2.authorder  =  1 AND t1.lname  =  "Ohori"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which papers' first author is affiliated with an institution in the country "Japan" and has last name "Ohori"? Give me the titles of the papers.
SQL: SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "Japan" AND t2.authorder  =  1 AND t1.lname  =  "Ohori"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: What is the last name of the author that has published the most papers?
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.fname ,  t1.lname ORDER BY count(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which author has written the most papers? Find his or her last name.
SQL: SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.fname ,  t1.lname ORDER BY count(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Retrieve the country that has published the most papers.
SQL: SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the country that the most papers are affiliated with.
SQL: SELECT t1.country FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.country ORDER BY count(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the name of the organization that has published the largest number of papers.
SQL: SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which institution has the most papers? Find the name of the institution.
SQL: SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Find the titles of the papers that contain the word "ML".
SQL: SELECT title FROM papers WHERE title LIKE "%ML%"
-- Language PostgreSQL
        -- Tables: 
             -- Table: institution 
columns : [['institution id', 'number'], ['name', 'text'], ['country', 'text']]

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

 -- Table: papers 
columns : [['paper id', 'number'], ['title', 'text']]

 -- Table: authorship count 
columns : [['author id', 'number'], ['institution id', 'number'], ['paper id', 'number'], ['author count', 'number']]

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



Question: Which papers have the substring "ML" in their titles? Return the titles of the papers.
SQL: SELECT title FROM papers WHERE title LIKE "%ML%"