aherntech/spider-syn huggingface dataset:
Database: loan_1
Question: What are the names of customers who have both savings and checking accounts?
Paraphrased question: What are the names of clients who have both savings and checking accounts?
SQL: SELECT cust_name FROM customer WHERE acc_type  =  'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type  =  'checking'
Database: loan_1
Question: Find the name of customers who do not have an saving account.
Paraphrased question: Find the name of clients who do not have an saving account.
SQL: SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type  =  'saving'
Database: loan_1
Question: What are the names of customers who do not have saving accounts?
Paraphrased question: What are the names of clients who do not have saving accounts?
SQL: SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type  =  'saving'
Database: loan_1
Question: Find the name of customers who do not have a loan with a type of Mortgages.
Paraphrased question: Find the name of clients who do not have a loan with a type of Mortgages.
SQL: SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE T2.loan_type  =  'Mortgages'
Database: loan_1
Question: What are the names of customers who have not taken a Mortage loan?
Paraphrased question: What are the names of clients who have not taken a Mortage loan?
SQL: SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE T2.loan_type  =  'Mortgages'
Database: loan_1
Question: Find the name of customers who have loans of both Mortgages and Auto.
Paraphrased question: Find the name of clients who have loans of both Mortgages and Auto.
SQL: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE loan_type  =  'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE loan_type  =  'Auto'
Database: loan_1
Question: What are the names of customers who have taken both Mortgage and Auto loans?
Paraphrased question: What are the names of clients who have taken both Mortgage and Auto loans?
SQL: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE loan_type  =  'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE loan_type  =  'Auto'
Database: loan_1
Question: Find the name of customers whose credit score is below the average credit scores of all customers.
Paraphrased question: Find the name of clients whose credit score is below the average credit scores of all clients.
SQL: SELECT cust_name FROM customer WHERE credit_score  <  (SELECT avg(credit_score) FROM customer)
Database: loan_1
Question: What are the names of customers with credit score less than the average credit score across customers?
Paraphrased question: What are the names of clients with credit score less than the average credit score across clients?
SQL: SELECT cust_name FROM customer WHERE credit_score  <  (SELECT avg(credit_score) FROM customer)
Database: loan_1
Question: Find the branch name of the bank that has the most number of customers.
Paraphrased question: Find the branch name of the bank that has the most number of clients.
SQL: SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1
Database: loan_1
Question: What is the name of the bank branch with the greatest number of customers?
Paraphrased question: What is the name of the bank branch with the greatest number of clients?
SQL: SELECT bname FROM bank ORDER BY no_of_customers DESC LIMIT 1
Database: loan_1
Question: Find the name of customer who has the lowest credit score.
Paraphrased question: Find the name of client who has the lowest credit score.
SQL: SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1
Database: loan_1
Question: What is the name of the customer with the worst credit score?
Paraphrased question: What is the name of the client with the worst credit score?
SQL: SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1
Database: loan_1
Question: Find the name, account type, and account balance of the customer who has the highest credit score.
Paraphrased question: Find the name, account category, and account balance of the client who has the highest credit score.
SQL: SELECT cust_name ,  acc_type ,  acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1
Database: loan_1
Question: What is the name, account type, and account balance corresponding to the customer with the highest credit score?
Paraphrased question: What is the name, account category, and account balance corresponding to the client with the highest credit score?
SQL: SELECT cust_name ,  acc_type ,  acc_bal FROM customer ORDER BY credit_score DESC LIMIT 1
Database: loan_1
Question: Find the name of customer who has the highest amount of loans.
Paraphrased question: Find the name of client who has the highest amount of loans.
SQL: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount) DESC LIMIT 1
Database: loan_1
Question: What is the name of the customer who has greatest total loan amount?
Paraphrased question: What is the name of the client who has greatest total loan amount?
SQL: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount) DESC LIMIT 1
Database: loan_1
Question: Find the state which has the most number of customers.
Paraphrased question: Find the state which has the most number of clients.
SQL: SELECT state FROM bank GROUP BY state ORDER BY sum(no_of_customers) DESC LIMIT 1
Database: loan_1
Question: Which state has the greatest total number of bank customers?
Paraphrased question: Which state has the greatest total number of bank clients?
SQL: SELECT state FROM bank GROUP BY state ORDER BY sum(no_of_customers) DESC LIMIT 1
Database: loan_1
Question: For each account type, find the average account balance of customers with credit score lower than 50.
Paraphrased question: For each account category, find the average account balance of clients with credit score lower than 50.
SQL: SELECT avg(acc_bal) ,  acc_type FROM customer WHERE credit_score  <  50 GROUP BY acc_type
Database: loan_1
Question: What is the average account balance of customers with credit score below 50 for the different account types?
Paraphrased question: What is the average account balance of clients with credit score below 50 for the different account categories?
SQL: SELECT avg(acc_bal) ,  acc_type FROM customer WHERE credit_score  <  50 GROUP BY acc_type
Database: loan_1
Question: For each state, find the total account balance of customers whose credit score is above 100.
Paraphrased question: For each state, find the total account balance of clients whose credit score is above 100.
SQL: SELECT sum(acc_bal) ,  state FROM customer WHERE credit_score  >  100 GROUP BY state
Database: loan_1
Question: What is the total account balance for customers with a credit score of above 100 for the different states?
Paraphrased question: What is the total account balance for clients with a credit score of above 100 for the different states?
SQL: SELECT sum(acc_bal) ,  state FROM customer WHERE credit_score  >  100 GROUP BY state
Database: loan_1
Question: Find the total amount of loans offered by each bank branch.
Paraphrased question: Find the total amount of loans offered by each bank branch.
SQL: SELECT sum(amount) ,  T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id GROUP BY T1.bname
Database: loan_1
Question: What are the names of the different bank branches, and what are their total loan amounts?
Paraphrased question: What are the names of the different bank branches, and what are their total loan amounts?
SQL: SELECT sum(amount) ,  T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id GROUP BY T1.bname
Database: loan_1
Question: Find the name of customers who have more than one loan.
Paraphrased question: Find the name of clients who have more than one loan.
SQL: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name HAVING count(*)  >  1
Database: loan_1
Question: What are the names of customers who have taken out more than one loan?
Paraphrased question: What are the names of clients who have taken out more than one loan?
SQL: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name HAVING count(*)  >  1
Database: loan_1
Question: Find the name and account balance of the customers who have loans with a total amount of more than 5000.
Paraphrased question: Find the name and account balance of the clients who have loans with a total amount of more than 5000.
SQL: SELECT T1.cust_name ,  T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name HAVING sum(T2.amount)  >  5000
Database: loan_1
Question: What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?
Paraphrased question: What are the names and account balances for clients who have taken a total amount of more than 5000 in loans?
SQL: SELECT T1.cust_name ,  T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name HAVING sum(T2.amount)  >  5000
Database: loan_1
Question: Find the name of bank branch that provided the greatest total amount of loans.
Paraphrased question: Find the name of bank branch that provided the greatest total amount of loans.
SQL: SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id GROUP BY T1.bname ORDER BY sum(T2.amount) DESC LIMIT 1
Database: loan_1
Question: What is the name of the bank branch that has lent the greatest amount?
Paraphrased question: What is the name of the bank branch that has lent the greatest amount?
SQL: SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id GROUP BY T1.bname ORDER BY sum(T2.amount) DESC LIMIT 1
Database: loan_1
Question: Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.
Paraphrased question: Find the name of bank branch that provided the greatest total amount of loans to clients with credit score is less than 100.
SQL: SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id  =  T2.branch_id JOIN customer AS T3 ON T1.cust_id  =  T3.cust_id WHERE T3.credit_score  <  100 GROUP BY T2.bname ORDER BY sum(T1.amount) DESC LIMIT 1
Database: loan_1
Question: What is the name of the bank branch that has lended the largest total amount in loans, specifically to customers with credit scores below 100?
Paraphrased question: What is the name of the bank branch that has lended the largest total amount in loans, specifically to customers with credit scores below 100?
SQL: SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id  =  T2.branch_id JOIN customer AS T3 ON T1.cust_id  =  T3.cust_id WHERE T3.credit_score  <  100 GROUP BY T2.bname ORDER BY sum(T1.amount) DESC LIMIT 1
Database: loan_1
Question: Find the name of bank branches that provided some loans.
Paraphrased question: Find the name of bank branches that provided some loans.
SQL: SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id
Database: loan_1
Question: What are the names of the different banks that have provided loans?
Paraphrased question: What are the names of the different banks that have provided loans?
SQL: SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id
Database: loan_1
Question: Find the name and credit score of the customers who have some loans.
Paraphrased question: Find the name and credit score of the clients who have some loans.
SQL: SELECT DISTINCT T1.cust_name ,  T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id
Database: loan_1
Question: What are the different names and credit scores of customers who have taken a loan?
Paraphrased question: What are the different names and credit scores of clients who have taken a loan?
SQL: SELECT DISTINCT T1.cust_name ,  T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id
Database: loan_1
Question: Find the the name of the customers who have a loan with amount more than 3000.
Paraphrased question: Find the the name of the clients who have a loan with amount more than 3000.
SQL: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE amount  >  3000
Database: loan_1
Question: What are the names of customers who have a loan of more than 3000 in amount?
Paraphrased question: What are the names of clients who have a loan of more than 3000 in amount?
SQL: SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE amount  >  3000
Database: loan_1
Question: Find the city and name of bank branches that provide business loans.
Paraphrased question: Find the city and name of bank branches that provide business loans.
SQL: SELECT T1.bname ,  T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id WHERE T2.loan_type  =  'Business'
Database: loan_1
Question: What are the names and cities of bank branches that offer loans for business?
Paraphrased question: What are the names and cities of bank branches that offer loans for business?
SQL: SELECT T1.bname ,  T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id WHERE T2.loan_type  =  'Business'
Database: loan_1
Question: Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.
Paraphrased question: Find the names of bank branches that have provided a loan to any client whose credit score is below 100.
SQL: SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id  =  T2.branch_id JOIN customer AS T3 ON T1.cust_id  =  T3.cust_id WHERE T3.credit_score  <  100
Database: loan_1
Question: What are the names of banks that have loaned money to customers with credit scores below 100?
Paraphrased question: What are the names of banks that have loaned money to clients with credit scores below 100?
SQL: SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id  =  T2.branch_id JOIN customer AS T3 ON T1.cust_id  =  T3.cust_id WHERE T3.credit_score  <  100
Database: loan_1
Question: Find the total amount of loans provided by bank branches in the state of New York.
Paraphrased question: Find the total amount of loans provided by bank branches in the state of New York.
SQL: SELECT sum(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.state  =  'New York'
Database: loan_1
Question: What is the total amount of money loaned by banks in New York state?
Paraphrased question: What is the total amount of money loaned by banks in New York state?
SQL: SELECT sum(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.state  =  'New York'
Database: loan_1
Question: Find the average credit score of the customers who have some loan.
Paraphrased question: Find the average credit score of the clients who have some loan.
SQL: SELECT avg(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)
Database: loan_1
Question: What is the average credit score for customers who have taken a loan?
Paraphrased question: What is the average credit score for clients who have taken a loan?
SQL: SELECT avg(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan)
Database: loan_1
Question: Find the average credit score of the customers who do not have any loan.
Paraphrased question: Find the average credit score of the clients who do not have any loan.
SQL: SELECT avg(credit_score) FROM customer WHERE cust_id NOT IN (SELECT cust_id FROM loan)
Database: loan_1
Question: What is the average credit score for customers who have never taken a loan?
Paraphrased question: What is the average credit score for clients who have never taken a loan?
SQL: SELECT avg(credit_score) FROM customer WHERE cust_id NOT IN (SELECT cust_id FROM loan)
Database: behavior_monitoring
Question: How many assessment notes are there in total?
Paraphrased question: How many assessment notes are there in total?
SQL: SELECT count(*) FROM ASSESSMENT_NOTES
Database: behavior_monitoring
Question: What are the dates of the assessment notes?
Paraphrased question: What are the day of the assessment notes?
SQL: SELECT date_of_notes FROM Assessment_Notes
Database: behavior_monitoring
Question: How many addresses have zip code 197?
Paraphrased question: How many locations have zip code 197?
SQL: SELECT count(*) FROM ADDRESSES WHERE zip_postcode  =  "197"
Database: behavior_monitoring
Question: How many distinct incident type codes are there?
Paraphrased question: How many different event type codes are there?
SQL: SELECT count(DISTINCT incident_type_code) FROM Behavior_Incident
Database: behavior_monitoring
Question: Return all distinct detention type codes.
Paraphrased question: Return all different detainment type codes.
SQL: SELECT DISTINCT detention_type_code FROM Detention
Database: behavior_monitoring
Question: What are the start and end dates for incidents with incident type code "NOISE"?
Paraphrased question: What are the start and end day for event with event type code "NOISE"?
SQL: SELECT date_incident_start ,  date_incident_end FROM Behavior_Incident WHERE incident_type_code  =  "NOISE"
Database: behavior_monitoring
Question: Return all detention summaries.
Paraphrased question: Return all detainment summaries.
SQL: SELECT detention_summary FROM Detention
Database: behavior_monitoring
Question: Return the cell phone number and email address for all students.
Paraphrased question: Return the mobile phone number and email address for all students.
SQL: SELECT cell_mobile_number ,  email_address FROM STUDENTS
Database: behavior_monitoring
Question: What is the email of the student with first name "Emma" and last name "Rohan"?
Paraphrased question: What is the email of the student with first name "Emma" and last name "Rohan"?
SQL: SELECT email_address FROM Students WHERE first_name  =  "Emma" AND last_name  =  "Rohan"
Database: behavior_monitoring
Question: How many distinct students have been in detention?
Paraphrased question: How many different students have been in detainment?
SQL: SELECT count(DISTINCT student_id) FROM Students_in_Detention
Database: behavior_monitoring
Question: What is the gender of the teacher with last name "Medhurst"?
Paraphrased question: What is the sex of the teacher with last name "Medhurst"?
SQL: SELECT gender FROM TEACHERS WHERE last_name  =  "Medhurst"
Database: behavior_monitoring
Question: What is the incident type description for the incident type with code "VIOLENCE"?
Paraphrased question: What is the event type describing content for the even type with code "VIOLENCE"?
SQL: SELECT incident_type_description FROM Ref_Incident_Type WHERE incident_type_code  =  "VIOLENCE"
Database: behavior_monitoring
Question: Find the maximum and minimum monthly rental for all student addresses.
Paraphrased question: Find the maximum and minimum monthly rent for all student addresses.
SQL: SELECT max(monthly_rental) ,  min(monthly_rental) FROM Student_Addresses
Database: behavior_monitoring
Question: Find the first names of teachers whose email address contains the word "man".
Paraphrased question: Find the forename of teachers whose email address contains the word "man".
SQL: SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'
Database: behavior_monitoring
Question: List all information about the assessment notes sorted by date in ascending order.
Paraphrased question: List all information about the assessment notes sorted by date in ascending order.
SQL: SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC
Database: behavior_monitoring
Question: List all cities of addresses in alphabetical order.
Paraphrased question: List all towns of locations in alphabetical order.
SQL: SELECT city FROM Addresses ORDER BY city
Database: behavior_monitoring
Question: Find the first names and last names of teachers in alphabetical order of last name.
Paraphrased question: Find the full names of teachers in alphabetical order of family name.
SQL: SELECT first_name ,  last_name FROM Teachers ORDER BY last_name
Database: behavior_monitoring
Question: Find all information about student addresses, and sort by monthly rental in descending order.
Paraphrased question: Find all information about student locations, and sort by monthly rent in descending order.
SQL: SELECT * FROM Student_Addresses ORDER BY monthly_rental DESC
Database: behavior_monitoring
Question: Find the id and first name of the student that has the most number of assessment notes?
Paraphrased question: Find the id and forename of the student that has the most number of assessment notes?
SQL: SELECT T1.student_id ,  T2.first_name FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
Database: behavior_monitoring
Question: Find the ids and first names of the 3 teachers that have the most number of assessment notes?
Paraphrased question: Find the ids and forename of the 3 teachers that have the most number of assessment notes?
SQL: SELECT T1.teacher_id ,  T2.first_name FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 3
Database: behavior_monitoring
Question: Find the id and last name of the student that has the most behavior incidents?
Paraphrased question: Find the id and family name of the student that has the most behavior incidents?
SQL: SELECT T1.student_id ,  T2.last_name FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
Database: behavior_monitoring
Question: Find the id and last name of the teacher that has the most detentions with detention type code "AFTER"?
Paraphrased question: Find the id and family name of the teacher that has the most detentions with detention type code "AFTER"?
SQL: SELECT T1.teacher_id ,  T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T1.detention_type_code  =  "AFTER" GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1
Database: behavior_monitoring
Question: What are the id and first name of the student whose addresses have the highest average monthly rental?
Paraphrased question: What are the id and forename of the student whose addresses have the highest average monthly rental?
SQL: SELECT T1.student_id ,  T2.first_name FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY AVG(monthly_rental) DESC LIMIT 1
Database: behavior_monitoring
Question: Find the id and city of the student address with the highest average monthly rental.
Paraphrased question: Find the id and town of the student location with the highest average monthly rental.
SQL: SELECT T2.address_id ,  T1.city FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id GROUP BY T2.address_id ORDER BY AVG(monthly_rental) DESC LIMIT 1
Database: behavior_monitoring
Question: What are the code and description of the most frequent behavior incident type?
Paraphrased question: What are the code and describing content of the most frequent behavior incident type?
SQL: SELECT T1.incident_type_code ,  T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code  =  T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY count(*) DESC LIMIT 1
Database: behavior_monitoring
Question: What are the code and description of the least frequent detention type ?
Paraphrased question: What are the code and describing content of the least frequent detainment type ?
SQL: SELECT T1.detention_type_code ,  T2.detention_type_description FROM Detention AS T1 JOIN Ref_Detention_Type AS T2 ON T1.detention_type_code  =  T2.detention_type_code GROUP BY T1.detention_type_code ORDER BY count(*) ASC LIMIT 1
Database: behavior_monitoring
Question: Find the dates of assessment notes for students with first name "Fanny".
Paraphrased question: Find the day of assessment notes for students with forename "Fanny".
SQL: SELECT T1.date_of_notes FROM Assessment_Notes AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.first_name  =  "Fanny"
Database: behavior_monitoring
Question: Find the texts of assessment notes for teachers with last name "Schuster".
Paraphrased question: Find the texts of assessment notes for teachers with family name "Schuster".
SQL: SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.last_name  =  "Schuster"
Database: behavior_monitoring
Question: Find the start and end dates of behavior incidents of students with last name "Fahey".
Paraphrased question: Find the start and end day of behavior events of students with surname "Fahey".
SQL: SELECT T1.date_incident_start ,  date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.last_name  =  "Fahey"
Database: behavior_monitoring
Question: Find the start and end dates of detentions of teachers with last name "Schultz".
Paraphrased question: Find the start and end day of detainments of teachers with surname "Schultz".
SQL: SELECT T1.datetime_detention_start ,  datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.last_name  =  "Schultz"
Database: behavior_monitoring
Question: What are the id and zip code of the address with the highest monthly rental?
Paraphrased question: What are the id and postal code of the address with the highest monthly rent?
SQL: SELECT T2.address_id ,  T1.zip_postcode FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id ORDER BY monthly_rental DESC LIMIT 1
Database: behavior_monitoring
Question: What is the cell phone number of the student whose address has the lowest monthly rental?
Paraphrased question: What is the mobile phone number of the student whose address has the lowest monthly rental?
SQL: SELECT T2.cell_mobile_number FROM Student_Addresses AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id ORDER BY T1.monthly_rental ASC LIMIT 1
Database: behavior_monitoring
Question: What are the monthly rentals of student addresses in Texas state?
Paraphrased question: What are the monthly rent of student locations in Texas state?
SQL: SELECT T2.monthly_rental FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id WHERE T1.state_province_county  =  "Texas"
Database: behavior_monitoring
Question: What are the first names and last names of students with address in Wisconsin state?
Paraphrased question: What are the forename and surname of students with address in Wisconsin state?
SQL: SELECT T2.first_name ,  T2.last_name FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.address_id WHERE T1.state_province_county  =  "Wisconsin"
Database: behavior_monitoring
Question: What are the line 1 and average monthly rentals of all student addresses?
Paraphrased question: What are the line 1 and average monthly rent of all student addresses?
SQL: SELECT T1.line_1 ,  avg(T2.monthly_rental) FROM Addresses AS T1 JOIN Student_Addresses AS T2 ON T1.address_id  =  T2.address_id GROUP BY T2.address_id
Database: behavior_monitoring
Question: What is the zip code of the address where the teacher with first name "Lyla" lives?
Paraphrased question: What is the postal code of the location where the teacher with forename "Lyla" lives?
SQL: SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T2.first_name  =  "Lyla"
Database: behavior_monitoring
Question: What are the email addresses of teachers whose address has zip code "918"?
Paraphrased question: What are the email addresses of teachers whose address has zip code "918"?
SQL: SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T1.zip_postcode  =  "918"
Database: behavior_monitoring
Question: How many students are not involved in any behavior incident?
Paraphrased question: How many students are not involved in any behavior event?
SQL: SELECT count(*) FROM STUDENTS WHERE student_id NOT IN ( SELECT student_id FROM Behavior_Incident )
Database: behavior_monitoring
Question: Find the last names of teachers who are not involved in any detention.
Paraphrased question: Find the family names of teachers who are not involved in any detention.
SQL: SELECT last_name FROM Teachers EXCEPT SELECT T1.last_name FROM Teachers AS T1 JOIN Detention AS T2 ON T1.teacher_id  =  T2.teacher_id
Database: behavior_monitoring
Question: What are the line 1 of addresses shared by some students and some teachers?
Paraphrased question: What are the line 1 of locations shared by some students and some teachers?
SQL: SELECT T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.address_id INTERSECT SELECT T1.line_1 FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id
Database: assets_maintenance
Question: Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.
Paraphrased question: Which assets have 2 parts and have less than 2 fault logs? List the asset id and information.
SQL: SELECT T1.asset_id ,  T1.asset_details FROM Assets AS T1 JOIN Asset_Parts AS T2 ON T1.asset_id  =  T2.asset_id GROUP BY T1.asset_id HAVING count(*)  =  2 INTERSECT SELECT T1.asset_id ,  T1.asset_details FROM Assets AS T1 JOIN Fault_Log AS T2 ON T1.asset_id  =  T2.asset_id GROUP BY T1.asset_id HAVING count(*)  <  2
Database: assets_maintenance
Question: How many assets does each maintenance contract contain? List the number and the contract id.
Paraphrased question: How many assets does each maintenance contract contain? List the number and the contract id.
SQL: SELECT count(*) ,  T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id  =  T2.maintenance_contract_id GROUP BY T1.maintenance_contract_id
Database: assets_maintenance
Question: How many assets does each third party company supply? List the count and the company id.
Paraphrased question: How many assets does each third party enterprise supply? List the count and the enterprise id.
SQL: SELECT count(*) ,  T1.company_id FROM Third_Party_Companies AS T1 JOIN Assets AS T2 ON T1.company_id  =  T2.supplier_company_id GROUP BY T1.company_id
Database: assets_maintenance
Question: Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.
Paraphrased question: Which third party enterprise have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the enterprise id and name.
SQL: SELECT T1.company_id ,  T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Engineers AS T2 ON T1.company_id  =  T2.company_id GROUP BY T1.company_id HAVING count(*)  >=  2 UNION SELECT T3.company_id ,  T3.company_name FROM Third_Party_Companies AS T3 JOIN Maintenance_Contracts AS T4 ON T3.company_id  =  T4.maintenance_contract_company_id GROUP BY T3.company_id HAVING count(*)  >=  2
Database: assets_maintenance
Question: What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?
Paraphrased question: What is the name and id of the employee who recorded the fault log but has not contacted any visiting engineers?
SQL: SELECT T1.staff_name ,  T1.staff_id FROM Staff AS T1 JOIN Fault_Log AS T2 ON T1.staff_id  =  T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name ,  T3.staff_id FROM Staff AS T3 JOIN Engineer_Visits AS T4 ON T3.staff_id  =  T4.contact_staff_id
Database: assets_maintenance
Question: Which engineer has visited the most times? Show the engineer id, first name and last name.
Paraphrased question: Which engineer has visited the most times? Show the engineer id, full name.
SQL: SELECT T1.engineer_id ,  T1.first_name ,  T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 GROUP BY T1.engineer_id ORDER BY count(*) DESC LIMIT 1
Database: assets_maintenance
Question: Which parts have more than 2 faults? Show the part name and id.
Paraphrased question: Which components have more than 2 faults? Show the component name and id.
SQL: SELECT T1.part_name ,  T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id  =  T2.part_id GROUP BY T1.part_id HAVING count(*)  >  2
Database: assets_maintenance
Question: List all every engineer's first name, last name, details and coresponding skill description.
Paraphrased question: List all every engineer's forename, surname, detail and coresponding skill describing content.
SQL: SELECT T1.first_name ,  T1.last_name ,  T1.other_details ,  T3.skill_description FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id  =  T2.engineer_id JOIN Skills AS T3 ON T2.skill_id  =  T3.skill_id
Database: assets_maintenance
Question: For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description.
Paraphrased question: For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill describing content.
SQL: SELECT T1.fault_short_name ,  T3.skill_description FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id  =  T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id  =  T3.skill_id
Database: assets_maintenance
Question: How many assets can each parts be used in? List the part name and the number.
Paraphrased question: How many assets can each component be used in? List the component name and the number.
SQL: SELECT T1.part_name ,  count(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id  =  T2.part_id GROUP BY T1.part_name
Database: assets_maintenance
Question: What are all the fault descriptions and the fault status of all the faults recoreded in the logs?
Paraphrased question: What are all the fault descriptions and the fault status of all the fault recoreded in the logs?
SQL: SELECT T1.fault_description ,  T2.fault_status FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id  =  T2.fault_log_entry_id
Database: assets_maintenance
Question: How many engineer visits are required at most for a single fault log? List the number and the log entry id.
Paraphrased question: How many engineer visits are required at most for a single fault log? List the number and the log entry id.
SQL: SELECT count(*) ,  T1.fault_log_entry_id FROM Fault_Log AS T1 JOIN Engineer_Visits AS T2 ON T1.fault_log_entry_id  =  T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1
Database: assets_maintenance
Question: What are all the distinct last names of all the engineers?
Paraphrased question: What are all the different family names of all the engineers?
SQL: SELECT DISTINCT last_name FROM Maintenance_Engineers
Database: assets_maintenance
Question: How many fault status codes are recorded in the fault log parts table?
Paraphrased question: How many fault status codes are recorded in the fault log parts table?
SQL: SELECT DISTINCT fault_status FROM Fault_Log_Parts
Database: assets_maintenance
Question: Which engineers have never visited to maintain the assets? List the engineer first name and last name.
Paraphrased question: Which engineers have never visited to maintain the assets? List the engineer full name.
SQL: SELECT first_name ,  last_name FROM Maintenance_Engineers WHERE engineer_id NOT IN (SELECT engineer_id FROM Engineer_Visits)
Database: assets_maintenance
Question: List the asset id, details, make and model for every asset.
Paraphrased question: List the asset id, information, make and type for every asset.
SQL: SELECT asset_id ,  asset_details ,  asset_make ,  asset_model FROM Assets
Database: assets_maintenance
Question: When was the first asset acquired?
Paraphrased question: When was the first asset acquired?
SQL: SELECT asset_acquired_date FROM Assets ORDER BY asset_acquired_date ASC LIMIT 1
Database: assets_maintenance
Question: Which part fault requires the most number of skills to fix? List part id and name.
Paraphrased question: Which component fault requires the most number of skills to fix? List component id and name.
SQL: SELECT T1.part_id ,  T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id  =  T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id  =  T3.part_fault_id GROUP BY T1.part_id ORDER BY count(*) DESC LIMIT 1
Database: assets_maintenance
Question: Which kind of part has the least number of faults? List the part name.
Paraphrased question: Which kind of component has the least number of faults? List the component name.
SQL: SELECT T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id  =  T2.part_id GROUP BY T1.part_name ORDER BY count(*) ASC LIMIT 1
Database: assets_maintenance
Question: Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name.
Paraphrased question: Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, full name.
SQL: SELECT T1.engineer_id ,  T1.first_name ,  T1.last_name FROM Maintenance_Engineers AS T1 JOIN Engineer_Visits AS T2 ON T1.engineer_id  =  T2.engineer_id GROUP BY T1.engineer_id ORDER BY count(*) ASC LIMIT 1
Database: assets_maintenance
Question: Which staff have contacted which engineers? List the staff name and the engineer first name and last name.
Paraphrased question: Which employee have contacted which engineers? List the employee name and the engineer forename and surname.
SQL: SELECT T1.staff_name ,  T3.first_name ,  T3.last_name FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id  =  T2.contact_staff_id JOIN Maintenance_Engineers AS T3 ON T2.engineer_id  =  T3.engineer_id
Database: assets_maintenance
Question: Which fault log included the most number of faulty parts? List the fault log id, description and record time.
Paraphrased question: Which fault log included the most number of faulty parts? List the fault log id, describing content and record time.
SQL: SELECT T1.fault_log_entry_id ,  T1.fault_description ,  T1.fault_log_entry_datetime FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id  =  T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1
Database: assets_maintenance
Question: Which skill is used in fixing the most number of faults? List the skill id and description.
Paraphrased question: Which skill is used in fixing the most number of faults? List the skill id and describing content.
SQL: SELECT T1.skill_id ,  T1.skill_description FROM Skills AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.skill_id  =  T2.skill_id GROUP BY T1.skill_id ORDER BY count(*) DESC LIMIT 1
Database: assets_maintenance
Question: What are all the distinct asset models?
Paraphrased question: What are all the distinct asset models?
SQL: SELECT DISTINCT asset_model FROM Assets
Database: assets_maintenance
Question: List the all the assets make, model, details by the disposed date ascendingly.
Paraphrased question: List the all the assets make, type, detail by the disposed date ascendingly.
SQL: SELECT asset_make ,  asset_model ,  asset_details FROM Assets ORDER BY asset_disposed_date ASC
Database: assets_maintenance
Question: Which part has the least chargeable amount? List the part id and amount.
Paraphrased question: Which component has the least chargeable amount? List the component id and amount.
SQL: SELECT part_id ,  chargeable_amount FROM Parts ORDER BY chargeable_amount ASC LIMIT 1
Database: assets_maintenance
Question: Which company started the earliest the maintenance contract? Show the company name.
Paraphrased question: Which enterprise started the earliest the maintenance contract? Show the enterprise name.
SQL: SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id  =  T2.maintenance_contract_company_id ORDER BY T2.contract_start_date ASC LIMIT 1
Database: assets_maintenance
Question: What is the description of the type of the company who concluded its contracts most recently?
Paraphrased question: What is the describing content of the type of the enterprise who concluded its contracts most recently?
SQL: SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id  =  T2.maintenance_contract_company_id JOIN Ref_Company_Types AS T3 ON T1.company_type_code  =  T3.company_type_code ORDER BY T2.contract_end_date DESC LIMIT 1
Database: assets_maintenance
Question: Which gender makes up the majority of the staff?
Paraphrased question: Which sex makes up the majority of the employee?
SQL: SELECT gender FROM staff GROUP BY gender ORDER BY count(*) DESC LIMIT 1
Database: assets_maintenance
Question: How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.
Paraphrased question: How many engineers did each employee contact? List both the contact employee name and number of engineers contacted.
SQL: SELECT T1.staff_name ,  count(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id  =  T2.contact_staff_id GROUP BY T1.staff_name
Database: assets_maintenance
Question: Which assets did not incur any fault log? List the asset model.
Paraphrased question: Which assets did not incur any fault log? List the asset type.
SQL: SELECT asset_model FROM Assets WHERE asset_id NOT IN (SELECT asset_id FROM Fault_Log)
Database: station_weather
Question: list the local authorities and services provided by all stations.
Paraphrased question: list the local authorities and services provided by all terminals.
SQL: SELECT local_authority ,  services FROM station
Database: station_weather
Question: show all train numbers and names ordered by their time from early to late.
Paraphrased question: show all train numbers and names ordered by their time from early to late.
SQL: SELECT train_number ,  name FROM train ORDER BY TIME
Database: station_weather
Question: Give me the times and numbers of all trains that go to Chennai, ordered by time.
Paraphrased question: Give me the times and numbers of all trains that go to Chennai, ordered by time.
SQL: SELECT TIME ,  train_number FROM train WHERE destination  =  'Chennai' ORDER BY TIME
Database: station_weather
Question: How many trains have 'Express' in their names?
Paraphrased question: How many trains have 'Express' in their names?
SQL: SELECT count(*) FROM train WHERE name LIKE "%Express%"
Database: station_weather
Question: Find the number and time of the train that goes from Chennai to Guruvayur.
Paraphrased question: Find the number and time of the train that goes from Chennai to Guruvayur.
SQL: SELECT train_number ,  TIME FROM train WHERE origin  =  'Chennai' AND destination  =  'Guruvayur'
Database: station_weather
Question: Find the number of trains starting from each origin.
Paraphrased question: Find the number of trains starting from each origin.
SQL: SELECT origin ,  count(*) FROM train GROUP BY origin
Database: station_weather
Question: Find the name of the train whose route runs through greatest number of stations.
Paraphrased question: Find the name of the train whose route runs through greatest number of stations.
SQL: SELECT t1.name FROM train AS t1 JOIN route AS t2 ON t1.id  =  t2.train_id GROUP BY t2.train_id ORDER BY count(*) DESC LIMIT 1
Database: station_weather
Question: Find the number of trains for each station, as well as the station network name and services.
Paraphrased question: Find the number of trains for each terminal, as well as the terminal network name and services.
SQL: SELECT count(*) ,  t1.network_name ,  t1.services FROM station AS t1 JOIN route AS t2 ON t1.id  =  t2.station_id GROUP BY t2.station_id
Database: station_weather
Question: What is the average high temperature for each day of week?
Paraphrased question: What is the average  high temperature for each day of week?
SQL: SELECT avg(high_temperature) ,  day_of_week FROM weekly_weather GROUP BY day_of_week
Database: station_weather
Question: Give me the maximum low temperature and average precipitation at the Amersham station.
Paraphrased question: Give me the maximum low temperature and average precipitation at the Amersham station.
SQL: SELECT max(t1.low_temperature) ,  avg(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id  =  t2.id WHERE t2.network_name  =  "Amersham"
Database: station_weather
Question: Find names and times of trains that run through stations for the local authority Chiltern.
Paraphrased question: Find names and times of trains that run through terminals for the local authority Chiltern.
SQL: SELECT t3.name ,  t3.time FROM station AS t1 JOIN route AS t2 ON t1.id  =  t2.station_id JOIN train AS t3 ON t2.train_id  =  t3.id WHERE t1.local_authority  =  "Chiltern"
Database: station_weather
Question: How many different services are provided by all stations?
Paraphrased question: How many different services are provided by all terminals?
SQL: SELECT count(DISTINCT services) FROM station
Database: station_weather
Question: Find the id and local authority of the station with has the highest average high temperature.
Paraphrased question: Find the id and local authority of the terminal with has the highest average high temperature.
SQL: SELECT t2.id ,  t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id  =  t2.id GROUP BY t1.station_id ORDER BY avg(high_temperature) DESC LIMIT 1
Database: station_weather
Question: Find the id and local authority of the station whose maximum precipitation is higher than 50.
Paraphrased question: Find the id and local authority of the station whose maximum precipitation is higher than 50.
SQL: SELECT t2.id ,  t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id  =  t2.id GROUP BY t1.station_id HAVING max(t1.precipitation)  >  50
Database: station_weather
Question: show the lowest low temperature and highest wind speed in miles per hour.
Paraphrased question: show the lowest low temperature and highest wind velocity in miles per hour.
SQL: SELECT min(low_temperature) ,  max(wind_speed_mph) FROM weekly_weather
Database: station_weather
Question: Find the origins from which more than 1 train starts.
Paraphrased question: Find the starting point from which more than 1 train starts.
SQL: SELECT origin FROM train GROUP BY origin HAVING count(*)  >  1
Database: college_1
Question: Find the number of professors in accounting department.
Paraphrased question: Find the number of professors in accounting division.
SQL: SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE DEPT_NAME  =  "Accounting"
Database: college_1
Question: How many professors are in the accounting dept?
Paraphrased question: How many professors are in the accounting dept?
SQL: SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE DEPT_NAME  =  "Accounting"
Database: college_1
Question: How many professors are teaching class with code ACCT-211?
Paraphrased question: How many professors are teaching class with code ACCT-211?
SQL: SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE  =  "ACCT-211"
Database: college_1
Question: How many professors teach a class with the code ACCT-211?
Paraphrased question: How many professors teach a class with the code ACCT-211?
SQL: SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE  =  "ACCT-211"
Database: college_1
Question: What is the first and last name of the professor in biology department?
Paraphrased question: What is the full name of the professor in biology department?
SQL: SELECT T3.EMP_FNAME ,  T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM  =  T3.EMP_NUM WHERE DEPT_NAME  =  "Biology"
Database: college_1
Question: What are the first and last name of all biology professors?
Paraphrased question: What are the forename and surname of all biology professors?
SQL: SELECT T3.EMP_FNAME ,  T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM  =  T3.EMP_NUM WHERE DEPT_NAME  =  "Biology"