sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 campuses in Los Angeles county.
SQL: SELECT campus FROM campuses WHERE county  =  "Los Angeles"
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 campuses are in Los Angeles county?
SQL: SELECT campus FROM campuses WHERE county  =  "Los Angeles"
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 degrees were conferred in "San Jose State University" in 2000?
SQL: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Jose State University" AND t2.year  =  2000
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 degrees were conferred at San Jose State University in 2000?
SQL: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Jose State University" AND t2.year  =  2000
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 degrees conferred in "San Francisco State University" in 2001.
SQL: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Francisco State University" AND t2.year  =  2001
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 degrees were conferred in San Francisco State University in the year 2001?
SQL: SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Francisco State University" AND t2.year  =  2001
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 faculty is there in total in the year of 2002?
SQL: SELECT sum(faculty) FROM faculty WHERE YEAR  =  2002
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 faculty, in total, are there in the year 2002?
SQL: SELECT sum(faculty) FROM faculty WHERE YEAR  =  2002
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 number of faculty lines in campus "Long Beach State University" in 2002?
SQL: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2002 AND T2.campus  =  "Long Beach State University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 number of faculty at Long Beach State University in 2002?
SQL: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2002 AND T2.campus  =  "Long Beach State University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 faculty lines are there in "San Francisco State University" in year 2004?
SQL: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2004 AND T2.campus  =  "San Francisco State University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 faculty lines are there at San Francisco State University in 2004?
SQL: SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2004 AND T2.campus  =  "San Francisco State University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 campus that have between 600 and 1000 faculty lines in year 2004.
SQL: SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id  =  t2.campus WHERE t2.faculty  >=  600 AND t2.faculty  <=  1000 AND T1.year  =  2004
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 campuses that had between 600 and 1000 faculty members in 2004?
SQL: SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id  =  t2.campus WHERE t2.faculty  >=  600 AND t2.faculty  <=  1000 AND T1.year  =  2004
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 faculty lines are there in the university that conferred the most number of degrees in year 2002?
SQL: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  t2.campus JOIN degrees AS T3 ON T1.id  =  t3.campus AND t2.year  =  t3.year WHERE t2.year  =  2002 ORDER BY t3.degrees DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 faculty members did the university that conferred the most degrees in 2002 have?
SQL: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  t2.campus JOIN degrees AS T3 ON T1.id  =  t3.campus AND t2.year  =  t3.year WHERE t2.year  =  2002 ORDER BY t3.degrees DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 faculty lines are there in the university that conferred the least number of degrees in year 2001?
SQL: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  t2.campus JOIN degrees AS T3 ON T1.id  =  t3.campus AND t2.year  =  t3.year WHERE t2.year  =  2001 ORDER BY t3.degrees LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 faculty members are at the university that gave the least number of degrees in 2001?
SQL: SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  t2.campus JOIN degrees AS T3 ON T1.id  =  t3.campus AND t2.year  =  t3.year WHERE t2.year  =  2001 ORDER BY t3.degrees LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 undergraduates are there in "San Jose State University" in year 2004?
SQL: SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Jose State University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 undergraduates are there at San Jose State
SQL: SELECT sum(t1.undergraduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Jose State University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 number of graduates in "San Francisco State University" in year 2004?
SQL: SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Francisco State University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 people graduated from San Francisco State University in 2004?
SQL: SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Francisco State University"
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 campus fee of "San Francisco State University" in year 2000?
SQL: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Francisco State University" AND t1.year  =  2000
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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: In the year 2000, what is the campus fee for San Francisco State University?
SQL: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Francisco State University" AND t1.year  =  2000
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 campus fee of "San Jose State University" in year 2000.
SQL: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Jose State University" AND t1.year  =  2000
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 campus fee in the year 2000 for San Jose State University?
SQL: SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Jose State University" AND t1.year  =  2000
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 CSU campuses are there?
SQL: SELECT count(*) FROM campuses
-- Language PostgreSQL
        -- Tables: 
             -- Table: campuses 
columns : [['id', 'number'], ['campus', 'text'], ['location', 'text'], ['county', 'text'], ['year', 'number']]

 -- Table: csu fees 
columns : [['campus', 'number'], ['year', 'number'], ['campus fee', 'number']]

 -- Table: degrees 
columns : [['year', 'number'], ['campus', 'number'], ['degrees', 'number']]

 -- Table: discipline enrollments 
columns : [['campus', 'number'], ['discipline', 'number'], ['year', 'number'], ['undergraduate', 'number'], ['graduate', 'number']]

 -- Table: enrollments 
columns : [['campus', 'number'], ['year', 'number'], ['totalenrollment ay', 'number'], ['fte ay', 'number']]

 -- Table: faculty 
columns : [['campus', 'number'], ['year', 'number'], ['faculty', '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 total number of campuses?
SQL: SELECT count(*) FROM campuses
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', '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 candidates are there?
SQL: SELECT count(*) FROM candidate
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', '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 candidates.
SQL: SELECT count(*) FROM candidate
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', '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 poll resource provided the most number of candidate information?
SQL: SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', 'number']]

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



Question: Return the poll resource associated with the most candidates.
SQL: SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', '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 top 3 highest support rates?
SQL: SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', 'number']]

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



Question: Return the top 3 greatest support rates.
SQL: SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', '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 id of the candidate who got the lowest oppose rate.
SQL: SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', '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 id of the candidate with the lowest oppose rate?
SQL: SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', '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: Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.
SQL: SELECT Support_rate ,  Consider_rate ,  Oppose_rate FROM candidate ORDER BY unsure_rate
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', '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 support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?
SQL: SELECT Support_rate ,  Consider_rate ,  Oppose_rate FROM candidate ORDER BY unsure_rate
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', '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 poll source does the highest oppose rate come from?
SQL: SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: candidate 
columns : [['candidate id', 'number'], ['people id', 'number'], ['poll source', 'text'], ['date', 'text'], ['support rate', 'number'], ['consider rate', 'number'], ['oppose rate', 'number'], ['unsure rate', 'number']]

 -- Table: people 
columns : [['people id', 'number'], ['sex', 'text'], ['name', 'text'], ['date of birth', 'text'], ['height', 'number'], ['weight', 'number']]

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



Question: Return the poll source corresponding to the candidate who has the oppose rate.
SQL: SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1