sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 courses are there in total?
SQL: SELECT count(*) FROM COURSE
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 courses.
SQL: SELECT count(*) FROM COURSE
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 courses have more than 2 credits?
SQL: SELECT count(*) FROM COURSE WHERE Credits  >  2
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 courses with more than 2 credits.
SQL: SELECT count(*) FROM COURSE WHERE Credits  >  2
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', 'number']]

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



Question: List all names of courses with 1 credit?
SQL: SELECT CName FROM COURSE WHERE Credits  =  1
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', 'number']]

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



Question: What are the names of courses with 1 credit?
SQL: SELECT CName FROM COURSE WHERE Credits  =  1
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 courses are taught on days MTW?
SQL: SELECT CName FROM COURSE WHERE Days  =  "MTW"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 course names for courses taught on MTW?
SQL: SELECT CName FROM COURSE WHERE Days  =  "MTW"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 departments in Division "AS"?
SQL: SELECT count(*) FROM DEPARTMENT WHERE Division  =  "AS"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 departments are in the division AS?
SQL: SELECT count(*) FROM DEPARTMENT WHERE Division  =  "AS"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 phones of departments in Room 268?
SQL: SELECT DPhone FROM DEPARTMENT WHERE Room  =  268
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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: Give the phones for departments in room 268.
SQL: SELECT DPhone FROM DEPARTMENT WHERE Room  =  268
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 students that have at least one grade "B".
SQL: SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade  =  "B"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 students have had at least one "B" grade?
SQL: SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade  =  "B"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 max and min grade point for all letter grade.
SQL: SELECT max(gradepoint) ,  min(gradepoint) FROM GRADECONVERSION
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 maximum and minumum grade points?
SQL: SELECT max(gradepoint) ,  min(gradepoint) FROM GRADECONVERSION
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 of students whose first names contain letter "a".
SQL: SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 names for students who have an "a" in their first name?
SQL: SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 male (sex is M) faculties who live in building NEB.
SQL: SELECT Fname ,  Lname FROM FACULTY WHERE sex  =  "M" AND Building  =  "NEB"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 full names of faculties with sex M and who live in building NEB?
SQL: SELECT Fname ,  Lname FROM FACULTY WHERE sex  =  "M" AND Building  =  "NEB"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 rooms of faculties with rank professor who live in building NEB.
SQL: SELECT Room FROM FACULTY WHERE Rank  =  "Professor" AND Building  =  "NEB"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 rooms for members of the faculty who are professors and who live in building NEB?
SQL: SELECT Room FROM FACULTY WHERE Rank  =  "Professor" AND Building  =  "NEB"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 department name that is in Building "Mergenthaler".
SQL: SELECT DName FROM DEPARTMENT WHERE Building  =  "Mergenthaler"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 department in the Building Mergenthaler?
SQL: SELECT DName FROM DEPARTMENT WHERE Building  =  "Mergenthaler"
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', 'number']]

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



Question: List all information about courses sorted by credits in the ascending order.
SQL: SELECT * FROM COURSE ORDER BY Credits
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 all the information about courses, ordered by credits ascending?
SQL: SELECT * FROM COURSE ORDER BY Credits
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 course name of courses sorted by credits.
SQL: SELECT CName FROM COURSE ORDER BY Credits
-- Language PostgreSQL
        -- Tables: 
             -- Table: student 
columns : [['student id', 'number'], ['last name', 'text'], ['first name', 'text'], ['age', 'number'], ['sex', 'text'], ['major', 'number'], ['advisor', 'number'], ['city code', 'text']]

 -- Table: faculty 
columns : [['faculty id', 'number'], ['last name', 'text'], ['first name', 'text'], ['rank', 'text'], ['sex', 'text'], ['phone', 'number'], ['room', 'text'], ['building', 'text']]

 -- Table: department 
columns : [['department number', 'number'], ['division', 'text'], ['department name', 'text'], ['room', 'text'], ['building', 'text'], ['department phone', 'number']]

 -- Table: member of 
columns : [['faculty id', 'number'], ['department number', 'number'], ['appt type', 'text']]

 -- Table: course 
columns : [['course id', 'text'], ['course name', 'text'], ['credits', 'number'], ['instructor', 'number'], ['days', 'text'], ['hours', 'text'], ['department number', 'number']]

 -- Table: minor in 
columns : [['student id', 'number'], ['department number', 'number']]

 -- Table: enrolled in 
columns : [['student id', 'number'], ['course id', 'text'], ['grade', 'text']]

 -- Table: grade conversion 
columns : [['letter grade', 'text'], ['grade point', '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 course names, ordered by credits?
SQL: SELECT CName FROM COURSE ORDER BY Credits