aherntech/spider-syn huggingface dataset:
Database: college_2
Question: Find the name of students who have taken the prerequisite course of the course with title International Finance.
Paraphrased question: Find the name of students who have taken the prerequisite course of the course with title International Finance.
SQL: SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id  =  T4.course_id WHERE T3.title  =  'International Finance')
Database: college_2
Question: What are the names of students who have taken the prerequisite for the course International Finance?
Paraphrased question: What are the names of students who have taken the prerequisite for the course International Finance?
SQL: SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id  =  T4.course_id WHERE T3.title  =  'International Finance')
Database: college_2
Question: Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.
Paraphrased question: Find the name and wage of instructors whose wage is below the average wage of the instructors in the Physics department.
SQL: SELECT name ,  salary FROM instructor WHERE salary  <  (SELECT avg(salary) FROM instructor WHERE dept_name  =  'Physics')
Database: college_2
Question: What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?
Paraphrased question: What are the names and wages for instructors who earn less than the average wage of instructors in the Physics department?
SQL: SELECT name ,  salary FROM instructor WHERE salary  <  (SELECT avg(salary) FROM instructor WHERE dept_name  =  'Physics')
Database: college_2
Question: Find the name of students who took some course offered by Statistics department.
Paraphrased question: Find the name of students who took some curriculum offered by Statistics department.
SQL: SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id  =  T2.course_id JOIN student AS T3 ON T2.id  =  T3.id WHERE T1.dept_name  =  'Statistics'
Database: college_2
Question: What are the names of students who have taken Statistics courses?
Paraphrased question: What are the names of students who have taken Statistics courses?
SQL: SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id  =  T2.course_id JOIN student AS T3 ON T2.id  =  T3.id WHERE T1.dept_name  =  'Statistics'
Database: college_2
Question: Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.
Paraphrased question: Find the building, room number, academic session and year of all curriculum offered by Psychology department sorted by curriculum titles.
SQL: SELECT T2.building ,  T2.room_number ,  T2.semester ,  T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE T1.dept_name  =  'Psychology' ORDER BY T1.title
Database: college_2
Question: What are the building, room number, semester and year of courses in the Psychology department, sorted using course title?
Paraphrased question: What are the building, room number, academic session and year of courses in the Psychology department, sorted using course title?
SQL: SELECT T2.building ,  T2.room_number ,  T2.semester ,  T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE T1.dept_name  =  'Psychology' ORDER BY T1.title
Database: college_2
Question: Find the names of all instructors in computer science department
Paraphrased question: Find the names of all teachers in computer science department
SQL: SELECT name FROM instructor WHERE dept_name  =  'Comp. Sci.'
Database: college_2
Question: What are the names of all instructors in the Comp. Sci. department?
Paraphrased question: What are the names of all teachers in the Comp. Sci. department?
SQL: SELECT name FROM instructor WHERE dept_name  =  'Comp. Sci.'
Database: college_2
Question: Find the names of all instructors in Comp. Sci. department with salary > 80000.
Paraphrased question: Find the names of all teachers in Comp. Sci. department with salary > 80000.
SQL: SELECT name FROM instructor WHERE dept_name  =  'Comp. Sci.'  AND salary  >  80000
Database: college_2
Question: What are the names of the instructors in the Comp. Sci. department who earn more than 80000?
Paraphrased question: What are the names of the teachers in the Comp. Sci. department who earn more than 80000?
SQL: SELECT name FROM instructor WHERE dept_name  =  'Comp. Sci.'  AND salary  >  80000
Database: college_2
Question: Find the names of all instructors who have taught some course and the course_id.
Paraphrased question: Find the names of all teachers who have taught some course and the course_id.
SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID
Database: college_2
Question: What are the names of all instructors who have taught a course, as well as the corresponding course id?
Paraphrased question: What are the names of all teachers who have taught curriculum, as well as the corresponding curriculum id?
SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID
Database: college_2
Question: Find the names of all instructors in the Art department who have taught some course and the course_id.
Paraphrased question: Find the names of all teachers in the Art department who have taught some course and the course_id.
SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID WHERE T1.dept_name  =  'Art'
Database: college_2
Question: What are the names of Art instructors who have taught a course, and the corresponding course id?
Paraphrased question: What are the names of Art instructors who have taught a curriculum, and the corresponding curriculum id?
SQL: SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID WHERE T1.dept_name  =  'Art'
Database: college_2
Question: Find the names of all instructors whose name includes the substring “dar”.
Paraphrased question: Find the names of all teachers whose name includes the substring “dar”.
SQL: SELECT name FROM instructor WHERE name LIKE '%dar%'
Database: college_2
Question: What are the names of all instructors with names that include "dar"?
Paraphrased question: What are the names of all teachers with names that include "dar"?
SQL: SELECT name FROM instructor WHERE name LIKE '%dar%'
Database: college_2
Question: List in alphabetic order the names of all distinct instructors.
Paraphrased question: List in alphabetic order the names of all different teachers.
SQL: SELECT DISTINCT name FROM  instructor ORDER BY name
Database: college_2
Question: List the distinct names of the instructors, ordered by name.
Paraphrased question: List the different names of the teachers, ordered by name.
SQL: SELECT DISTINCT name FROM  instructor ORDER BY name
Database: college_2
Question: Find courses that ran in Fall 2009 or in Spring 2010.
Paraphrased question: Find curriculum that ran in Fall 2009 or in Spring 2010.
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 UNION SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: What are the ids for courses in the Fall of 2009 or the Spring of 2010?
Paraphrased question: What are the ids for curriculum in the Fall of 2009 or the Spring of 2010?
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 UNION SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: Find courses that ran in Fall 2009 and in Spring 2010.
Paraphrased question: Find curriculum that ran in Fall 2009 and in Spring 2010.
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 INTERSECT SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?
Paraphrased question: What are the ids for curriculum that were offered in both Fall of 2009 and Spring of 2010?
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 INTERSECT SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: Find courses that ran in Fall 2009 but not in Spring 2010.
Paraphrased question: Find curriculum that ran in Fall 2009 but not in Spring 2010.
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 EXCEPT SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: What are the ids of courses offered in Fall of 2009 but not in Spring of 2010?
Paraphrased question: What are the ids of curriculum offered in Fall of 2009 but not in Spring of 2010?
SQL: SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 EXCEPT SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: Find the salaries of all distinct instructors that are less than the largest salary.
Paraphrased question: Find the wage of all different instructors that are less than the largest wage.
SQL: SELECT DISTINCT salary FROM instructor WHERE salary  <  (SELECT max(salary) FROM instructor)
Database: college_2
Question: What are the distinct salaries of all instructors who earned less than the maximum salary?
Paraphrased question: What are the different wages of all instructors who earned less than the maximum wage?
SQL: SELECT DISTINCT salary FROM instructor WHERE salary  <  (SELECT max(salary) FROM instructor)
Database: college_2
Question: Find the total number of instructors who teach a course in the Spring 2010 semester.
Paraphrased question: Find the total number of teachers who teach a course in the Spring 2010 semester.
SQL: SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: How many instructors teach a course in the Spring of 2010?
Paraphrased question: How many teachers teach a course in the Spring of 2010?
SQL: SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester  =  'Spring' AND YEAR  =  2010
Database: college_2
Question: Find the names and average salaries of all departments whose average salary is greater than 42000.
Paraphrased question: Find the names and average wages of all departments whose average wage is greater than 42000.
SQL: SELECT dept_name ,  AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary)  >  42000
Database: college_2
Question: What are the names and average salaries for departments with average salary higher than 42000?
Paraphrased question: What are the names and average wages for departments with average wage higher than 42000?
SQL: SELECT dept_name ,  AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary)  >  42000
Database: college_2
Question: Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.
Paraphrased question: Find names of teachers with wage greater than that of some (at least one) teacher in the Biology department.
SQL: SELECT name FROM instructor WHERE salary  >  (SELECT min(salary) FROM instructor WHERE dept_name  =  'Biology')
Database: college_2
Question: What are the names of instructors who earn more than at least one instructor from the Biology department?
Paraphrased question: What are the names of teachers who earn more than at least one teacher from the Biology department?
SQL: SELECT name FROM instructor WHERE salary  >  (SELECT min(salary) FROM instructor WHERE dept_name  =  'Biology')
Database: college_2
Question: Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.
Paraphrased question: Find the names of all teachers whose wage is greater than the wage of all teachers in the Biology department.
SQL: SELECT name FROM instructor WHERE salary  >  (SELECT max(salary) FROM instructor WHERE dept_name  =  'Biology')
Database: college_2
Question: What are the names of all instructors with a higher salary than any of the instructors in the Biology department?
Paraphrased question: What are the names of all teachers with a higher wage than any of the teachers in the Biology department?
SQL: SELECT name FROM instructor WHERE salary  >  (SELECT max(salary) FROM instructor WHERE dept_name  =  'Biology')
Database: debate
Question: How many debates are there?
Paraphrased question: How many debates are there?
SQL: SELECT count(*) FROM debate
Database: debate
Question: List the venues of debates in ascending order of the number of audience.
Paraphrased question: List the place of debates in ascending order of the number of audience.
SQL: SELECT Venue FROM debate ORDER BY Num_of_Audience ASC
Database: debate
Question: What are the date and venue of each debate?
Paraphrased question: What are the day and place of each debate?
SQL: SELECT Date ,  Venue FROM debate
Database: debate
Question: List the dates of debates with number of audience bigger than 150
Paraphrased question: List the day of debates with number of audience bigger than 150
SQL: SELECT Date FROM debate WHERE Num_of_Audience  >  150
Database: debate
Question: Show the names of people aged either 35 or 36.
Paraphrased question: Show the names of people aged either 35 or 36.
SQL: SELECT Name FROM  people WHERE Age  =  35 OR Age  =  36
Database: debate
Question: What is the party of the youngest people?
Paraphrased question: What is the party of the youngest people?
SQL: SELECT Party FROM people ORDER BY Age ASC LIMIT 1
Database: debate
Question: Show different parties of people along with the number of people in each party.
Paraphrased question: Show different parties of people along with the number of people in each party.
SQL: SELECT Party ,  COUNT(*) FROM people GROUP BY Party
Database: debate
Question: Show the party that has the most people.
Paraphrased question: Show the party that has the most people.
SQL: SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1
Database: debate
Question: Show the distinct venues of debates
Paraphrased question: Show the different place of debates
SQL: SELECT DISTINCT Venue FROM debate
Database: debate
Question: Show the names of people, and dates and venues of debates they are on the affirmative side.
Paraphrased question: Show the names of people, and day and place of debates they are on the affirmative side.
SQL: SELECT T3.Name ,  T2.Date ,  T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Affirmative  =  T3.People_ID
Database: debate
Question: Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.
Paraphrased question: Show the names of people, and days and place of debates they are on the negative side, ordered in ascending alphabetical order of name.
SQL: SELECT T3.Name ,  T2.Date ,  T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Negative  =  T3.People_ID ORDER BY T3.Name ASC
Database: debate
Question: Show the names of people that are on affirmative side of debates with number of audience bigger than 200.
Paraphrased question: Show the names of people that are on affirmative side of debates with number of audience bigger than 200.
SQL: SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Affirmative  =  T3.People_ID WHERE T2.Num_of_Audience  >  200
Database: debate
Question: Show the names of people and the number of times they have been on the affirmative side of debates.
Paraphrased question: Show the names of people and the number of times they have been on the affirmative side of debates.
SQL: SELECT T2.Name ,  COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative  =  T2.People_ID GROUP BY T2.Name
Database: debate
Question: Show the names of people who have been on the negative side of debates at least twice.
Paraphrased question: Show the names of people who have been on the negative side of debates at least twice.
SQL: SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative  =  T2.People_ID GROUP BY T2.Name HAVING COUNT(*)  >=  2
Database: debate
Question: List the names of people that have not been on the affirmative side of debates.
Paraphrased question: List the names of people that have not been on the affirmative side of debates.
SQL: SELECT Name FROM people WHERE People_id NOT IN (SELECT Affirmative FROM debate_people)
Database: insurance_and_eClaims
Question: List the names of all the customers in alphabetical order.
Paraphrased question: List the names of all the clients in alphabetical order.
SQL: SELECT customer_details FROM customers ORDER BY customer_details
Database: insurance_and_eClaims
Question: Sort the customer names in alphabetical order.
Paraphrased question: Sort the client names in alphabetical order.
SQL: SELECT customer_details FROM customers ORDER BY customer_details
Database: insurance_and_eClaims
Question: Find all the policy type codes associated with the customer "Dayana Robel"
Paraphrased question: Find all the policy type codes associated with the customer "Dayana Robel"
SQL: SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.customer_details  =  "Dayana Robel"
Database: insurance_and_eClaims
Question: What are the type codes of the policies used by the customer "Dayana Robel"?
Paraphrased question: What are the type codes of the policies used by the customer "Dayana Robel"?
SQL: SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.customer_details  =  "Dayana Robel"
Database: insurance_and_eClaims
Question: Which type of policy is most frequently used? Give me the policy type code.
Paraphrased question: Which type of policy is most frequently used? Give me the policy type code.
SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1
Database: insurance_and_eClaims
Question: Find the type code of the most frequently used policy.
Paraphrased question: Find the type code of the most frequently used policy.
SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1
Database: insurance_and_eClaims
Question: Find all the policy types that are used by more than 2 customers.
Paraphrased question: Find all the policy types that are used by more than 2 customers.
SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*)  >  2
Database: insurance_and_eClaims
Question: Which types of policy are chosen by more than 2 customers? Give me the policy type codes.
Paraphrased question: Which types of policy are chosen by more than 2 customers? Give me the policy type codes.
SQL: SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*)  >  2
Database: insurance_and_eClaims
Question: Find the total and average amount paid in claim headers.
Paraphrased question: Find the total and average amount paid in claim headers.
SQL: SELECT sum(amount_piad) ,  avg(amount_piad) FROM claim_headers
Database: insurance_and_eClaims
Question: What are the total amount and average amount paid in claim headers?
Paraphrased question: What are the total amount and average amount paid in claim headers?
SQL: SELECT sum(amount_piad) ,  avg(amount_piad) FROM claim_headers
Database: insurance_and_eClaims
Question: Find the total amount claimed in the most recently created document.
Paraphrased question: Find the total amount claimed in the most recently created document.
SQL: SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id  =  t2.claim_id WHERE t2.created_date  =  (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)
Database: insurance_and_eClaims
Question: How much amount in total were claimed in the most recently created document?
Paraphrased question: How much amount in total were claimed in the most recently created document?
SQL: SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id  =  t2.claim_id WHERE t2.created_date  =  (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)
Database: insurance_and_eClaims
Question: What is the name of the customer who has made the largest amount of claim in a single claim?
Paraphrased question: What is the name of the client who has made the largest amount of claim in a single claim?
SQL: SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id  =  t2.policy_id JOIN customers AS t3 ON t2.customer_id  =  t3.customer_id WHERE t1.amount_claimed  =  (SELECT max(amount_claimed) FROM claim_headers)
Database: insurance_and_eClaims
Question: Which customer made the largest amount of claim in a single claim? Return the customer details.
Paraphrased question: Which client made the largest amount of claim in a single claim? Return the client information.
SQL: SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id  =  t2.policy_id JOIN customers AS t3 ON t2.customer_id  =  t3.customer_id WHERE t1.amount_claimed  =  (SELECT max(amount_claimed) FROM claim_headers)
Database: insurance_and_eClaims
Question: What is the name of the customer who has made the minimum amount of payment in one claim?
Paraphrased question: What is the name of the client who has made the minimum amount of payment in one claim?
SQL: SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id  =  t2.policy_id JOIN customers AS t3 ON t2.customer_id  =  t3.customer_id WHERE t1.amount_piad  =  (SELECT min(amount_piad) FROM claim_headers)
Database: insurance_and_eClaims
Question: Which customer made the smallest amount of claim in one claim? Return the customer details.
Paraphrased question: Which client made the smallest amount of claim in one claim? Return the client information.
SQL: SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id  =  t2.policy_id JOIN customers AS t3 ON t2.customer_id  =  t3.customer_id WHERE t1.amount_piad  =  (SELECT min(amount_piad) FROM claim_headers)
Database: insurance_and_eClaims
Question: Find the names of customers who have no policies associated.
Paraphrased question: Find the names of client who have no policies associated.
SQL: SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id
Database: insurance_and_eClaims
Question: What are the names of customers who do not have any policies?
Paraphrased question: What are the names of clients who do not have any policies?
SQL: SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id
Database: insurance_and_eClaims
Question: How many claim processing stages are there in total?
Paraphrased question: How many claim processing stages are there in total?
SQL: SELECT count(*) FROM claims_processing_stages
Database: insurance_and_eClaims
Question: Find the number of distinct stages in claim processing.
Paraphrased question: Find the number of different stages in claim processing.
SQL: SELECT count(*) FROM claims_processing_stages
Database: insurance_and_eClaims
Question: What is the name of the claim processing stage that most of the claims are on?
Paraphrased question: What is the name of the claim processing stage that most of the claims are on?
SQL: SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id  =  t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY count(*) DESC LIMIT 1
Database: insurance_and_eClaims
Question: Which claim processing stage has the most claims? Show the claim status name.
Paraphrased question: Which claim processing stage has the most claims? Show the claim status name.
SQL: SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id  =  t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY count(*) DESC LIMIT 1
Database: insurance_and_eClaims
Question: Find the names of customers whose name contains "Diana".
Paraphrased question: Find the names of clients whose name contains "Diana".
SQL: SELECT customer_details FROM customers WHERE customer_details LIKE "%Diana%"
Database: insurance_and_eClaims
Question: Which customers have the substring "Diana" in their names? Return the customer details.
Paraphrased question: Which clients have the substring "Diana" in their names? Return the client information.
SQL: SELECT customer_details FROM customers WHERE customer_details LIKE "%Diana%"
Database: insurance_and_eClaims
Question: Find the names of the customers who have an deputy policy.
Paraphrased question: Find the names of the clients who have an deputy policy.
SQL: SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.policy_type_code  =  "Deputy"
Database: insurance_and_eClaims
Question: Which customers have an insurance policy with the type code "Deputy"? Give me the customer details.
Paraphrased question: Which clients have an insurance policy with the type code "Deputy"? Give me the client information.
SQL: SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.policy_type_code  =  "Deputy"
Database: insurance_and_eClaims
Question: Find the names of customers who either have an deputy policy or uniformed policy.
Paraphrased question: Find the names of clients who either have an deputy policy or uniformed policy.
SQL: SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.policy_type_code  =  "Deputy" OR t1.policy_type_code  =  "Uniform"
Database: insurance_and_eClaims
Question: Which customers have an insurance policy with the type code "Deputy" or "Uniform"? Return the customer details.
Paraphrased question: Which clients have an insurance policy with the type code "Deputy" or "Uniform"? Return the client information.
SQL: SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.policy_type_code  =  "Deputy" OR t1.policy_type_code  =  "Uniform"
Database: insurance_and_eClaims
Question: Find the names of all the customers and staff members.
Paraphrased question: Find the names of all the clients and employee members.
SQL: SELECT customer_details FROM customers UNION SELECT staff_details FROM staff
Database: insurance_and_eClaims
Question: What are the names of the customers and staff members?
Paraphrased question: What are the names of the clients and employee members?
SQL: SELECT customer_details FROM customers UNION SELECT staff_details FROM staff
Database: insurance_and_eClaims
Question: Find the number of records of each policy type and its type code.
Paraphrased question: Find the number of records of each policy type and its type code.
SQL: SELECT policy_type_code ,  count(*) FROM policies GROUP BY policy_type_code
Database: insurance_and_eClaims
Question: For each policy type, return its type code and its count in the record.
Paraphrased question: For each policy type, return its type code and its count in the record.
SQL: SELECT policy_type_code ,  count(*) FROM policies GROUP BY policy_type_code
Database: insurance_and_eClaims
Question: Find the name of the customer that has been involved in the most policies.
Paraphrased question: Find the name of the client that has been involved in the most policies.
SQL: SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t2.customer_details ORDER BY count(*) DESC LIMIT 1
Database: insurance_and_eClaims
Question: Which customer have the most policies? Give me the customer details.
Paraphrased question: Which client have the most policies? Give me the client information.
SQL: SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t2.customer_details ORDER BY count(*) DESC LIMIT 1
Database: insurance_and_eClaims
Question: What is the description of the claim status "Open"?
Paraphrased question: What is the describing content of the claim status "Open"?
SQL: SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name  =  "Open"
Database: insurance_and_eClaims
Question: Find the description of the claim status "Open".
Paraphrased question: Find the describing content of the claim status "Open".
SQL: SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name  =  "Open"
Database: insurance_and_eClaims
Question: How many distinct claim outcome codes are there?
Paraphrased question: How many different claim outcome codes are there?
SQL: SELECT count(DISTINCT claim_outcome_code) FROM claims_processing
Database: insurance_and_eClaims
Question: Count the number of distinct claim outcome codes.
Paraphrased question: Count the number of different claim outcome codes.
SQL: SELECT count(DISTINCT claim_outcome_code) FROM claims_processing
Database: insurance_and_eClaims
Question: Which customer is associated with the latest policy?
Paraphrased question: Which client is associated with the latest policy?
SQL: SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.start_date  =  (SELECT max(start_date) FROM policies)
Database: insurance_and_eClaims
Question: Find the customer who started a policy most recently.
Paraphrased question: Find the client who started a policy most recently.
SQL: SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.start_date  =  (SELECT max(start_date) FROM policies)
Database: customers_and_invoices
Question: Show the number of accounts.
Paraphrased question: Show the number of accounts.
SQL: SELECT count(*) FROM Accounts
Database: customers_and_invoices
Question: How many accounts are there?
Paraphrased question: How many accounts are there?
SQL: SELECT count(*) FROM Accounts
Database: customers_and_invoices
Question: How many customers have opened an account?
Paraphrased question: How many clients have opened an account?
SQL: SELECT count(DISTINCT customer_id) FROM Accounts
Database: customers_and_invoices
Question: Count the number of customers who have an account.
Paraphrased question: Count the number of clients who have an account.
SQL: SELECT count(DISTINCT customer_id) FROM Accounts
Database: customers_and_invoices
Question: Show the id, the date of account opened, the account name, and other account detail for all accounts.
Paraphrased question: Show the id, the day of account opened, the account name, and other account information for all accounts.
SQL: SELECT account_id ,  date_account_opened ,  account_name ,  other_account_details FROM Accounts
Database: customers_and_invoices
Question: What are the ids, date opened, name, and other details for all accounts?
Paraphrased question: What are the ids, date opened, name, and other information for all accounts?
SQL: SELECT account_id ,  date_account_opened ,  account_name ,  other_account_details FROM Accounts
Database: customers_and_invoices
Question: Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.
Paraphrased question: Show the id, the account name, and other account information for all accounts by the customer with first name 'Meaghan'.
SQL: SELECT T1.account_id ,  T1.date_account_opened ,  T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  'Meaghan'
Database: customers_and_invoices
Question: What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name "Meaghan"?
Paraphrased question: What are the ids, names, day of opening, and other information for accounts corresponding to the customer with the first name "Meaghan"?
SQL: SELECT T1.account_id ,  T1.date_account_opened ,  T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  'Meaghan'
Database: customers_and_invoices
Question: Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.
Paraphrased question: Show the account name and other account information for all accounts by the customer with first name Meaghan and last name Keeling.
SQL: SELECT T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  "Meaghan" AND T2.customer_last_name  =  "Keeling"
Database: customers_and_invoices
Question: What are the names and other details for accounts corresponding to the customer named Meaghan Keeling?
Paraphrased question: What are the names and other information for accounts corresponding to the customer named Meaghan Keeling?
SQL: SELECT T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  "Meaghan" AND T2.customer_last_name  =  "Keeling"
Database: customers_and_invoices
Question: Show the first name and last name for the customer with account name 900.
Paraphrased question: Show the forename and last name for the customer with account name 900.
SQL: SELECT T2.customer_first_name ,  T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.account_name  =  "900"
Database: customers_and_invoices
Question: What are the full names of customers with the account name 900?
Paraphrased question: What are the full names of customers with the account name 900?
SQL: SELECT T2.customer_first_name ,  T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.account_name  =  "900"
Database: customers_and_invoices
Question: How many customers don't have an account?
Paraphrased question: How many clients don't have an account?
SQL: SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
Database: customers_and_invoices
Question: Count the number of customers who do not have an account.
Paraphrased question: Count the number of clients who do not have an account.
SQL: SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)
Database: customers_and_invoices
Question: Show the unique first names, last names, and phone numbers for all customers with any account.
Paraphrased question: Show the unique forename, family names, and phone numbers for all clients with any account.
SQL: SELECT DISTINCT T1.customer_first_name ,  T1.customer_last_name ,  T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id  =  T2.customer_id
Database: customers_and_invoices
Question: What are the distinct first names, last names, and phone numbers for customers with accounts?
Paraphrased question: What are the different full names, and telephone numbers for clients with accounts?
SQL: SELECT DISTINCT T1.customer_first_name ,  T1.customer_last_name ,  T1.phone_number FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id  =  T2.customer_id
Database: customers_and_invoices
Question: Show customer ids who don't have an account.
Paraphrased question: Show client ids who don't have an account.
SQL: SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts
Database: customers_and_invoices
Question: What are the customer ids for customers who do not have an account?
Paraphrased question: What are the client ids for clients who do not have an account?
SQL: SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts
Database: customers_and_invoices
Question: How many accounts does each customer have? List the number and customer id.
Paraphrased question: How many accounts does each client have? List the number and client id.
SQL: SELECT count(*) ,  customer_id FROM Accounts GROUP BY customer_id
Database: customers_and_invoices
Question: Count the number of accounts corresponding to each customer id.
Paraphrased question: Count the number of accounts corresponding to each client id.
SQL: SELECT count(*) ,  customer_id FROM Accounts GROUP BY customer_id
Database: customers_and_invoices
Question: What is the customer id, first and last name with most number of accounts.
Paraphrased question: What is the client id, full name with most number of accounts.
SQL: SELECT T1.customer_id ,  T2.customer_first_name ,  T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Database: customers_and_invoices
Question: Return the id and full name of the customer with the most accounts.
Paraphrased question: Return the id and full name of the client with the most accounts.
SQL: SELECT T1.customer_id ,  T2.customer_first_name ,  T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1
Database: customers_and_invoices
Question: Show id, first name and last name for all customers and the number of accounts.
Paraphrased question: Show id, forename and surname for all clients and the number of accounts.
SQL: SELECT T1.customer_id ,  T2.customer_first_name ,  T2.customer_last_name ,  count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id
Database: customers_and_invoices
Question: What are the the full names and ids for all customers, and how many accounts does each have?
Paraphrased question: What are the the full names and ids for all clients, and how many accounts does each have?
SQL: SELECT T1.customer_id ,  T2.customer_first_name ,  T2.customer_last_name ,  count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id
Database: customers_and_invoices
Question: Show first name and id for all customers with at least 2 accounts.
Paraphrased question: Show forename and id for all clients with at least 2 accounts.
SQL: SELECT T2.customer_first_name ,  T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  2
Database: customers_and_invoices
Question: What are the first names and ids for customers who have two or more accounts?
Paraphrased question: What are the forename and ids for clients who have two or more accounts?
SQL: SELECT T2.customer_first_name ,  T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  2
Database: customers_and_invoices
Question: Show the number of customers.
Paraphrased question: Show the number of clients.
SQL: SELECT count(*) FROM Customers
Database: customers_and_invoices
Question: Count the number of customers.
Paraphrased question: Count the number of clients.
SQL: SELECT count(*) FROM Customers
Database: customers_and_invoices
Question: Show the number of customers for each gender.
Paraphrased question: Show the number of clients for each sex.
SQL: SELECT gender ,  count(*) FROM Customers GROUP BY gender
Database: customers_and_invoices
Question: How many customers are there of each gender?
Paraphrased question: How many clients are there of each sex?
SQL: SELECT gender ,  count(*) FROM Customers GROUP BY gender
Database: customers_and_invoices
Question: How many transactions do we have?
Paraphrased question: How many transactions do we have?
SQL: SELECT count(*) FROM Financial_transactions
Database: customers_and_invoices
Question: Count the number of transactions.
Paraphrased question: Count the number of transactions.
SQL: SELECT count(*) FROM Financial_transactions
Database: customers_and_invoices
Question: How many transaction does each account have? Show the number and account id.
Paraphrased question: How many transaction does each account have? Show the number and account id.
SQL: SELECT count(*) ,  account_id FROM Financial_transactions
Database: customers_and_invoices
Question: Count the number of financial transactions that correspond to each account id.
Paraphrased question: Count the number of financial transactions that correspond to each account id.
SQL: SELECT count(*) ,  account_id FROM Financial_transactions
Database: customers_and_invoices
Question: How many transaction does account with name 337 have?
Paraphrased question: How many transaction does account with name 337 have?
SQL: SELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id  =  T2.account_id WHERE T2.account_name  =  "337"
Database: customers_and_invoices
Question: Count the number of financial transactions that the account with the name 337 has.
Paraphrased question: Count the number of financial transactions that the account with the name 337 has.
SQL: SELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id  =  T2.account_id WHERE T2.account_name  =  "337"
Database: customers_and_invoices
Question: What is the average, minimum, maximum, and total transaction amount?
Paraphrased question: What is the average, minimum, maximum, and total transaction amount?
SQL: SELECT avg(transaction_amount) ,  min(transaction_amount) ,  max(transaction_amount) ,   sum(transaction_amount) FROM Financial_transactions
Database: customers_and_invoices
Question: Return the average, minimum, maximum, and total transaction amounts.
Paraphrased question: Return the average, minimum, maximum, and total transaction amounts.
SQL: SELECT avg(transaction_amount) ,  min(transaction_amount) ,  max(transaction_amount) ,   sum(transaction_amount) FROM Financial_transactions
Database: customers_and_invoices
Question: Show ids for all transactions whose amounts are greater than the average.
Paraphrased question: Show ids for all transactions whose amounts are greater than the average.
SQL: SELECT transaction_id FROM Financial_transactions WHERE transaction_amount  >  (SELECT avg(transaction_amount) FROM Financial_transactions)
Database: customers_and_invoices
Question: What are the ids for transactions that have an amount greater than the average amount of a transaction?
Paraphrased question: What are the ids for transactions that have an amount greater than the average amount of a transaction?
SQL: SELECT transaction_id FROM Financial_transactions WHERE transaction_amount  >  (SELECT avg(transaction_amount) FROM Financial_transactions)
Database: customers_and_invoices
Question: Show the transaction types and the total amount of transactions.
Paraphrased question: Show the transaction types and the total amount of transactions.
SQL: SELECT transaction_type ,  sum(transaction_amount) FROM Financial_transactions GROUP BY transaction_type
Database: customers_and_invoices
Question: What are total transaction amounts for each transaction type?
Paraphrased question: What are total transaction amounts for each transaction type?
SQL: SELECT transaction_type ,  sum(transaction_amount) FROM Financial_transactions GROUP BY transaction_type
Database: customers_and_invoices
Question: Show the account name, id and the number of transactions for each account.
Paraphrased question: Show the account name, id and the number of transactions for each account.
SQL: SELECT T2.account_name ,  T1.account_id ,  count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id  =  T2.account_id GROUP BY T1.account_id
Database: customers_and_invoices
Question: Return the names and ids of each account, as well as the number of transactions.
Paraphrased question: Return the names and ids of each account, as well as the number of transactions.
SQL: SELECT T2.account_name ,  T1.account_id ,  count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id  =  T2.account_id GROUP BY T1.account_id
Database: customers_and_invoices
Question: Show the account id with most number of transactions.
Paraphrased question: Show the account id with most number of transactions.
SQL: SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY count(*) DESC LIMIT 1
Database: customers_and_invoices
Question: What is the id of the account with the most transactions?
Paraphrased question: What is the id of the account with the most transactions?
SQL: SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY count(*) DESC LIMIT 1
Database: customers_and_invoices
Question: Show the account id and name with at least 4 transactions.
Paraphrased question: Show the account id and name with at least 4 transactions.
SQL: SELECT T1.account_id ,  T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id  =  T2.account_id GROUP BY T1.account_id HAVING count(*)  >=  4
Database: customers_and_invoices
Question: What are the ids and names of accounts with 4 or more transactions?
Paraphrased question: What are the ids and names of accounts with 4 or more transactions?
SQL: SELECT T1.account_id ,  T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id  =  T2.account_id GROUP BY T1.account_id HAVING count(*)  >=  4
Database: customers_and_invoices
Question: Show all product sizes.
Paraphrased question: Show all goods sizes.
SQL: SELECT DISTINCT product_size FROM Products
Database: customers_and_invoices
Question: What are the different product sizes?
Paraphrased question: What are the different goods sizes?
SQL: SELECT DISTINCT product_size FROM Products
Database: customers_and_invoices
Question: Show all product colors.
Paraphrased question: Show all goods colours.
SQL: SELECT DISTINCT product_color FROM Products
Database: customers_and_invoices
Question: What are the different product colors?
Paraphrased question: What are the different goods colours?
SQL: SELECT DISTINCT product_color FROM Products
Database: customers_and_invoices
Question: Show the invoice number and the number of transactions for each invoice.
Paraphrased question: Show the invoice number and the number of transactions for each invoice.
SQL: SELECT invoice_number ,  count(*) FROM Financial_transactions GROUP BY invoice_number
Database: customers_and_invoices
Question: How many transactions correspond to each invoice number?
Paraphrased question: How many transactions correspond to each invoice number?
SQL: SELECT invoice_number ,  count(*) FROM Financial_transactions GROUP BY invoice_number
Database: customers_and_invoices
Question: What is the invoice number and invoice date for the invoice with most number of transactions?
Paraphrased question: What is the invoice number and invoice day for the invoice with most number of transactions?
SQL: SELECT T2.invoice_number ,  T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number  =  T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1
Database: customers_and_invoices
Question: What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?
Paraphrased question: What is the invoice number and invoice day corresponding to the invoice with the greatest number of transactions?
SQL: SELECT T2.invoice_number ,  T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number  =  T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1
Database: customers_and_invoices
Question: How many invoices do we have?
Paraphrased question: How many invoices do we have?
SQL: SELECT count(*) FROM Invoices
Database: customers_and_invoices
Question: Count the number of invoices.
Paraphrased question: Count the number of invoices.
SQL: SELECT count(*) FROM Invoices
Database: customers_and_invoices
Question: Show invoice dates and order id and details for all invoices.
Paraphrased question: Show invoice days and order id and details for all invoices.
SQL: SELECT T1.invoice_date ,  T1.order_id ,  T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id  =  T2.order_id