aherntech/spider-syn huggingface dataset:
Database: college_1
Question: Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.
Paraphrased question: Find the forename and degree of all professors who are teaching some class in Computer Info. Systems department.
SQL: SELECT DISTINCT T2.emp_fname ,  T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  'Computer Info. Systems'
Database: college_1
Question: What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?
Paraphrased question: What are the different forename and highest degree attained for professors teaching in the Computer Information Systems department?
SQL: SELECT DISTINCT T2.emp_fname ,  T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  'Computer Info. Systems'
Database: college_1
Question: What is the last name of the student who got a grade A in the class with code 10018.
Paraphrased question: What is the family name of the student who got a grade A in the class with code 10018.
SQL: SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'A' AND T2.class_code  =  10018
Database: college_1
Question: What is the last name of the student who received an A in the class with the code 10018?
Paraphrased question: What is the family name of the student who received an A in the class with the code 10018?
SQL: SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'A' AND T2.class_code  =  10018
Database: college_1
Question: Find the first name and office of history professor who did not get a Ph.D. degree.
Paraphrased question: Find the forename and office of history professor who did not get a Ph.D. degree.
SQL: SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T1.dept_code  =  T3.dept_code WHERE T3.dept_name  =  'History' AND T1.prof_high_degree != 'Ph.D.'
Database: college_1
Question: What are the first names and offices of history professors who don't have Ph.D.s?
Paraphrased question: What are the forename and offices of history professors who don't have Ph.D.s?
SQL: SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T1.dept_code  =  T3.dept_code WHERE T3.dept_name  =  'History' AND T1.prof_high_degree != 'Ph.D.'
Database: college_1
Question: Find the first names of professors who are teaching more than one class.
Paraphrased question: Find the forename of professors who are teaching more than one class.
SQL: SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num GROUP BY T1.prof_num HAVING count(*)  >  1
Database: college_1
Question: What are the first names of all professors who teach more than one class?
Paraphrased question: What are the forename of all professors who teach more than one class?
SQL: SELECT T2.emp_fname FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num GROUP BY T1.prof_num HAVING count(*)  >  1
Database: college_1
Question: Find the first names of students who took exactly one class.
Paraphrased question: Find the forename of students who took exactly one class.
SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num GROUP BY T2.stu_num HAVING count(*)  =  1
Database: college_1
Question: What are the first names of student who only took one course?
Paraphrased question: What are the forename of student who only took one course?
SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num GROUP BY T2.stu_num HAVING count(*)  =  1
Database: college_1
Question: Find the name of department that offers the class whose description has the word "Statistics".
Paraphrased question: Find the name of department that offers the class whose description has the word "Statistics".
SQL: SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'
Database: college_1
Question: What is the name of the department that offers a course that has a description including the word "Statistics"?
Paraphrased question: What is the name of the division that offers a course that has a description including the word "Statistics"?
SQL: SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'
Database: college_1
Question: What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?
Paraphrased question: What is the forename of the student whose last name starting with the letter S and is taking ACCT-211 class?
SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code WHERE T3.crs_code  =  'ACCT-211' AND T1.stu_lname LIKE 'S%'
Database: college_1
Question: What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?
Paraphrased question: What is the forename of the student whose last name starts with the letter S and is taking ACCT-211?
SQL: SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code WHERE T3.crs_code  =  'ACCT-211' AND T1.stu_lname LIKE 'S%'
Database: sports_competition
Question: How many clubs are there?
Paraphrased question: How many clubs are there?
SQL: SELECT count(*) FROM club
Database: sports_competition
Question: What is the total number of clubs?
Paraphrased question: What is the total number of clubs?
SQL: SELECT count(*) FROM club
Database: sports_competition
Question: List the distinct region of clubs in ascending alphabetical order.
Paraphrased question: List the different district of clubs in ascending alphabetical order.
SQL: SELECT DISTINCT Region FROM club ORDER BY Region ASC
Database: sports_competition
Question: What are the different regions of clubs in ascending alphabetical order?
Paraphrased question: What are the different districts of clubs in ascending alphabetical order?
SQL: SELECT DISTINCT Region FROM club ORDER BY Region ASC
Database: sports_competition
Question: What is the average number of gold medals for clubs?
Paraphrased question: What is the average number of gold medals for clubs?
SQL: SELECT avg(Gold) FROM club_rank
Database: sports_competition
Question: What is the average number of gold medals for a club?
Paraphrased question: What is the average number of gold medals for a club?
SQL: SELECT avg(Gold) FROM club_rank
Database: sports_competition
Question: What are the types and countries of competitions?
Paraphrased question: What are the types and nations of competitions?
SQL: SELECT Competition_type ,  Country FROM competition
Database: sports_competition
Question: What are the types of every competition and in which countries are they located?
Paraphrased question: What are the types of every competition and in which nations are they located?
SQL: SELECT Competition_type ,  Country FROM competition
Database: sports_competition
Question: What are the distinct years in which the competitions type is not "Tournament"?
Paraphrased question: What are the different years in which the match type is not "Tournament"?
SQL: SELECT DISTINCT YEAR FROM competition WHERE Competition_type != "Tournament"
Database: sports_competition
Question: What are the different years for all competitions that are not of type equal to tournament?
Paraphrased question: What are the different years for all match that are not of type equal to tournament?
SQL: SELECT DISTINCT YEAR FROM competition WHERE Competition_type != "Tournament"
Database: sports_competition
Question: What are the maximum and minimum number of silver medals for clubs.
Paraphrased question: What are the maximum and minimum number of silver medals for clubs.
SQL: SELECT max(Silver) ,  min(Silver) FROM club_rank
Database: sports_competition
Question: What are the maximum and minimum number of silver medals for all the clubs?
Paraphrased question: What are the maximum and minimum number of silver medals for all the clubs?
SQL: SELECT max(Silver) ,  min(Silver) FROM club_rank
Database: sports_competition
Question: How many clubs have total medals less than 10?
Paraphrased question: How many clubs have total medals less than 10?
SQL: SELECT count(*) FROM club_rank WHERE Total  <  10
Database: sports_competition
Question: What is the total number of clubs that have less than 10 medals in total?
Paraphrased question: What is the total number of clubs that have less than 10 medals in total?
SQL: SELECT count(*) FROM club_rank WHERE Total  <  10
Database: sports_competition
Question: List all club names in ascending order of start year.
Paraphrased question: List all club names in ascending order of start year.
SQL: SELECT name FROM club ORDER BY Start_year ASC
Database: sports_competition
Question: What are the names of all the clubs starting with the oldest?
Paraphrased question: What are the names of all the clubs starting with the oldest?
SQL: SELECT name FROM club ORDER BY Start_year ASC
Database: sports_competition
Question: List all club names in descending alphabetical order.
Paraphrased question: List all club names in descending alphabetical order.
SQL: SELECT name FROM club ORDER BY name DESC
Database: sports_competition
Question: What are the names of all the clubs ordered in descending alphabetical order?
Paraphrased question: What are the names of all the clubs ordered in descending alphabetical order?
SQL: SELECT name FROM club ORDER BY name DESC
Database: sports_competition
Question: Please show the names and the players of clubs.
Paraphrased question: Please show the names and the participants of clubs.
SQL: SELECT T1.name ,  T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID
Database: sports_competition
Question: What are the names and players of all the clubs?
Paraphrased question: What are the names and participants of all the clubs?
SQL: SELECT T1.name ,  T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID
Database: sports_competition
Question: Show the names of clubs that have players with position "Right Wing".
Paraphrased question: Show the names of clubs that have participants with position "Right Wing".
SQL: SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Position  =  "Right Wing"
Database: sports_competition
Question: What are the names of the clubs that have players in the position of "Right Wing"?
Paraphrased question: What are the names of the clubs that have participants in the position of "Right Wing"?
SQL: SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Position  =  "Right Wing"
Database: sports_competition
Question: What is the average points of players from club with name "AIB".
Paraphrased question: What is the average points of players from club with name "AIB".
SQL: SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "AIB"
Database: sports_competition
Question: What is the average number of points for players from the "AIB" club?
Paraphrased question: What is the average number of points for players from the "AIB" club?
SQL: SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "AIB"
Database: sports_competition
Question: List the position of players and the average number of points of players of each position.
Paraphrased question: List the location of players and the average number of points of players of each location.
SQL: SELECT POSITION ,  avg(Points) FROM player GROUP BY POSITION
Database: sports_competition
Question: For each position, what is the average number of points for players in that position?
Paraphrased question: For each location, what is the average number of points for players in that location?
SQL: SELECT POSITION ,  avg(Points) FROM player GROUP BY POSITION
Database: sports_competition
Question: List the position of players with average number of points scored by players of that position bigger than 20.
Paraphrased question: List the location of participants with average number of points scored by players of that location bigger than 20.
SQL: SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20
Database: sports_competition
Question: What are the positions of players whose average number of points scored by that position is larger than 20?
Paraphrased question: What are the locations of participants whose average number of points scored by that location is larger than 20?
SQL: SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20
Database: sports_competition
Question: List the types of competition and the number of competitions of each type.
Paraphrased question: List the categories of match and the number of match of each category.
SQL: SELECT Competition_type ,  COUNT(*) FROM competition GROUP BY Competition_type
Database: sports_competition
Question: What are the types of competition and number of competitions for that type?
Paraphrased question: What are the categories of match and number of match for that category?
SQL: SELECT Competition_type ,  COUNT(*) FROM competition GROUP BY Competition_type
Database: sports_competition
Question: List the most common type of competition.
Paraphrased question: List the most common category of match.
SQL: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
Database: sports_competition
Question: What is the most common competition type?
Paraphrased question: What is the most common match category?
SQL: SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1
Database: sports_competition
Question: List the types of competition that have at most five competitions of that type.
Paraphrased question: List the categories of match that have at most five match of that category.
SQL: SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*)  <=  5
Database: sports_competition
Question: What are the types of competition that have most 5 competitions for that type?
Paraphrased question: What are the categories of match that have most 5 match for that category?
SQL: SELECT Competition_type FROM competition GROUP BY Competition_type HAVING COUNT(*)  <=  5
Database: sports_competition
Question: List the names of clubs that do not have any players.
Paraphrased question: List the names of clubs that do not have any participants.
SQL: SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)
Database: sports_competition
Question: What are the names of all clubs that do not have any players?
Paraphrased question: What are the names of all clubs that do not have any participants?
SQL: SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)
Database: sports_competition
Question: What are the positions with both players having more than 20 points and less than 10 points.
Paraphrased question: What are the locations with both participants having more than 20 points and less than 10 points.
SQL: SELECT POSITION FROM player WHERE Points  >  20 INTERSECT SELECT POSITION FROM player WHERE Points  <  10
Database: sports_competition
Question: What are the positions of both players that have more than 20 20 points and less than 10 points?
Paraphrased question: What are the locations of both players that have more than 20 20 points and less than 10 points?
SQL: SELECT POSITION FROM player WHERE Points  >  20 INTERSECT SELECT POSITION FROM player WHERE Points  <  10
Database: sports_competition
Question: Show total points of all players.
Paraphrased question: Show total points of all participants.
SQL: SELECT sum(Points) FROM player
Database: sports_competition
Question: What is the total number of points for all players?
Paraphrased question: What is the total number of points for all participants?
SQL: SELECT sum(Points) FROM player
Database: sports_competition
Question: how many different positions are there?
Paraphrased question: how many different locations are there?
SQL: SELECT count(DISTINCT POSITION) FROM player
Database: sports_competition
Question: How many different position for players are listed?
Paraphrased question: How many different location for players are listed?
SQL: SELECT count(DISTINCT POSITION) FROM player
Database: sports_competition
Question: what are the name of players who get more than the average points.
Paraphrased question: what are the name of participants who get more than the average points.
SQL: SELECT name FROM player WHERE points  >  (SELECT avg(points) FROM player)
Database: sports_competition
Question: What are the names of all players that got more than the average number of points?
Paraphrased question: What are the names of all participants that got more than the average number of points?
SQL: SELECT name FROM player WHERE points  >  (SELECT avg(points) FROM player)
Database: sports_competition
Question: find the number of players whose points are lower than 30 in each position.
Paraphrased question: find the number of participants whose points are lower than 30 in each location.
SQL: SELECT count(*) ,  POSITION FROM player WHERE points  <  30 GROUP BY POSITION
Database: sports_competition
Question: What is the number of players who have points less than 30 for each position?
Paraphrased question: What is the number of participants who have points less than 30 for each location?
SQL: SELECT count(*) ,  POSITION FROM player WHERE points  <  30 GROUP BY POSITION
Database: sports_competition
Question: which country did participated in the most number of Tournament competitions?
Paraphrased question: which nation did participated in the most number of Tournament competitions?
SQL: SELECT country FROM competition WHERE competition_type  =  'Tournament' GROUP BY country ORDER BY count(*) DESC LIMIT 1
Database: sports_competition
Question: what is the name of the country that participated in the most tournament competitions?
Paraphrased question: what is the name of the nation that participated in the most tournament competitions?
SQL: SELECT country FROM competition WHERE competition_type  =  'Tournament' GROUP BY country ORDER BY count(*) DESC LIMIT 1
Database: sports_competition
Question: which countries did participated in both Friendly and Tournament type competitions.
Paraphrased question: which nations did participated in both Friendly and Tournament type competitions.
SQL: SELECT country FROM competition WHERE competition_type  =  'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type  =  'Tournament'
Database: sports_competition
Question: What are the countries that participated in both friendly and tournament type competitions?
Paraphrased question: What are the nations that participated in both friendly and tournament type competitions?
SQL: SELECT country FROM competition WHERE competition_type  =  'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type  =  'Tournament'
Database: sports_competition
Question: Find the countries that have never participated in any competition with Friendly type.
Paraphrased question: Find the nations that have never participated in any match with Friendly type.
SQL: SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type  =  'Friendly'
Database: sports_competition
Question: What are the countries that have never participated in any friendly-type competitions?
Paraphrased question: What are the nations that have never participated in any friendly-type competitions?
SQL: SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type  =  'Friendly'
Database: manufacturer
Question: How many furniture components are there in total?
Paraphrased question: How many furnishing components are there in total?
SQL: SELECT sum(num_of_component) FROM furniture
Database: manufacturer
Question: Return the name and id of the furniture with the highest market rate.
Paraphrased question: Return the name and id of the furnishing with the highest market rate.
SQL: SELECT name ,  furniture_id FROM furniture ORDER BY market_rate DESC LIMIT 1
Database: manufacturer
Question: find the total market rate of the furnitures that have the top 2 market shares.
Paraphrased question: find the total market rate of the furnishings that have the top 2 market shares.
SQL: SELECT sum(market_rate) FROM furniture ORDER BY market_rate DESC LIMIT 2
Database: manufacturer
Question: Find the component amounts and names of all furnitures that have more than 10 components.
Paraphrased question: Find the component amounts and names of all furnishings that have more than 10 components.
SQL: SELECT Num_of_Component ,  name FROM furniture WHERE Num_of_Component  >  10
Database: manufacturer
Question: Find the name and component amount of the least popular furniture.
Paraphrased question: Find the name and component amount of the least popular furnishing.
SQL: SELECT name ,  Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1
Database: manufacturer
Question: Find the names of furnitures whose prices are lower than the highest price.
Paraphrased question: Find the names of furnishings whose prices are lower than the highest price.
SQL: SELECT t1.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID WHERE t2.Price_in_Dollar  <  (SELECT max(Price_in_Dollar) FROM furniture_manufacte)
Database: manufacturer
Question: Which manufacturer has the most number of shops? List its name and year of opening.
Paraphrased question: Which manufacturer has the most number of shops? List its name and year of opening.
SQL: SELECT open_year ,  name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1
Database: manufacturer
Question: Find the average number of factories for the manufacturers that have more than 20 shops.
Paraphrased question: Find the average number of manufactories for the manufacturers that have more than 20 shops.
SQL: SELECT avg(Num_of_Factories) FROM manufacturer WHERE num_of_shops  >  20
Database: manufacturer
Question: List all manufacturer names and ids ordered by their opening year.
Paraphrased question: List all manufacturer names and ids ordered by their opening year.
SQL: SELECT name ,  manufacturer_id FROM manufacturer ORDER BY open_year
Database: manufacturer
Question: Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.
Paraphrased question: Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.
SQL: SELECT name ,  open_year FROM manufacturer WHERE num_of_shops  >  10 OR Num_of_Factories  <  10
Database: manufacturer
Question: what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.
Paraphrased question: what is the average number of manufactories and maximum number of stores for manufacturers that opened before 1990.
SQL: SELECT max(num_of_shops) ,  avg(Num_of_Factories) FROM manufacturer WHERE open_year  <  1990
Database: manufacturer
Question: Find the id and number of shops for the company that produces the most expensive furniture.
Paraphrased question: Find the id and number of stores for the company that produces the most expensive furniture.
SQL: SELECT t1.manufacturer_id ,  t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id  =  t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1
Database: manufacturer
Question: Find the number of funiture types produced by each manufacturer as well as the company names.
Paraphrased question: Find the number of furnishing types produced by each manufacturer as well as the company names.
SQL: SELECT count(*) ,  t1.name FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id  =  t2.manufacturer_id GROUP BY t1.manufacturer_id
Database: manufacturer
Question: Give me the names and prices of furnitures which some companies are manufacturing.
Paraphrased question: Give me the names and prices of furnishings which some companies are manufacturing.
SQL: SELECT t1.name ,  t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID
Database: manufacturer
Question: Find the market shares and names of furnitures which no any company is producing in our records.
Paraphrased question: Find the market shares and names of furnishings which no any company is producing in our records.
SQL: SELECT Market_Rate ,  name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte)
Database: manufacturer
Question: Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.
Paraphrased question: Find the name of the company that produces both furnishings with less than 6 components and furnishings with more than 10 components.
SQL: SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id  =  t3.manufacturer_id WHERE t1.num_of_component  <  6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id  =  t3.manufacturer_id WHERE t1.num_of_component  >  10
Database: hr_1
Question: Display the first name and department name for each employee.
Paraphrased question: Display the forename and division name for each staff.
SQL: SELECT T1.first_name ,  T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id
Database: hr_1
Question: What are the first name and department name of all employees?
Paraphrased question: What are the forename and division name of all staffs?
SQL: SELECT T1.first_name ,  T2.department_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id
Database: hr_1
Question: List the full name (first and last name), and salary for those employees who earn below 6000.
Paraphrased question: List the full name (first and last name), and wage for those employees who earn below 6000.
SQL: SELECT first_name ,  last_name ,  salary FROM employees WHERE salary  <  6000
Database: hr_1
Question: What are the full names and salaries for any employees earning less than 6000?
Paraphrased question: What are the full names and wages for any employees earning less than 6000?
SQL: SELECT first_name ,  last_name ,  salary FROM employees WHERE salary  <  6000
Database: hr_1
Question: Display the first name, and department number for all employees whose last name is "McEwen".
Paraphrased question: Display the forename, and division number for all employees whose last name is "McEwen".
SQL: SELECT first_name ,  department_id FROM employees WHERE last_name  =  'McEwen'
Database: hr_1
Question: What are the first names and department numbers for employees with last name McEwen?
Paraphrased question: What are the forename and division numbers for staffs with last name McEwen?
SQL: SELECT first_name ,  department_id FROM employees WHERE last_name  =  'McEwen'
Database: hr_1
Question: Return all the information for all employees without any department number.
Paraphrased question: Return all the information for all staffs without any division number.
SQL: SELECT * FROM employees WHERE department_id  =  "null"
Database: hr_1
Question: What are all the employees without a department number?
Paraphrased question: What are all the staffs without a division number?
SQL: SELECT * FROM employees WHERE department_id  =  "null"
Database: hr_1
Question: Display all the information about the department Marketing.
Paraphrased question: Display all the information about the division Marketing.
SQL: SELECT * FROM  departments WHERE department_name  =  'Marketing'
Database: hr_1
Question: What is all the information about the Marketing department?
Paraphrased question: What is all the information about the Marketing division?
SQL: SELECT * FROM  departments WHERE department_name  =  'Marketing'
Database: hr_1
Question: when is the hire date for those employees whose first name does not containing the letter M?
Paraphrased question: when is the day of hire for those staffs whose first name does not containing the letter M?
SQL: SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%'
Database: hr_1
Question: On what dates were employees without the letter M in their first names hired?
Paraphrased question: On what day were staffs without the letter M in their first names hired?
SQL: SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%'
Database: hr_1
Question: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M.
Paraphrased question: display the full name (first and last), day of hire, wage, and division number for those employees whose forename does not containing the letter M.
SQL: SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '%M%'
Database: hr_1
Question: What are the full name, hire date, salary, and department id for employees without the letter M in their first name?
Paraphrased question: What are the full name, day of hire, wage, and division id for employees without the letter M in their forename?
SQL: SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '%M%'
Database: hr_1
Question: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number.
Paraphrased question: display the full name (first and last), day of hire, wage, and division number for those employees whose forename does not containing the letter M and make the result set in ascending order by division number.
SQL: SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '%M%' ORDER BY department_id
Database: hr_1
Question: What are the full name, hire data, salary and department id for employees without the letter M in their first name, ordered by ascending department id?
Paraphrased question: What are the full name, day of hire, wage and division id for employees without the letter M in their forename, ordered by ascending division id?
SQL: SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '%M%' ORDER BY department_id
Database: hr_1
Question: what is the phone number of employees whose salary is in the range of 8000 and 12000?
Paraphrased question: what is the telephone number of staffs whose salary is in the range of 8000 and 12000?
SQL: SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000
Database: hr_1
Question: Return the phone numbers of employees with salaries between 8000 and 12000.
Paraphrased question: Return the telephone numbers of staffs with salaries between 8000 and 12000.
SQL: SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000
Database: hr_1
Question: display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40.
Paraphrased question: display all the information of staffs whose salary is in the range of 8000 and 12000 and commission is not null or division number does not equal to 40.
SQL: SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != "null" OR  department_id != 40
Database: hr_1
Question: Return all information about employees with salaries between 8000 and 12000 for which commission is not null or where their department id is not 40.
Paraphrased question: Return all information about staffs with salaries between 8000 and 12000 for which commission is not null or where their division id is not 40.
SQL: SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != "null" OR  department_id != 40
Database: hr_1
Question: What are the full name (first and last name) and salary for all employees who does not have any value for commission?
Paraphrased question: What are the full name (first and last name) and wage for all employees who does not have any value for commission?
SQL: SELECT first_name ,  last_name ,  salary FROM  employees WHERE commission_pct  =  "null"
Database: hr_1
Question: Return the full names and salaries of employees with null commissions.
Paraphrased question: Return the full names and wages of employees with null commissions.
SQL: SELECT first_name ,  last_name ,  salary FROM  employees WHERE commission_pct  =  "null"
Database: hr_1
Question: Display the first and last name, and salary for those employees whose first name is ending with the letter m.
Paraphrased question: Display the forename and surname, and wage for those employees whose forename is ending with the letter m.
SQL: SELECT first_name ,  last_name ,  salary FROM employees WHERE first_name LIKE '%m'
Database: hr_1
Question: Return the full names and salaries for employees with first names that end with the letter m.
Paraphrased question: Return the full names and wages for employees with forename that end with the letter m.
SQL: SELECT first_name ,  last_name ,  salary FROM employees WHERE first_name LIKE '%m'
Database: hr_1
Question: Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.
Paraphrased question: Find job id and day of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.
SQL: SELECT job_id ,  hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'
Database: hr_1
Question: What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?
Paraphrased question: What are the job ids and day of hire for employees hired after November 5th, 2007 and before July 5th, 2009?
SQL: SELECT job_id ,  hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'
Database: hr_1
Question: What are the first and last name for those employees who works either in department 70 or 90?
Paraphrased question: What are the forename and family name for those employees who works either in division 70 or 90?
SQL: SELECT first_name ,  last_name FROM employees WHERE department_id  =  70 OR department_id  =  90
Database: hr_1
Question: What are the full names of employees who with in department 70 or 90?
Paraphrased question: What are the full names of employees who with in division 70 or 90?
SQL: SELECT first_name ,  last_name FROM employees WHERE department_id  =  70 OR department_id  =  90
Database: hr_1
Question: Find the salary and manager number for those employees who is working under a manager.
Paraphrased question: Find the wage and head number for those employees who is working under a manager.
SQL: SELECT salary ,  manager_id FROM employees WHERE manager_id != "null"
Database: hr_1
Question: What are the salaries and manager ids for employees who have managers?
Paraphrased question: What are the wages and head ids for employees who have heads?
SQL: SELECT salary ,  manager_id FROM employees WHERE manager_id != "null"
Database: hr_1
Question: display all the details from Employees table for those employees who was hired before 2002-06-21.
Paraphrased question: display all the details from staffs table for those staffs who was hired before 2002-06-21.
SQL: SELECT * FROM employees WHERE hire_date  <  '2002-06-21'
Database: hr_1
Question: What is all the information about employees hired before June 21, 2002?
Paraphrased question: What is all the information about staffs hired before June 21, 2002?
SQL: SELECT * FROM employees WHERE hire_date  <  '2002-06-21'
Database: hr_1
Question: display all the information for all employees who have the letters D or S in their first name and also arrange the result in descending order by salary.
Paraphrased question: display all the information for all staffs who have the letters D or S in their first name and also arrange the result in descending order by salary.
SQL: SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC
Database: hr_1
Question: What is all the information about employees with D or S in their first name, ordered by salary descending?
Paraphrased question: What is all the information about staffs with D or S in their first name, ordered by salary descending?
SQL: SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC
Database: hr_1
Question: display those employees who joined after 7th September, 1987.
Paraphrased question: display those staffs who joined after 7th September, 1987.
SQL: SELECT * FROM employees WHERE hire_date  >  '1987-09-07'
Database: hr_1
Question: Which employees were hired after September 7th, 1987?
Paraphrased question: Which staffs were hired after September 7th, 1987?
SQL: SELECT * FROM employees WHERE hire_date  >  '1987-09-07'
Database: hr_1
Question: display the job title of jobs which minimum salary is greater than 9000.
Paraphrased question: display the occupation name of occupations which minimum salary is greater than 9000.
SQL: SELECT job_title FROM jobs WHERE min_salary  >  9000
Database: hr_1
Question: Which job titles correspond to jobs with salaries over 9000?
Paraphrased question: Which occupation name correspond to occupations with salaries over 9000?
SQL: SELECT job_title FROM jobs WHERE min_salary  >  9000
Database: hr_1
Question: display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.
Paraphrased question: display occupation name, the difference between minimum and maximum wage for those occupations which max wage within the range 12000 to 18000.
SQL: SELECT job_title ,  max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000
Database: hr_1
Question: What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?
Paraphrased question: What are the occupation name, and range of wage for occupations with maximum wage between 12000 and 18000?
SQL: SELECT job_title ,  max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000
Database: hr_1
Question: display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50.
Paraphrased question: display the emails of the staffs who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50.
SQL: SELECT email FROM employees WHERE commission_pct  =  "null" AND salary BETWEEN 7000 AND 12000 AND department_id = 50
Database: hr_1
Question: What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50?
Paraphrased question: What are the emails of staffs with null commission, salary between 7000 and 12000, and who work in department 50?
SQL: SELECT email FROM employees WHERE commission_pct  =  "null" AND salary BETWEEN 7000 AND 12000 AND department_id = 50
Database: hr_1
Question: display the employee ID for each employee and the date on which he ended his previous job.
Paraphrased question: display the staffs ID for each staff and the date on which he ended his previous job.
SQL: SELECT employee_id ,  MAX(end_date) FROM job_history GROUP BY employee_id
Database: hr_1
Question: What are the employee ids for each employee and final dates of employment at their last job?
Paraphrased question: What are the staff ids for each staff and final dates of employment at their last job?
SQL: SELECT employee_id ,  MAX(end_date) FROM job_history GROUP BY employee_id
Database: hr_1
Question: display those departments where more than ten employees work who got a commission percentage.
Paraphrased question: display those divisions where more than ten staffs work who got a commission percentage.
SQL: SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10
Database: hr_1
Question: What are the department ids for which more than 10 employees had a commission?
Paraphrased question: What are the division ids for which more than 10 staffs had a commission?
SQL: SELECT department_id FROM employees GROUP BY department_id HAVING COUNT(commission_pct) > 10
Database: hr_1
Question: Find the ids of the departments where any manager is managing 4 or more employees.
Paraphrased question: Find the ids of the divisions where any manager is managing 4 or more staffs.
SQL: SELECT DISTINCT department_id FROM employees GROUP BY department_id ,  manager_id HAVING COUNT(employee_id)  >= 4
Database: hr_1
Question: What are department ids for departments with managers managing more than 3 employees?
Paraphrased question: What are division ids for divisions with managers managing more than 3 staffs?
SQL: SELECT DISTINCT department_id FROM employees GROUP BY department_id ,  manager_id HAVING COUNT(employee_id)  >= 4
Database: hr_1
Question: display the average salary of employees for each department who gets a commission percentage.
Paraphrased question: display the average wage of staffs for each division who gets a commission percentage.
SQL: SELECT department_id ,  AVG(salary) FROM employees WHERE commission_pct != "null" GROUP BY department_id
Database: hr_1
Question: What is the average salary of employees who have a commission percentage that is not null?
Paraphrased question: What is the average wage of staffs who have a commission percentage that is not null?
SQL: SELECT department_id ,  AVG(salary) FROM employees WHERE commission_pct != "null" GROUP BY department_id
Database: hr_1
Question: display the country ID and number of cities for each country.
Paraphrased question: display the nation ID and number of cities for each nation.
SQL: SELECT country_id ,  COUNT(*) FROM locations GROUP BY country_id
Database: hr_1
Question: Give the country id and corresponding count of cities in each country.
Paraphrased question: Give the nation id and corresponding count of cities in each nation.
SQL: SELECT country_id ,  COUNT(*) FROM locations GROUP BY country_id
Database: hr_1
Question: display job ID for those jobs that were done by two or more for more than 300 days.
Paraphrased question: display occupation ID for those occupations that were done by two or more for more than 300 days.
SQL: SELECT job_id FROM job_history WHERE end_date - start_date  > 300 GROUP BY job_id HAVING COUNT(*) >= 2
Database: hr_1
Question: What are the job ids for jobs done more than once for a period of more than 300 days?
Paraphrased question: What are the occupation ids for occupations done more than once for a period of more than 300 days?
SQL: SELECT job_id FROM job_history WHERE end_date - start_date  > 300 GROUP BY job_id HAVING COUNT(*) >= 2
Database: hr_1
Question: display the ID for those employees who did two or more jobs in the past.
Paraphrased question: display the ID for those staffs who did two or more jobs in the past.
SQL: SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*)  >= 2
Database: hr_1
Question: What are the employee ids for employees who have held two or more jobs?
Paraphrased question: What are the staff ids for staffs who have held two or more jobs?
SQL: SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*)  >= 2
Database: hr_1
Question: Find employee with ID and name of the country presently where (s)he is working.
Paraphrased question: Find staff with ID and name of the country presently where (s)he is working.
SQL: SELECT T1.employee_id ,  T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id JOIN countries AS T4 ON T3.country_id  =  T4.country_id
Database: hr_1
Question: What are all the employee ids and the names of the countries in which they work?
Paraphrased question: What are all the staff ids and the names of the countries in which they work?
SQL: SELECT T1.employee_id ,  T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id JOIN countries AS T4 ON T3.country_id  =  T4.country_id
Database: hr_1
Question: display the department name and number of employees in each of the department.
Paraphrased question: display the division name and number of staffs in each of the division.
SQL: SELECT T2.department_name ,  COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id GROUP BY T2.department_name
Database: hr_1
Question: Give the name of each department and the number of employees in each.
Paraphrased question: Give the name of each division and the number of staffs in each.
SQL: SELECT T2.department_name ,  COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id GROUP BY T2.department_name
Database: hr_1
Question: Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000?
Paraphrased question: Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000?
SQL: SELECT * FROM  job_history AS T1 JOIN employees AS T2 ON T1.employee_id  =  T2.employee_id WHERE T2.salary  >=  12000
Database: hr_1
Question: What is all the job history info done by employees earning a salary greater than or equal to 12000?
Paraphrased question: What is all the job history info done by employees earning a salary greater than or equal to 12000?
SQL: SELECT * FROM  job_history AS T1 JOIN employees AS T2 ON T1.employee_id  =  T2.employee_id WHERE T2.salary  >=  12000
Database: hr_1
Question: display job title and average salary of employees.
Paraphrased question: display occupation name and average wage of staffs.
SQL: SELECT job_title ,  AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id  =  T2.job_id GROUP BY T2.job_title
Database: hr_1
Question: What is the average salary for each job title?
Paraphrased question: What is the average wage for each occupation name?
SQL: SELECT job_title ,  AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id  =  T2.job_id GROUP BY T2.job_title
Database: hr_1
Question: What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?
Paraphrased question: What is the full name ( first name and last name ) for those staffs who gets more salary than the staff whose id is 163?
SQL: SELECT first_name ,  last_name FROM employees WHERE salary  >  (SELECT salary FROM employees WHERE employee_id = 163 )
Database: hr_1
Question: Provide the full names of employees earning more than the employee with id 163.
Paraphrased question: Provide the full names of staffs earning more than the staff with id 163.
SQL: SELECT first_name ,  last_name FROM employees WHERE salary  >  (SELECT salary FROM employees WHERE employee_id = 163 )
Database: hr_1
Question: return the smallest salary for every departments.
Paraphrased question: return the smallest wage for every divisions.
SQL: SELECT MIN(salary) ,  department_id FROM employees GROUP BY department_id
Database: hr_1
Question: What is the minimum salary in each department?
Paraphrased question: What is the minimum wage in each division?
SQL: SELECT MIN(salary) ,  department_id FROM employees GROUP BY department_id
Database: hr_1
Question: Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments.
Paraphrased question: Find the forename and surname and division id for those employees who earn such amount of salary which is the smallest salary of any of the divisions.
SQL: SELECT first_name ,  last_name ,  department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)