1sf/bird-sql-train-with-schema huggingface dataset:
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: What is the average salary of the employees who work as a Trainee?
Evidence: average = DIVIDE( SUM(salary), COUNT(positiontitle) where positiontitle = 'Trainee'; Trainee is a position title
SQL: SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) AS avg FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: By what percentage is the average salary of Trainees higher than the minimum salary of this postion?
Evidence: AVG(salary); Trainee is a position title; minimum salary refers to minsalary; calculation = DIVIDE(SUBTRACT(AVG(salary), minsalary), minsalary) * 100
SQL: SELECT 100 * (AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) - CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL) AS per FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Give the number of female employees.
Evidence: number of female employees means COUNT(gender = 'F')
SQL: SELECT COUNT(*) FROM employee WHERE gender = 'F'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: State the name of the city where Jose Rodriguez works.
Evidence: Jose Rodriguez is the fullname of an employee; full name = firstname, lastname; name of city refers to locationcity
SQL: SELECT T2.locationcity FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.firstname = 'Jose' AND T1.lastname = 'Rodriguez'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: In which state does Emily Wood work?
Evidence: Emily Wood is the full name of an employee; full name = firstname, lastname;
SQL: SELECT T2.state FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.firstname = 'Emily' AND T1.lastname = 'Wood'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: What is the education required for David Whitehead to reach his current position?
Evidence: David Whitehead is the full name of an employee; full name = firstname, lastname
SQL: SELECT T2.educationrequired FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.firstname = 'David' AND T1.lastname = 'Whitehead' AND T1.gender = 'M'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: How many employees are there in the "Miami" office?
Evidence: Miami office refers to locationcity = 'Miami'
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Miami'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Who is the highest paid employee in "Boston"? Give the full name.
Evidence: Boston refers to locationcity = 'Boston'; the highest paid employee refers to MAX(salary); full name = firstname, lastname
SQL: SELECT T1.firstname, T1.lastname FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Boston' ORDER BY T1.salary DESC LIMIT 1
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Who is the employee in “New York City” with a good performance? Give the social security number of the employee.
Evidence: New York City refers to locationcity = 'New York City'; good performance refers to performance = 'Good'; social security number refers to ssn
SQL: SELECT T1.firstname, T1.lastname, T1.ssn FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.locationcity = 'New York City' AND T1.performance = 'Good'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: How many "account representatives" are there in Chicago with a good performance?
Evidence: account representatives is a position title; Chicago refers to locationcity = 'Chicago'; good performance refers to performance = 'Good'
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Representative' AND T2.locationcity = 'Chicago' AND T1.performance = 'Good'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: What is Kenneth Charles's position title?
Evidence: Kenneth Charles is the full name of an employee; full name = firstname, lastname
SQL: SELECT T2.positiontitle FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.firstname = 'Kenneth' AND T1.lastname = 'Charles'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Give the full address of the office of the highest paid manager.
Evidence: the highest paid refers to MAX(salary); manager is a position title
SQL: SELECT T2.address FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Manager' ORDER BY T1.salary DESC LIMIT 1
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: What is the max salary for 'Tracy Coulter' if he/she stays on his/her position?
Evidence: Tracy Coulter is the full name of an employee; full name = firstname, lastname
SQL: SELECT T2.maxsalary FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.firstname = 'Tracy' AND T1.lastname = 'Coulter'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: If Jose Rodriguez tried his best, how many percentage can his salary raise without changing his position?
Evidence: Jose Rodriguez is the full name of an employee; full name = firstname, lastname; calculation = DIVIDE(SUBTRACT(maxsalary, salary), salary) * 100
SQL: SELECT 100 * (CAST(REPLACE(SUBSTR(T2.maxsalary, 4), ',', '') AS REAL) - CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) / CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) AS per FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.firstname = 'Jose' AND T1.lastname = 'Rodriguez'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: How many employees whose performance is poor have a salary of over $50,000 per year?
Evidence: performance is poor refers to performance = 'Poor'; salary of over $50,000 refers to salary > '50000'
SQL: SELECT COUNT(*) FROM employee WHERE performance = 'Poor' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 50000
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Who is the employee with the highest salary? Specify his/her full name.
Evidence: the highest salary refers to MAX(salary); full name = firstname, lastname
SQL: SELECT firstname, lastname FROM employee WHERE CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) = ( SELECT MAX(CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL)) FROM employee )
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: How many positions have a maximum salary of no more than US$1000,000?
Evidence: maximum salary of no more than US$1000,000 refers to maxsalary < '100000';
SQL: SELECT COUNT(*) FROM position WHERE CAST(REPLACE(SUBSTR(maxsalary, 4), ',', '') AS REAL) < 100000
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: How much is the salary of the first ever employee that was hired?
Evidence: first-ever employee that was hired refers to MIN(hiredate)
SQL: SELECT salary FROM employee ORDER BY hiredate ASC LIMIT 1
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: How much is the minimum salary given to the position with the most complex work?
Evidence: most complex work refers to MAX(educationrequired); minimum salary refers to minsalary
SQL: SELECT minsalary FROM position ORDER BY educationrequired DESC LIMIT 1
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: What is the full office location address where most of the employees work at?
Evidence: full office location address = address, locationcity, state, zipcode; location where most employees work at refers to MAX(locationID)
SQL: SELECT T2.address, T2.locationcity, T2.state, T2.zipcode FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID GROUP BY T2.address, T2.locationcity, T2.state, T2.zipcode ORDER BY COUNT(*) DESC LIMIT 1
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: What is the average salary of all employees with a 2 year degree position?
Evidence: 2 year degree refers to educationrequired = '2 year degree'; calculation = DIVIDE(SUM(salary), COUNT(positiontitle))
SQL: SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.educationrequired = '2 year degree'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: How many male Regional Managers are there?
Evidence: male refers to gender = 'M'; Regional Managers is a position title
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Regional Manager' AND T1.gender = 'M'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Which position has the highest amount of poor performing employees?
Evidence: poor performing employees refers to performance = 'Poor'; the highest amount of employees refers to MAX(positiontitle)
SQL: SELECT T2.positiontitle FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.performance = 'Poor' GROUP BY T2.positiontitle ORDER BY COUNT(T2.positiontitle) DESC LIMIT 1
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Which position has the highest number of female employees with a 2 year degree?
Evidence: 2 year degree refers to educationrequired = '2 year degree'; female refers to gender = 'F'; the highest number of employees refers to MAX(positionID)
SQL: SELECT T2.positiontitle FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.educationrequired = '2 year degree' AND T1.gender = 'F' GROUP BY T2.positiontitle ORDER BY COUNT(T2.positiontitle) DESC LIMIT 1
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: How many Account Representatives are there in Illinois with satisfying performance?
Evidence: Account Representatives is a position title; satisfying performance mostly refers togood performance
SQL: SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Representative' AND T1.performance = 'Good' AND T2.state = 'IL'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: What is the average salary of the worst performing managers?
Evidence: the worst performing refers to performance = 'Poor'; manager is a positiontitle; average salary refers to AVG(salary)
SQL: SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) FROM employee AS T1 INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.performance = 'Poor' AND T2.positiontitle = 'Manager'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: In which state can you find the highest amount of good performing Account Representatives?
Evidence: good performing refers to performance = 'Good'; Account Representatives is a positiontitle; highest amount of employee refers to MAX(positionID);
SQL: SELECT T2.state FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Representative' AND T1.performance = 'Good' GROUP BY T2.state ORDER BY COUNT(T2.state) DESC LIMIT 1
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Mention the employee's full name and performance status who got the lowest in salary per year.
Evidence: full name = firstname, lastname; the lowest salary refers to MIN(salary)
SQL: SELECT firstname, lastname, performance FROM employee ORDER BY salary ASC LIMIT 1
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: List the location cities in the Western states.
Evidence: Western states refers to state = 'CO' OR state = 'UT' OR state = 'CA'; location cities refers to locationcity
SQL: SELECT locationcity FROM location WHERE state IN ('CO', 'UT', 'CA')
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Which city and address has zip code of above 90000?
Evidence: zip code of above 90000 refers to zipcode > 90000; city refers to locationcity
SQL: SELECT locationcity, address FROM location WHERE zipcode > 90000
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Which positions are suitable with 4 years degree education?
Evidence: 4 years degree education refers to educationrequired = '4 year degree'; positions refers to positiontitle
SQL: SELECT positiontitle FROM position WHERE educationrequired = '4 year degree'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: What is the maximum salary of position "Trainer"?
Evidence: maximum salary refers to maxsalary; Trainee is a positiontitle
SQL: SELECT maxsalary FROM position WHERE positiontitle = 'Trainee'