aherntech/spider-syn huggingface dataset:
Database: college_3
Question: What are the full names and gradepoints for all enrollments?
Paraphrased question: What are the full names and gradepoints for all enrollments?
SQL: SELECT T3.Fname ,  T3.LName ,  T2.gradepoint FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade  =  T2.lettergrade AND T1.StuID  =  T3.StuID
Database: college_3
Question: Find the distinct student first names of all students that have grade point at least 3.8 in one course.
Paraphrased question: Find the different student forenames of all students that have grade point at least 3.8 in one course.
SQL: SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade  =  T2.lettergrade AND T1.StuID  =  T3.StuID WHERE T2.gradepoint  >=  3.8
Database: college_3
Question: What are the distinct first names for students with a grade point of 3.8 or above in at least one course?
Paraphrased question: What are the different forenames for students with a grade point of 3.8 or above in at least one course?
SQL: SELECT DISTINCT T3.Fname FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade  =  T2.lettergrade AND T1.StuID  =  T3.StuID WHERE T2.gradepoint  >=  3.8
Database: college_3
Question: Find the full names of faculties who are members of department with department number 520.
Paraphrased question: Find the full names of faculties who are members of department with department number 520.
SQL: SELECT T1.Fname ,  T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID  =  T2.FacID WHERE T2.DNO  =  520
Database: college_3
Question: What are the full names of faculty members who are a part of department 520?
Paraphrased question: What are the full names of faculty members who are a part of department 520?
SQL: SELECT T1.Fname ,  T1.Lname FROM FACULTY AS T1 JOIN MEMBER_OF AS T2 ON T1.FacID  =  T2.FacID WHERE T2.DNO  =  520
Database: college_3
Question: What are the first names and last names of the students that minor in the department with DNO 140.
Paraphrased question: What are the forenames and family names of the students that minor in the department with DNO 140.
SQL: SELECT T2.Fname ,  T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID  =  T2.StuID WHERE T1.DNO  =  140
Database: college_3
Question: What are the full names of students minoring in department 140?
Paraphrased question: What are the full names of students minoring in department 140?
SQL: SELECT T2.Fname ,  T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID  =  T2.StuID WHERE T1.DNO  =  140
Database: college_3
Question: Find the last names of faculties who are members of computer science department.
Paraphrased question: Find the family names of faculties who are members of computer science department.
SQL: SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO  =  T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID  =  T3.FacID WHERE T1.DName  =  "Computer Science"
Database: college_3
Question: What are the last names of faculty who are part of the computer science department?
Paraphrased question: What are the family names of teacher who are part of the computer science department?
SQL: SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO  =  T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID  =  T3.FacID WHERE T1.DName  =  "Computer Science"
Database: college_3
Question: Find the average grade point of student whose last name is Smith.
Paraphrased question: Find the average grade point of student whose family name is Smith.
SQL: SELECT avg(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade  =  T2.lettergrade AND T1.StuID  =  T3.StuID WHERE T3.LName  =  "Smith"
Database: college_3
Question: What is the average gradepoint for students with the last name Smith?
Paraphrased question: What is the average gradepoint for students with the surname Smith?
SQL: SELECT avg(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade  =  T2.lettergrade AND T1.StuID  =  T3.StuID WHERE T3.LName  =  "Smith"
Database: college_3
Question: What is the maximum and minimum grade point of students who live in NYC?
Paraphrased question: What is the maximum and minimum grade point of students who live in NYC?
SQL: SELECT max(T2.gradepoint) ,  min(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade  =  T2.lettergrade AND T1.StuID  =  T3.StuID WHERE T3.city_code  =  "NYC"
Database: college_3
Question: Give the maximum and minimum gradepoints for students living in NYC?
Paraphrased question: Give the maximum and minimum gradepoints for students living in NYC?
SQL: SELECT max(T2.gradepoint) ,  min(T2.gradepoint) FROM ENROLLED_IN AS T1 JOIN GRADECONVERSION AS T2 JOIN STUDENT AS T3 ON T1.Grade  =  T2.lettergrade AND T1.StuID  =  T3.StuID WHERE T3.city_code  =  "NYC"
Database: college_3
Question: Find the names of courses that have either 3 credits or 1 credit but 4 hours.
Paraphrased question: Find the names of curriculum that have either 3 credits or 1 credit but 4 hours.
SQL: SELECT CName FROM COURSE WHERE Credits  =  3 UNION SELECT CName FROM COURSE WHERE Credits  =  1 AND Hours  =  4
Database: college_3
Question: What are the names of courses that give either 3 credits, or 1 credit and 4 hours?
Paraphrased question: What are the names of curriculum that give either 3 credits, or 1 credit and 4 hours?
SQL: SELECT CName FROM COURSE WHERE Credits  =  3 UNION SELECT CName FROM COURSE WHERE Credits  =  1 AND Hours  =  4
Database: college_3
Question: Find the names of departments that are either in division AS or in division EN and in Building NEB.
Paraphrased question: Find the names of departments that are either in division AS or in division EN and in Building NEB.
SQL: SELECT DName FROM DEPARTMENT WHERE Division  =  "AS" UNION SELECT DName FROM DEPARTMENT WHERE Division  =  "EN" AND Building  =  "NEB"
Database: college_3
Question: What are the names of departments either in division AS, or in division EN and in building NEB?
Paraphrased question: What are the names of departments either in division AS, or in division EN and in building NEB?
SQL: SELECT DName FROM DEPARTMENT WHERE Division  =  "AS" UNION SELECT DName FROM DEPARTMENT WHERE Division  =  "EN" AND Building  =  "NEB"
Database: college_3
Question: Find the first name of students not enrolled in any course.
Paraphrased question: Find the forename of students not enrolled in any course.
SQL: SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN)
Database: college_3
Question: What are the first names of all students that are not enrolled in courses?
Paraphrased question: What are the forenames of all students that are not enrolled in courses?
SQL: SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN)
Database: department_store
Question: What are the ids of the top three products that were purchased in the largest amount?
Paraphrased question: What are the ids of the top three goods that were purchased in the largest amount?
SQL: SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3
Database: department_store
Question: Give the ids of the three products purchased in the largest amounts.
Paraphrased question: Give the ids of the three goods purchased in the largest amounts.
SQL: SELECT product_id FROM product_suppliers ORDER BY total_amount_purchased DESC LIMIT 3
Database: department_store
Question: What are the product id and product type of the cheapest product?
Paraphrased question: What are the goods id and goods category of the cheapest goods?
SQL: SELECT product_id ,  product_type_code FROM products ORDER BY product_price LIMIT 1
Database: department_store
Question: Give the id and product type of the product with the lowest price.
Paraphrased question: Give the id and goods category of the goods with the lowest price.
SQL: SELECT product_id ,  product_type_code FROM products ORDER BY product_price LIMIT 1
Database: department_store
Question: Find the number of different product types.
Paraphrased question: Find the number of different goods categories.
SQL: SELECT count(DISTINCT product_type_code) FROM products
Database: department_store
Question: Count the number of distinct product types.
Paraphrased question: Count the number of different goods categories.
SQL: SELECT count(DISTINCT product_type_code) FROM products
Database: department_store
Question: Return the address of customer 10.
Paraphrased question: Return the location of customer 10.
SQL: SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id  =  T2.address_id WHERE T2.customer_id  =  10
Database: department_store
Question: What is the address for the customer with id 10?
Paraphrased question: What is the location for the customer with id 10?
SQL: SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id  =  T2.address_id WHERE T2.customer_id  =  10
Database: department_store
Question: What are the staff ids and genders of all staffs whose job title is Department Manager?
Paraphrased question: What are the employee ids and sex of all employees whose job title is Department Manager?
SQL: SELECT T1.staff_id ,  T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Department Manager"
Database: department_store
Question: Return the staff ids and genders for any staff with the title Department Manager.
Paraphrased question: Return the employee ids and sex for any employee with the title Department Manager.
SQL: SELECT T1.staff_id ,  T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Department Manager"
Database: department_store
Question: For each payment method, return how many customers use it.
Paraphrased question: For each payment method, return how many clients use it.
SQL: SELECT payment_method_code ,  count(*) FROM customers GROUP BY payment_method_code
Database: department_store
Question: How many customers use each payment method?
Paraphrased question: How many clients use each payment method?
SQL: SELECT payment_method_code ,  count(*) FROM customers GROUP BY payment_method_code
Database: department_store
Question: What is the id of the product that was ordered the most often?
Paraphrased question: What is the id of the goods that was ordered the most often?
SQL: SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1
Database: department_store
Question: Give the product id for the product that was ordered most frequently.
Paraphrased question: Give the goods id for the goods that was ordered most frequently.
SQL: SELECT product_id FROM order_items GROUP BY product_id ORDER BY count(*) DESC LIMIT 1
Database: department_store
Question: What are the name, phone number and email address of the customer who made the largest number of orders?
Paraphrased question: What are the name, telephone number and email address of the client who made the largest number of orders?
SQL: SELECT T1.customer_name ,  T1.customer_phone ,  T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1
Database: department_store
Question: Return the name, phone number and email address for the customer with the most orders.
Paraphrased question: Return the name, telephone number and email address for the client with the most orders.
SQL: SELECT T1.customer_name ,  T1.customer_phone ,  T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1
Database: department_store
Question: What is the average price for each type of product?
Paraphrased question: What is the average price for each category of goods?
SQL: SELECT product_type_code ,  avg(product_price) FROM products GROUP BY product_type_code
Database: department_store
Question: Return the average price for each product type.
Paraphrased question: Return the average price for each goods category.
SQL: SELECT product_type_code ,  avg(product_price) FROM products GROUP BY product_type_code
Database: department_store
Question: How many department stores does the store chain South have?
Paraphrased question: How many division stores does the store chain South have?
SQL: SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id  =  T2.dept_store_chain_id WHERE T2.dept_store_chain_name  =  "South"
Database: department_store
Question: Count the number of stores the chain South has.
Paraphrased question: Count the number of shops the chain South has.
SQL: SELECT count(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id  =  T2.dept_store_chain_id WHERE T2.dept_store_chain_name  =  "South"
Database: department_store
Question: What is the name and job title of the staff who was assigned the latest?
Paraphrased question: What is the name and job title of the employee who was assigned the latest?
SQL: SELECT T1.staff_name ,  T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1
Database: department_store
Question: Return the name and job title of the staff with the latest date assigned.
Paraphrased question: Return the name and job title of the employee with the latest date assigned.
SQL: SELECT T1.staff_name ,  T2.job_title_code FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id ORDER BY T2.date_assigned_to DESC LIMIT 1
Database: department_store
Question: Give me the product type, name and price for all the products supplied by supplier id 3.
Paraphrased question: Give me the goods category, name and price for all the goods supplied by supplier id 3.
SQL: SELECT T2.product_type_code ,  T2.product_name ,  T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id  =  T2.product_id WHERE T1.supplier_id  =  3
Database: department_store
Question: Return the product type, name, and price for products supplied by supplier 3.
Paraphrased question: Return the goods category, name, and price for goods supplied by supplier 3.
SQL: SELECT T2.product_type_code ,  T2.product_name ,  T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id  =  T2.product_id WHERE T1.supplier_id  =  3
Database: department_store
Question: Return the distinct name of customers whose order status is Pending, in the order of customer id.
Paraphrased question: Return the different name of clients whose order status is Pending, in the order of client id.
SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "Pending" ORDER BY T2.customer_id
Database: department_store
Question: What are the distinct names of customers with an order status of Pending, sorted by customer id?
Paraphrased question: What are the different names of clients with an order status of Pending, sorted by client id?
SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "Pending" ORDER BY T2.customer_id
Database: department_store
Question: Find the name and address of the customers who have both New and Pending orders.
Paraphrased question: Find the name and location of the clients who have both New and Pending orders.
SQL: SELECT T1.customer_name ,  T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "New" INTERSECT SELECT T1.customer_name ,  T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "Pending"
Database: department_store
Question: What are the names and addressed of customers who have both New and Pending orders?
Paraphrased question: What are the names and addressed of clients who have both New and Pending orders?
SQL: SELECT T1.customer_name ,  T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "New" INTERSECT SELECT T1.customer_name ,  T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "Pending"
Database: department_store
Question: Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.
Paraphrased question: Return ids of all the goods that are supplied by supplier id 2 and are more expensive than the average price of all goods.
SQL: SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id  =  T2.product_id WHERE T1.supplier_id  =  2 AND T2.product_price  >  (SELECT avg(product_price) FROM products)
Database: department_store
Question: What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?
Paraphrased question: What are the ids of goods from the supplier with id 2, which are more expensive than the average price across all goods?
SQL: SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id  =  T2.product_id WHERE T1.supplier_id  =  2 AND T2.product_price  >  (SELECT avg(product_price) FROM products)
Database: department_store
Question: What is the id and name of the department store that has both marketing and managing department?
Paraphrased question: What is the id and name of the division store that has both marketing and managing division?
SQL: SELECT T2.dept_store_id ,  T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id  =  T2.dept_store_id WHERE T1.department_name  =  "marketing" INTERSECT SELECT T2.dept_store_id ,  T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id  =  T2.dept_store_id WHERE T1.department_name  =  "managing"
Database: department_store
Question: What are the ids and names of department stores with both marketing and managing departments?
Paraphrased question: What are the ids and names of division stores with both marketing and managing divisions?
SQL: SELECT T2.dept_store_id ,  T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id  =  T2.dept_store_id WHERE T1.department_name  =  "marketing" INTERSECT SELECT T2.dept_store_id ,  T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id  =  T2.dept_store_id WHERE T1.department_name  =  "managing"
Database: department_store
Question: What are the ids of the two department store chains with the largest number of department stores?
Paraphrased question: What are the ids of the two division store chains with the largest number of division stores?
SQL: SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 2
Database: department_store
Question: Return the ids of the two department store chains with the most department stores.
Paraphrased question: Return the ids of the two division store chains with the most division stores.
SQL: SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY count(*) DESC LIMIT 2
Database: department_store
Question: What is the id of the department with the least number of staff?
Paraphrased question: What is the id of the division with the least number of employee?
SQL: SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1
Database: department_store
Question: Return the id of the department with the fewest staff assignments.
Paraphrased question: Return the id of the division with the fewest employee assignments.
SQL: SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1
Database: department_store
Question: For each product type, return the maximum and minimum price.
Paraphrased question: For each goods category, return the maximum and minimum price.
SQL: SELECT product_type_code ,  max(product_price) ,  min(product_price) FROM products GROUP BY product_type_code
Database: department_store
Question: What are the maximum and minimum product prices for each product type?
Paraphrased question: What are the maximum and minimum goods prices for each goods category?
SQL: SELECT product_type_code ,  max(product_price) ,  min(product_price) FROM products GROUP BY product_type_code
Database: department_store
Question: Find the product type whose average price is higher than the average price of all products.
Paraphrased question: Find the goods category whose average price is higher than the average price of all goods.
SQL: SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price)  >  (SELECT avg(product_price) FROM products)
Database: department_store
Question: What is the code of the product type with an average price higher than the average price of all products?
Paraphrased question: What is the code of the goods category with an average price higher than the average price of all goods?
SQL: SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price)  >  (SELECT avg(product_price) FROM products)
Database: department_store
Question: Find the id and name of the staff who has been assigned for the shortest period.
Paraphrased question: Find the id and name of the employee who has been assigned for the shortest period.
SQL: SELECT T1.staff_id ,  T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1
Database: department_store
Question: What is the id and name of the staff who has been assigned for the least amount of time?
Paraphrased question: What is the id and name of the employee who has been assigned for the least amount of time?
SQL: SELECT T1.staff_id ,  T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1
Database: department_store
Question: Return the names and ids of all products whose price is between 600 and 700.
Paraphrased question: Return the names and ids of all goods whose price is between 600 and 700.
SQL: SELECT product_name ,  product_id FROM products WHERE product_price BETWEEN 600 AND 700
Database: department_store
Question: What are the names and ids of products costing between 600 and 700?
Paraphrased question: What are the names and ids of goods costing between 600 and 700?
SQL: SELECT product_name ,  product_id FROM products WHERE product_price BETWEEN 600 AND 700
Database: department_store
Question: Find the ids of all distinct customers who made order after some orders that were Cancelled.
Paraphrased question: Find the ids of all different clients who made order after some orders that were Cancelled.
SQL: SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date  >  (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code  =  "Cancelled")
Database: department_store
Question: What are the distinct ids of customers who made an order after any order that was Cancelled?
Paraphrased question: What are the different ids of clients who made an order after any order that was Cancelled?
SQL: SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date  >  (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code  =  "Cancelled")
Database: department_store
Question: What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?
Paraphrased question: What is id of the employee who had a Staff Department Assignment earlier than any Clerical Staff?
SQL: SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to  <  (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code  =  'Clerical Staff')
Database: department_store
Question: Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.
Paraphrased question: Return the id of the employee whose Staff Department Assignment was earlier than that of any Clerical Staff.
SQL: SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to  <  (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code  =  'Clerical Staff')
Database: department_store
Question: What are the names and ids of customers whose address contains TN?
Paraphrased question: What are the names and ids of clients whose location contains TN?
SQL: SELECT customer_name ,  customer_id FROM customers WHERE customer_address LIKE "%TN%"
Database: department_store
Question: Return the names and ids of customers who have TN in their address.
Paraphrased question: Return the names and ids of clients who have TN in their location.
SQL: SELECT customer_name ,  customer_id FROM customers WHERE customer_address LIKE "%TN%"
Database: department_store
Question: Return the name and gender of the staff who was assigned in 2016.
Paraphrased question: Return the name and sex of the employee who was assigned in 2016.
SQL: SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.date_assigned_from LIKE "2016%"
Database: department_store
Question: What are the names and genders of staff who were assigned in 2016?
Paraphrased question: What are the names and sex of employee who were assigned in 2016?
SQL: SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.date_assigned_from LIKE "2016%"
Database: department_store
Question: List the name of staff who has been assigned multiple jobs.
Paraphrased question: List the name of employee who has been assigned multiple jobs.
SQL: SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*)  >  1
Database: department_store
Question: What are the names of staff who have been assigned multiple jobs?
Paraphrased question: What are the names of employee who have been assigned multiple jobs?
SQL: SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*)  >  1
Database: department_store
Question: List the name and phone number of all suppliers in the alphabetical order of their addresses.
Paraphrased question: List the name and telephone number of all suppliers in the alphabetical order of their locations.
SQL: SELECT T1.supplier_name ,  T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id  =  T2.supplier_id JOIN addresses AS T3 ON T2.address_id  =  T3.address_id ORDER BY T3.address_details
Database: department_store
Question: What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?
Paraphrased question: What are the names and telephone numbers for all suppliers, sorted in alphabetical order of their addressed?
SQL: SELECT T1.supplier_name ,  T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id  =  T2.supplier_id JOIN addresses AS T3 ON T2.address_id  =  T3.address_id ORDER BY T3.address_details
Database: department_store
Question: What are the phone numbers of all customers and suppliers.
Paraphrased question: What are the telephone numbers of all clients and suppliers.
SQL: SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers
Database: department_store
Question: Return the phone numbers for all customers and suppliers.
Paraphrased question: Return the telephone numbers for all clients and suppliers.
SQL: SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers
Database: department_store
Question: Return the ids of all products that were ordered more than three times or supplied more than 80000.
Paraphrased question: Return the ids of all goods that were ordered more than three times or supplied more than 80000.
SQL: SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*)  >  3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased)  >  80000
Database: department_store
Question: What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?
Paraphrased question: What are the ids of all goods that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?
SQL: SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*)  >  3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased)  >  80000
Database: department_store
Question: What are id and name of the products whose price is lower than 600 or higher than 900?
Paraphrased question: What are id and name of the goods whose price is lower than 600 or higher than 900?
SQL: SELECT product_id ,  product_name FROM products WHERE product_price  <  600 OR product_price  >  900
Database: department_store
Question: Give the ids and names of products with price lower than 600 or higher than 900.
Paraphrased question: Give the ids and names of goods with price lower than 600 or higher than 900.
SQL: SELECT product_id ,  product_name FROM products WHERE product_price  <  600 OR product_price  >  900
Database: department_store
Question: Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.
Paraphrased question: Find the id of suppliers whose average amount purchased for each goods is above 50000 or below 30000.
SQL: SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased)  >  50000 OR avg(total_amount_purchased)  <  30000
Database: department_store
Question: What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?
Paraphrased question: What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?
SQL: SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id HAVING avg(total_amount_purchased)  >  50000 OR avg(total_amount_purchased)  <  30000
Database: department_store
Question: What are the average amount purchased and value purchased for the supplier who supplies the most products.
Paraphrased question: What are the average amount purchased and value purchased for the supplier who supplies the most goods.
SQL: SELECT avg(total_amount_purchased) ,  avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id  =  (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)
Database: department_store
Question: Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.
Paraphrased question: Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of goods.
SQL: SELECT avg(total_amount_purchased) ,  avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id  =  (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)
Database: department_store
Question: What is the largest and smallest customer codes?
Paraphrased question: What is the largest and smallest client codes?
SQL: SELECT max(customer_code) ,  min(customer_code) FROM Customers
Database: department_store
Question: Return the maximum and minimum customer codes.
Paraphrased question: Return the maximum and minimum client codes.
SQL: SELECT max(customer_code) ,  min(customer_code) FROM Customers
Database: department_store
Question: List the names of all the distinct customers who bought a keyboard.
Paraphrased question: List the names of all the different clients who bought a keyboard.
SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id JOIN products AS T4 ON T3.product_id  =  T4.product_id WHERE T4.product_name  =  "keyboard"
Database: department_store
Question: What are the distinct names of customers who have purchased a keyboard?
Paraphrased question: What are the different names of clients who have purchased a keyboard?
SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id JOIN products AS T4 ON T3.product_id  =  T4.product_id WHERE T4.product_name  =  "keyboard"
Database: department_store
Question: List the names and phone numbers of all the distinct suppliers who supply red jeans.
Paraphrased question: List the names and telephone numbers of all the different suppliers who supply red jeans.
SQL: SELECT DISTINCT T1.supplier_name ,  T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id  =  T2.supplier_id JOIN products AS T3 ON T2.product_id  =  T3.product_id WHERE T3.product_name  =  "red jeans"
Database: department_store
Question: What are the distinct names and phone numbers for suppliers who have red jeans?
Paraphrased question: What are the different names and telephone numbers for suppliers who have red jeans?
SQL: SELECT DISTINCT T1.supplier_name ,  T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id  =  T2.supplier_id JOIN products AS T3 ON T2.product_id  =  T3.product_id WHERE T3.product_name  =  "red jeans"
Database: department_store
Question: What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?
Paraphrased question: What are the highest and lowest prices of goods, grouped by and alphabetically ordered by goods category?
SQL: SELECT max(product_price) ,  min(product_price) ,  product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code
Database: department_store
Question: Give the maximum and minimum product prices for each product type, grouped and ordered by product type.
Paraphrased question: Give the maximum and minimum goods prices for each goods category, grouped and ordered by goods category.
SQL: SELECT max(product_price) ,  min(product_price) ,  product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code
Database: department_store
Question: List the order id, customer id for orders in Cancelled status, ordered by their order dates.
Paraphrased question: List the order id, client id for orders in Cancelled status, ordered by their order dates.
SQL: SELECT order_id ,  customer_id FROM customer_orders WHERE order_status_code  =   "Cancelled" ORDER BY order_date
Database: department_store
Question: What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?
Paraphrased question: What are the order ids and client ids for orders that have been Cancelled, sorted by their order dates?
SQL: SELECT order_id ,  customer_id FROM customer_orders WHERE order_status_code  =   "Cancelled" ORDER BY order_date
Database: department_store
Question: Find the names of products that were bought by at least two distinct customers.
Paraphrased question: Find the names of goods that were bought by at least two different clients.
SQL: SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id  =  T2.order_id JOIN products AS T3 ON T2.product_id  =  T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id)  >=  2
Database: department_store
Question: What are the distinct names of products purchased by at least two different customers?
Paraphrased question: What are the different names of goods purchased by at least two different clients?
SQL: SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id  =  T2.order_id JOIN products AS T3 ON T2.product_id  =  T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id)  >=  2
Database: department_store
Question: Find the names of customers who have bought by at least three distinct products.
Paraphrased question: Find the names of clients who have bought by at least three different goods.
SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id)  >=  3
Database: department_store
Question: What are the distinct names of customers who have purchased at least three different products?
Paraphrased question: What are the different names of clients who have purchased at least three different goods?
SQL: SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id)  >=  3
Database: department_store
Question: Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.
Paraphrased question: Find the name and sex of the employee who has been assigned the job of Sales Person but never Clerical Staff.
SQL: SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Sales Person" EXCEPT SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Clerical Staff"
Database: department_store
Question: What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?
Paraphrased question: What are the names and sexs of employee who have held the title Sales Person, but never Clerical Staff?
SQL: SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Sales Person" EXCEPT SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Clerical Staff"
Database: department_store
Question: Find the id and name of customers whose address contains WY state and do not use credit card for payment.
Paraphrased question: Find the id and name of clients whose location contains WY state and do not use credit card for payment.
SQL: SELECT customer_id ,  customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code != "Credit Card"
Database: department_store
Question: What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?
Paraphrased question: What are the ids and names of clients with addressed that contain WY and who do not use a credit card for payment?
SQL: SELECT customer_id ,  customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code != "Credit Card"
Database: department_store
Question: Find the average price of all product clothes.
Paraphrased question: Find the average price of all goods clothes.
SQL: SELECT avg(product_price) FROM products WHERE product_type_code  =  'Clothes'
Database: department_store
Question: What is the average price of clothes?
Paraphrased question: What is the average price of clothes?
SQL: SELECT avg(product_price) FROM products WHERE product_type_code  =  'Clothes'
Database: department_store
Question: Find the name of the most expensive hardware product.
Paraphrased question: Find the name of the most expensive hardware goods.
SQL: SELECT product_name FROM products WHERE product_type_code  =  'Hardware' ORDER BY product_price DESC LIMIT 1
Database: department_store
Question: What is the name of the hardware product with the greatest price?
Paraphrased question: What is the name of the hardware goods with the greatest price?
SQL: SELECT product_name FROM products WHERE product_type_code  =  'Hardware' ORDER BY product_price DESC LIMIT 1
Database: aircraft
Question: How many aircrafts are there?
Paraphrased question: How many airplanes are there?
SQL: SELECT count(*) FROM aircraft
Database: aircraft
Question: What is the number of aircraft?
Paraphrased question: What is the number of airplane?
SQL: SELECT count(*) FROM aircraft
Database: aircraft
Question: List the description of all aircrafts.
Paraphrased question: List the describing content of all airplanes
SQL: SELECT Description FROM aircraft
Database: aircraft
Question: What are the descriptions for the aircrafts?
Paraphrased question: What are the describing details for the airplanes?
SQL: SELECT Description FROM aircraft
Database: aircraft
Question: What is the average number of international passengers of all airports?
Paraphrased question: What is the average number of different country passengers of all aerodromes?
SQL: SELECT avg(International_Passengers) FROM airport
Database: aircraft
Question: What is the average number of international passengers for an airport?
Paraphrased question: What is the average number of different country passengers for an aerodrome?
SQL: SELECT avg(International_Passengers) FROM airport
Database: aircraft
Question: What are the number of international and domestic passengers of the airport named London "Heathrow"?
Paraphrased question: What are the number of different country and domestic passengers of the aerodrome named London "Heathrow"?
SQL: SELECT International_Passengers ,  Domestic_Passengers FROM airport WHERE Airport_Name  =  "London Heathrow"
Database: aircraft
Question: How many international and domestic passengers are there in the airport London Heathrow?
Paraphrased question: How many different country and domestic passengers are there in the aerodrome London Heathrow?
SQL: SELECT International_Passengers ,  Domestic_Passengers FROM airport WHERE Airport_Name  =  "London Heathrow"
Database: aircraft
Question: What are the total number of Domestic Passengers of airports that contain the word "London".
Paraphrased question: What are the total number of Domestic Passengers of aerodromes that contain the word "London".
SQL: SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
Database: aircraft
Question: What are the total number of domestic passengers at all London airports?
Paraphrased question: What are the total number of domestic passengers at all London aerodromes?
SQL: SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"
Database: aircraft
Question: What are the maximum and minimum number of transit passengers of all aiports.
Paraphrased question: What are the maximum and minimum number of transit passengers of all aiports.
SQL: SELECT max(Transit_Passengers) ,  min(Transit_Passengers) FROM airport
Database: aircraft
Question: What is the maximum and mininum number of transit passengers for all airports?
Paraphrased question: What is the maximum and mininum number of transit passengers for all aerodromes?
SQL: SELECT max(Transit_Passengers) ,  min(Transit_Passengers) FROM airport
Database: aircraft
Question: What are the name of pilots aged 25 or older?
Paraphrased question: What are the name of aviators aged 25 or older?
SQL: SELECT Name FROM pilot WHERE Age  >=  25
Database: aircraft
Question: what is the name of every pilot who is at least 25 years old?
Paraphrased question: what is the name of every aviator who is at least 25 years old?
SQL: SELECT Name FROM pilot WHERE Age  >=  25
Database: aircraft
Question: List all pilot names in ascending alphabetical order.
Paraphrased question: List all aviator names in ascending alphabetical order.
SQL: SELECT Name FROM pilot ORDER BY Name ASC
Database: aircraft
Question: What are the names of the pilots in alphabetical order?
Paraphrased question: What are the names of the aviators in alphabetical order?
SQL: SELECT Name FROM pilot ORDER BY Name ASC
Database: aircraft
Question: List names of all pilot aged 30 or younger in descending alphabetical order.
Paraphrased question: List names of all aviator aged 30 or younger in descending alphabetical order.
SQL: SELECT Name FROM pilot WHERE Age  <=  30 ORDER BY Name DESC
Database: aircraft
Question: What are the names of all pilots 30 years old or young in descending alphabetical order?
Paraphrased question: What are the names of all aviators 30 years old or young in descending alphabetical order?
SQL: SELECT Name FROM pilot WHERE Age  <=  30 ORDER BY Name DESC
Database: aircraft
Question: Please show the names of aircrafts associated with airport with name "London Gatwick".
Paraphrased question: Please show the names of airplanes associated with aerodrome with name "London Gatwick".
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Airport_Name  =  "London Gatwick"
Database: aircraft
Question: What are the names of all the aircrafts associated with London Gatwick airport?
Paraphrased question: What are the names of all the airplanes associated with London Gatwick aerodrome?
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Airport_Name  =  "London Gatwick"
Database: aircraft
Question: Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.
Paraphrased question: Please show the names and describing details of airplanes associated with aerodromes that have a total number of passengers bigger than 10000000.
SQL: SELECT T1.Aircraft ,  T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Total_Passengers  >  10000000
Database: aircraft
Question: What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?
Paraphrased question: What are the names and describing details of airplanes associated with an aerodrome that has more total passengers than 10000000?
SQL: SELECT T1.Aircraft ,  T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Total_Passengers  >  10000000
Database: aircraft
Question: What is the average total number of passengers of airports that are associated with aircraft "Robinson R-22"?
Paraphrased question: What is the average total number of passengers of aerodromes that are associated with airplane "Robinson R-22"?
SQL: SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T1.Aircraft  =  "Robinson R-22"
Database: aircraft
Question: What is the average total number of passengers for all airports that the aircraft "Robinson R-22" visits?
Paraphrased question: What is the average total number of passengers for all aerodromes that the airplane "Robinson R-22" visits?
SQL: SELECT avg(T3.Total_Passengers) FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T1.Aircraft  =  "Robinson R-22"
Database: aircraft
Question: Please list the location and the winning aircraft name.
Paraphrased question: Please list the address and the winning airplane name.
SQL: SELECT T2.Location ,  T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft
Database: aircraft
Question: What is the location and name of the winning aircraft?
Paraphrased question: What is the address and name of the winning airplane?
SQL: SELECT T2.Location ,  T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft
Database: aircraft
Question: List the name of the aircraft that has been named winning aircraft the most number of times.
Paraphrased question: List the name of the airplane that has been named winning aircraft the most number of times.
SQL: SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1