aherntech/spider-syn huggingface dataset:
Database: tracking_grants_for_research
Question: For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.
Paraphrased question: For grants with both files described as 'Regular' and files described as 'Initial Application', list its start day.
SQL: SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Initial Application'
Database: tracking_grants_for_research
Question: For grants that have descriptions of Regular and Initial Applications, what are their start dates?
Paraphrased question: For grants that have descriptions of Regular and Initial Applications, what are their start day?
SQL: SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Initial Application'
Database: tracking_grants_for_research
Question: How many documents can one grant have at most? List the grant id and number.
Paraphrased question: How many files can one grant have at most? List the grant id and number.
SQL: SELECT grant_id ,  count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_grants_for_research
Question: For each grant id, how many documents does it have, and which one has the most?
Paraphrased question: For each grant id, how many files does it have, and which one has the most?
SQL: SELECT grant_id ,  count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_grants_for_research
Question: Find the organisation type description of the organisation detailed as 'quo'.
Paraphrased question: Find the organisation type description of the organisation detailed as 'quo'.
SQL: SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_details  =  'quo'
Database: tracking_grants_for_research
Question: What is the type description of the organization whose detail is listed as 'quo'?
Paraphrased question: What is the type description of the organization whose information is listed as 'quo'?
SQL: SELECT T1.organisation_type_description FROM organisation_Types AS T1 JOIN Organisations AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_details  =  'quo'
Database: tracking_grants_for_research
Question: What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.
Paraphrased question: What are all the information of the organisations described as 'Sponsor'? Sort the result in an ascending order.
SQL: SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_type_description  =  'Sponsor' ORDER BY organisation_details
Database: tracking_grants_for_research
Question: What are the details of all organizations that are described as Sponsors and sort the results in ascending order?
Paraphrased question: What are the information of all organizations that are described as Sponsors and sort the results in ascending order?
SQL: SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_type_description  =  'Sponsor' ORDER BY organisation_details
Database: tracking_grants_for_research
Question: How many Patent outcomes are generated from all the projects?
Paraphrased question: How many Patent outcomes are generated from all the projects?
SQL: SELECT count(*) FROM Project_outcomes WHERE outcome_code  =  'Patent'
Database: tracking_grants_for_research
Question: How many patents outcomes were listed for all the projects?
Paraphrased question: How many patents outcomes were listed for all the projects?
SQL: SELECT count(*) FROM Project_outcomes WHERE outcome_code  =  'Patent'
Database: tracking_grants_for_research
Question: How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?
Paraphrased question: How many project member worked as leaders or started working before '1989-04-24 23:51:54'?
SQL: SELECT count(*) FROM Project_Staff WHERE role_code  =  'leader' OR date_from  <  '1989-04-24 23:51:54'
Database: tracking_grants_for_research
Question: How many project members were leaders or started working before '1989-04-24 23:51:54'?
Paraphrased question: How many project members were leaders or started working before '1989-04-24 23:51:54'?
SQL: SELECT count(*) FROM Project_Staff WHERE role_code  =  'leader' OR date_from  <  '1989-04-24 23:51:54'
Database: tracking_grants_for_research
Question: What is the last date of the staff leaving the projects?
Paraphrased question: What is the last date of the member leaving the projects?
SQL: SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1
Database: tracking_grants_for_research
Question: What is the last date that a staff member left a project?
Paraphrased question: What is the last date that a staff member left a project?
SQL: SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1
Database: tracking_grants_for_research
Question: What are the result description of the project whose detail is 'sint'?
Paraphrased question: What are the result describing content of the project whose detail is 'sint'?
SQL: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code JOIN Projects AS T3 ON T2.project_id  =  T3.project_id WHERE T3.project_details  =  'sint'
Database: tracking_grants_for_research
Question: What is the description for the results whose project detail is 'sint'?
Paraphrased question: What is the describing content for the results whose project detail is 'sint'?
SQL: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code JOIN Projects AS T3 ON T2.project_id  =  T3.project_id WHERE T3.project_details  =  'sint'
Database: tracking_grants_for_research
Question: List the organisation id with the maximum outcome count, and the count.
Paraphrased question: List the organisation id with the maximum result count, and the count.
SQL: SELECT T1.organisation_id ,  count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_grants_for_research
Question: What is the id of the organization with the maximum number of outcomes and how many outcomes are there?
Paraphrased question: What is the id of the organization with the maximum number of result and how many result are there?
SQL: SELECT T1.organisation_id ,  count(*) FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1
Database: tracking_grants_for_research
Question: List the project details of the projects launched by the organisation
Paraphrased question: List the project information of the projects launched by the organisation
SQL: SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )
Database: tracking_grants_for_research
Question: What are the details for the projects which were launched by the organization with the most projects?
Paraphrased question: What are the information for the projects which were launched by the organization with the most projects?
SQL: SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )
Database: tracking_grants_for_research
Question: List the research staff details, and order in ascending order.
Paraphrased question: List the research employee information, and order in ascending order.
SQL: SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC
Database: tracking_grants_for_research
Question: What details are there on the research staff? List the result in ascending alphabetical order.
Paraphrased question: What information are there on the research member? List the result in ascending alphabetical order.
SQL: SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC
Database: tracking_grants_for_research
Question: How many tasks are there in total?
Paraphrased question: How many tasks are there in total?
SQL: SELECT count(*) FROM Tasks
Database: tracking_grants_for_research
Question: How many tasks are there?
Paraphrased question: How many mission are there?
SQL: SELECT count(*) FROM Tasks
Database: tracking_grants_for_research
Question: How many tasks does each project have? List the task count and the project detail.
Paraphrased question: How many mission does each project have? List the mission count and the project information.
SQL: SELECT count(*) ,  T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id
Database: tracking_grants_for_research
Question: For each project id, how many tasks are there?
Paraphrased question: For each project id, how many mission are there?
SQL: SELECT count(*) ,  T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id
Database: tracking_grants_for_research
Question: What are the staff roles of the staff who
Paraphrased question: What are the member roles of the member who
SQL: SELECT role_code FROM Project_Staff WHERE date_from  >  '2003-04-19 15:06:20' AND date_to  <  '2016-03-15 00:33:18'
Database: tracking_grants_for_research
Question: What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?
Paraphrased question: What roles did members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?
SQL: SELECT role_code FROM Project_Staff WHERE date_from  >  '2003-04-19 15:06:20' AND date_to  <  '2016-03-15 00:33:18'
Database: tracking_grants_for_research
Question: What are the descriptions of all the project outcomes?
Paraphrased question: What are the describing contents of all the project results?
SQL: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code
Database: tracking_grants_for_research
Question: List the description of the outcomes for all projects.
Paraphrased question: List the describing content of the results for all projects.
SQL: SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code
Database: tracking_grants_for_research
Question: Which role is most common for the staff?
Paraphrased question: Which role is most common for the member?
SQL: SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
Database: tracking_grants_for_research
Question: What is the most common role for the staff?
Paraphrased question: What is the most common role for the member?
SQL: SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
Database: network_2
Question: How many friends does Dan have?
Paraphrased question: How many friends does Dan have?
SQL: SELECT count(distinct T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T1.name  =  'Dan'
Database: network_2
Question: How many females does this network has?
Paraphrased question: How many women does this network has?
SQL: SELECT count(*) FROM Person WHERE gender  =  'female'
Database: network_2
Question: How many females are in the network?
Paraphrased question: How many women are in the network?
SQL: SELECT count(*) FROM Person WHERE gender  =  'female'
Database: network_2
Question: What is the average age for all person?
Paraphrased question: What is the average age for all person?
SQL: SELECT avg(age) FROM Person
Database: network_2
Question: What is the average age for all people in the table?
Paraphrased question: What is the average age for all people in the table?
SQL: SELECT avg(age) FROM Person
Database: network_2
Question: How many different cities are they from?
Paraphrased question: How many different towns are they from?
SQL: SELECT count(DISTINCT city) FROM Person
Database: network_2
Question: How many different cities do people originate from?
Paraphrased question: How many different towns do people originate from?
SQL: SELECT count(DISTINCT city) FROM Person
Database: network_2
Question: How many type of jobs do they have?
Paraphrased question: How many type of occupation do they have?
SQL: SELECT count(DISTINCT job) FROM Person
Database: network_2
Question: How many different jobs are listed?
Paraphrased question: How many different occupation are listed?
SQL: SELECT count(DISTINCT job) FROM Person
Database: network_2
Question: Who is the oldest person?
Paraphrased question: Who is the oldest person?
SQL: SELECT name FROM Person WHERE age  =  (SELECT max(age) FROM person)
Database: network_2
Question: What is the name of the person who is the oldest?
Paraphrased question: What is the name of the person who is the oldest?
SQL: SELECT name FROM Person WHERE age  =  (SELECT max(age) FROM person)
Database: network_2
Question: Who is the oldest person whose job is student?
Paraphrased question: Who is the oldest person whose occupation is student?
SQL: SELECT name FROM Person WHERE job  =  'student' AND age  =  (SELECT max(age) FROM person WHERE job  =  'student' )
Database: network_2
Question: What is the name of the oldest student?
Paraphrased question: What is the name of the oldest student?
SQL: SELECT name FROM Person WHERE job  =  'student' AND age  =  (SELECT max(age) FROM person WHERE job  =  'student' )
Database: network_2
Question: Who is the youngest male?
Paraphrased question: Who is the youngest male?
SQL: SELECT name FROM Person WHERE gender  =  'male' AND age  =  (SELECT min(age) FROM person WHERE gender  =  'male' )
Database: network_2
Question: What is the name of the youngest male?
Paraphrased question: What is the name of the youngest male?
SQL: SELECT name FROM Person WHERE gender  =  'male' AND age  =  (SELECT min(age) FROM person WHERE gender  =  'male' )
Database: network_2
Question: How old is the doctor named Zach?
Paraphrased question: How old is the physician named Zach?
SQL: SELECT age FROM Person WHERE job  =  'doctor' AND name  =  'Zach'
Database: network_2
Question: What is the age of the doctor named Zach?
Paraphrased question: What is the age of the physician named Zach?
SQL: SELECT age FROM Person WHERE job  =  'doctor' AND name  =  'Zach'
Database: network_2
Question: Who is the person whose age is below 30?
Paraphrased question: Who is the person whose age is below 30?
SQL: SELECT name FROM Person WHERE age  <  30
Database: network_2
Question: What is the name of the person whose age is below 30?
Paraphrased question: What is the name of the person whose age is below 30?
SQL: SELECT name FROM Person WHERE age  <  30
Database: network_2
Question: How many people whose age is greater 30 and job is engineer?
Paraphrased question: How many people whose age is greater 30 and job is engineer?
SQL: SELECT count(*) FROM Person WHERE age  >  30 AND job  =  'engineer'
Database: network_2
Question: HOw many engineers are older than 30?
Paraphrased question: HOw many engineers are older than 30?
SQL: SELECT count(*) FROM Person WHERE age  >  30 AND job  =  'engineer'
Database: network_2
Question: What is the average age for each gender?
Paraphrased question: What is the average age for each sex?
SQL: SELECT avg(age) ,  gender FROM Person GROUP BY gender
Database: network_2
Question: How old is each gender, on average?
Paraphrased question: How old is each sex, on average?
SQL: SELECT avg(age) ,  gender FROM Person GROUP BY gender
Database: network_2
Question: What is average age for different job title?
Paraphrased question: What is average age for different occupation name?
SQL: SELECT avg(age) ,  job FROM Person GROUP BY job
Database: network_2
Question: How old is the average person for each job?
Paraphrased question: How old is the average person for each occupation?
SQL: SELECT avg(age) ,  job FROM Person GROUP BY job
Database: network_2
Question: What is average age of male for different job title?
Paraphrased question: What is average age of male for different occupation title?
SQL: SELECT avg(age) ,  job FROM Person WHERE gender  =  'male' GROUP BY job
Database: network_2
Question: What is the average age for a male in each job?
Paraphrased question: What is the average age for a male in each occupation?
SQL: SELECT avg(age) ,  job FROM Person WHERE gender  =  'male' GROUP BY job
Database: network_2
Question: What is minimum age for different job title?
Paraphrased question: What is minimum age for different occupation title?
SQL: SELECT min(age) ,  job FROM Person GROUP BY job
Database: network_2
Question: How old is the youngest person for each job?
Paraphrased question: How old is the youngest person for each occupation?
SQL: SELECT min(age) ,  job FROM Person GROUP BY job
Database: network_2
Question: Find the number of people who is under 40 for each gender.
Paraphrased question: Find the number of people who is under 40 for each sex.
SQL: SELECT count(*) ,  gender FROM Person WHERE age  <  40 GROUP BY gender
Database: network_2
Question: How many people are under 40 for each gender?
Paraphrased question: How many people are under 40 for each sex?
SQL: SELECT count(*) ,  gender FROM Person WHERE age  <  40 GROUP BY gender
Database: network_2
Question: Find the name of people whose age is greater than any engineer sorted by their age.
Paraphrased question: Find the name of people whose age is greater than any engineer sorted by their age.
SQL: SELECT name FROM Person WHERE age  >  (SELECT min(age) FROM person WHERE job  =  'engineer') ORDER BY age
Database: network_2
Question: What is the name of all the people who are older than at least one engineer? Order them by age.
Paraphrased question: What is the name of all the people who are older than at least one engineer? Order them by age.
SQL: SELECT name FROM Person WHERE age  >  (SELECT min(age) FROM person WHERE job  =  'engineer') ORDER BY age
Database: network_2
Question: Find the number of people whose age is greater than all engineers.
Paraphrased question: Find the number of people whose age is greater than all engineers.
SQL: SELECT count(*) FROM Person WHERE age  >  (SELECT max(age) FROM person WHERE job  =  'engineer')
Database: network_2
Question: How many people are older than every engineer?
Paraphrased question: How many people are older than every engineer?
SQL: SELECT count(*) FROM Person WHERE age  >  (SELECT max(age) FROM person WHERE job  =  'engineer')
Database: network_2
Question: list the name, job title of all people ordered by their names.
Paraphrased question: list the name, occupation title of all people ordered by their names.
SQL: SELECT name ,  job FROM Person ORDER BY name
Database: network_2
Question: What are the names and job titles of every person ordered alphabetically by name?
Paraphrased question: What are the names and occupation titles of every person ordered alphabetically by name?
SQL: SELECT name ,  job FROM Person ORDER BY name
Database: network_2
Question: Find the names of all person sorted in the descending order using age.
Paraphrased question: Find the names of all person sorted in the descending order using age.
SQL: SELECT name FROM Person ORDER BY age DESC
Database: network_2
Question: What are the names of everybody sorted by age in descending order?
Paraphrased question: What are the names of everybody sorted by age in descending order?
SQL: SELECT name FROM Person ORDER BY age DESC
Database: network_2
Question: Find the name and age of all males in order of their age.
Paraphrased question: Find the name and age of all males in order of their age.
SQL: SELECT name FROM Person WHERE gender  =  'male' ORDER BY age
Database: network_2
Question: What is the name and age of every male? Order the results by age.
Paraphrased question: What is the name and age of every male? Order the results by age.
SQL: SELECT name FROM Person WHERE gender  =  'male' ORDER BY age
Database: network_2
Question: Find the name and age of the person who is a friend of both Dan and Alice.
Paraphrased question: Find the name and age of the people who is a friend of both Dan and Alice.
SQL: SELECT T1.name ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Dan' INTERSECT SELECT T1.name ,   T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Alice'
Database: network_2
Question: What are the names and ages of every person who is a friend of both Dan and Alice?
Paraphrased question: What are the names and ages of every people who is a friend of both Dan and Alice?
SQL: SELECT T1.name ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Dan' INTERSECT SELECT T1.name ,   T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Alice'
Database: network_2
Question: Find the name and age of the person who is a friend of Dan or Alice.
Paraphrased question: Find the name and age of the people who is a friend of Dan or Alice.
SQL: SELECT DISTINCT T1.name ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Dan' OR T2.friend  =  'Alice'
Database: network_2
Question: What are the different names and ages of every friend of either Dan or alice?
Paraphrased question: What are the different names and ages of every friend of either Dan or alice?
SQL: SELECT DISTINCT T1.name ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Dan' OR T2.friend  =  'Alice'
Database: network_2
Question: Find the name of the person who has friends with age above 40 and under age 30?
Paraphrased question: Find the name of the people who has friends with age above 40 and under age 30?
SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)
Database: network_2
Question: What are the names of every person who has a friend over 40 and under 30?
Paraphrased question: What are the names of every people who has a friend over 40 and under 30?
SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)
Database: network_2
Question: Find the name of the person who has friends with age above 40 but not under age 30?
Paraphrased question: Find the name of the people who has friends with age above 40 but not under age 30?
SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)
Database: network_2
Question: What are the names of the people who are older 40 but no friends under age 30?
Paraphrased question: What are the names of the people who are older 40 but no friends under age 30?
SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)
Database: network_2
Question: Find the name of the person who has no student friends.
Paraphrased question: Find the name of the people who has no student friends.
SQL: SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.job  =  'student'
Database: network_2
Question: What are the names of the people who have no friends who are students?
Paraphrased question: What are the names of the people who have no friends who are students?
SQL: SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.job  =  'student'
Database: network_2
Question: Find the person who has exactly one friend.
Paraphrased question: Find the people who has exactly one friend.
SQL: SELECT name FROM PersonFriend GROUP BY name HAVING count(*)  =  1
Database: network_2
Question: What are the names of everybody who has exactly one friend?
Paraphrased question: What are the names of everybody who has exactly one friend?
SQL: SELECT name FROM PersonFriend GROUP BY name HAVING count(*)  =  1
Database: network_2
Question: Who are the friends of Bob?
Paraphrased question: Who are the friends of Bob?
SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T1.name  =  'Bob'
Database: network_2
Question: Who are Bob's friends?
Paraphrased question: Who are Bob's friends?
SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T1.name  =  'Bob'
Database: network_2
Question: Find the name of persons who are friends with Bob.
Paraphrased question: Find the name of people who are friends with Bob.
SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Bob'
Database: network_2
Question: What are the names of all of Bob's friends?
Paraphrased question: What are the names of all of Bob's friends?
SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Bob'
Database: network_2
Question: Find the names of females who are friends with Zach
Paraphrased question: Find the names of females who are friends with Zach
SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Zach' AND T1.gender  =  'female'
Database: network_2
Question: What are the names of all females who are friends with Zach?
Paraphrased question: What are the names of all females who are friends with Zach?
SQL: SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Zach' AND T1.gender  =  'female'
Database: network_2
Question: Find the female friends of Alice.
Paraphrased question: Find the female friends of Alice.
SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  'Alice' AND T1.gender  =  'female'
Database: network_2
Question: What are all the friends of Alice who are female?
Paraphrased question: What are all the friends of Alice who are female?
SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  'Alice' AND T1.gender  =  'female'
Database: network_2
Question: Find the male friend of Alice whose job is a doctor?
Paraphrased question: Find the male friend of Alice whose occupation is a doctor?
SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  'Alice' AND T1.gender  =  'male' AND T1.job  =  'doctor'
Database: network_2
Question: Who are the friends of Alice that are doctors?
Paraphrased question: Who are the friends of Alice that are doctors?
SQL: SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  'Alice' AND T1.gender  =  'male' AND T1.job  =  'doctor'
Database: network_2
Question: Who has a friend that is from new york city?
Paraphrased question: Who has a friend that is from new york city?
SQL: SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.city  =  'new york city'
Database: network_2
Question: What are the names of all friends who are from New York?
Paraphrased question: What are the names of all friends who are from New York?
SQL: SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.city  =  'new york city'
Database: network_2
Question: Who has friends that are younger than the average age?
Paraphrased question: Who has friends that are younger than the average age?
SQL: SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.age  <  (SELECT avg(age) FROM person)
Database: network_2
Question: What are the different names of friends who are younger than the average age for a friend?
Paraphrased question: What are the different names of friends who are younger than the average age for a friend?
SQL: SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.age  <  (SELECT avg(age) FROM person)
Database: network_2
Question: Who has friends that are older than the average age? Print their friends and their ages as well
Paraphrased question: Who has friends that are older than the average age? Print their friends and their ages as well
SQL: SELECT DISTINCT T2.name ,  T2.friend ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.age  >  (SELECT avg(age) FROM person)
Database: network_2
Question: Whare the names, friends, and ages of all people who are older than the average age of a person?
Paraphrased question: Whare the names, friends, and ages of all people who are older than the average age of a person?
SQL: SELECT DISTINCT T2.name ,  T2.friend ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.age  >  (SELECT avg(age) FROM person)
Database: network_2
Question: Who is the friend of Zach with longest year relationship?
Paraphrased question: Who is the friend of Zach with longest year relationship?
SQL: SELECT friend FROM PersonFriend WHERE name =  'Zach' AND YEAR  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  'Zach')
Database: network_2
Question: Which friend of Zach has the longest-lasting friendship?
Paraphrased question: Which friend of Zach has the longest-lasting friendship?
SQL: SELECT friend FROM PersonFriend WHERE name =  'Zach' AND YEAR  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  'Zach')
Database: network_2
Question: What is the age of the friend of Zach with longest year relationship?
Paraphrased question: What is the age of the friend of Zach with longest year relationship?
SQL: SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name =  'Zach' AND T2.year  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  'Zach')
Database: network_2
Question: What are the ages of all of Zach's friends who are in the longest relationship?
Paraphrased question: What are the ages of all of Zach's friends who are in the longest relationship?
SQL: SELECT T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name =  'Zach' AND T2.year  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  'Zach')
Database: network_2
Question: Find the name of persons who are friends with Alice for the shortest years.
Paraphrased question: Find the name of people who are friends with Alice for the shortest years.
SQL: SELECT name FROM PersonFriend WHERE friend =  'Alice' AND YEAR  =  (SELECT min(YEAR) FROM PersonFriend WHERE friend =  'Alice')
Database: network_2
Question: What are the names of all people who are friends with Alice for the shortest amount of time?
Paraphrased question: What are the names of all people who are friends with Alice for the shortest amount of time?
SQL: SELECT name FROM PersonFriend WHERE friend =  'Alice' AND YEAR  =  (SELECT min(YEAR) FROM PersonFriend WHERE friend =  'Alice')
Database: network_2
Question: Find the name, age, and job title of persons who are friends with Alice for the longest years.
Paraphrased question: Find the name, age, and occupation title of people who are friends with Alice for the longest years.
SQL: SELECT T1.name ,  T1.age ,  T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend =  'Alice' AND T2.year  =  (SELECT max(YEAR) FROM PersonFriend WHERE friend =  'Alice')
Database: network_2
Question: What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?
Paraphrased question: What are the names, ages, and occupation of all people who are friends with Alice for the longest amount of time?
SQL: SELECT T1.name ,  T1.age ,  T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend =  'Alice' AND T2.year  =  (SELECT max(YEAR) FROM PersonFriend WHERE friend =  'Alice')
Database: network_2
Question: Who is the person that has no friend?
Paraphrased question: Who is the people that has no friend?
SQL: SELECT name FROM person EXCEPT SELECT name FROM PersonFriend
Database: network_2
Question: What are the names of all people who do not have friends?
Paraphrased question: What are the names of all people who do not have friends?
SQL: SELECT name FROM person EXCEPT SELECT name FROM PersonFriend
Database: network_2
Question: Which person whose friends have the oldest average age?
Paraphrased question: Which people whose friends have the oldest average age?
SQL: SELECT T2.name ,  avg(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend GROUP BY T2.name ORDER BY avg(T1.age) DESC LIMIT 1
Database: network_2
Question: What is the name of the person who has the oldest average age for their friends, and what is that average age?
Paraphrased question: What is the name of the people who has the oldest average age for their friends, and what is that average age?
SQL: SELECT T2.name ,  avg(T1.age) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend GROUP BY T2.name ORDER BY avg(T1.age) DESC LIMIT 1
Database: network_2
Question: What is the total number of people who has no friend living in the city of Austin.
Paraphrased question: What is the total number of people who has no friend living in the city of Austin.
SQL: SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city  =  'Austin')
Database: network_2
Question: What is the total number of people who have no friends living in Austin?
Paraphrased question: What is the total number of people who have no friends living in Austin?
SQL: SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city  =  'Austin')
Database: network_2
Question: Find Alice's friends of friends.
Paraphrased question: Find Alice's friends of friends.
SQL: SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name  =  T2.name JOIN PersonFriend AS T3 ON T1.friend  =  T3.name JOIN PersonFriend AS T4 ON T3.friend  =  T4.name WHERE T2.name  =  'Alice' AND T4.name != 'Alice'
Database: network_2
Question: What are the names of all of Alice's friends of friends?
Paraphrased question: What are the names of all of Alice's friends of friends?
SQL: SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name  =  T2.name JOIN PersonFriend AS T3 ON T1.friend  =  T3.name JOIN PersonFriend AS T4 ON T3.friend  =  T4.name WHERE T2.name  =  'Alice' AND T4.name != 'Alice'
Database: decoration_competition
Question: How many members are there?
Paraphrased question: How many members are there?
SQL: SELECT count(*) FROM member
Database: decoration_competition
Question: List the names of members in ascending alphabetical order.
Paraphrased question: List the names of members in ascending alphabetical order.
SQL: SELECT Name FROM member ORDER BY Name ASC
Database: decoration_competition
Question: What are the names and countries of members?
Paraphrased question: What are the names and nations of members?
SQL: SELECT Name ,  Country FROM member
Database: decoration_competition
Question: Show the names of members whose country is "United States" or "Canada".
Paraphrased question: Show the names of members whose nation is "United States" or "Canada".
SQL: SELECT Name FROM member WHERE Country  =  "United States" OR Country  =  "Canada"
Database: decoration_competition
Question: Show the different countries and the number of members from each.
Paraphrased question: Show the different nations and the number of members from each.
SQL: SELECT Country ,  COUNT(*) FROM member GROUP BY Country
Database: decoration_competition
Question: Show the most common country across members.
Paraphrased question: Show the most common nation across members.
SQL: SELECT Country FROM member GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1
Database: decoration_competition
Question: Which countries have more than two members?
Paraphrased question: Which nations have more than two members?
SQL: SELECT Country FROM member GROUP BY Country HAVING COUNT(*)  >  2
Database: decoration_competition
Question: Show the leader names and locations of colleges.
Paraphrased question: Show the leader names and addresses of school.
SQL: SELECT Leader_Name ,  College_Location FROM college
Database: decoration_competition
Question: Show the names of members and names of colleges they go to.
Paraphrased question: Show the names of members and names of school they go to.
SQL: SELECT T2.Name ,  T1.Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID
Database: decoration_competition
Question: Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.
Paraphrased question: Show the names of members and the addresses of school they go to in ascending alphabetical order of member names.
SQL: SELECT T2.Name ,  T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID ORDER BY T2.Name ASC
Database: decoration_competition
Question: Show the distinct leader names of colleges associated with members from country "Canada".
Paraphrased question: Show the different leader names of school associated with members from country "Canada".
SQL: SELECT DISTINCT T1.Leader_Name FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID WHERE T2.Country  =  "Canada"
Database: decoration_competition
Question: Show the names of members and the decoration themes they have.
Paraphrased question: Show the names of members and the decoration topic they have.
SQL: SELECT T1.Name ,  T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID
Database: decoration_competition
Question: Show the names of members that have a rank in round higher than 3.
Paraphrased question: Show the names of members that have a rank in round higher than 3.
SQL: SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID WHERE T2.Rank_in_Round  >  3
Database: decoration_competition
Question: Show the names of members in ascending order of their rank in rounds.
Paraphrased question: Show the names of members in ascending order of their rank in rounds.
SQL: SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID ORDER BY Rank_in_Round ASC
Database: decoration_competition
Question: List the names of members who did not participate in any round.
Paraphrased question: List the names of members who did not participate in any round.
SQL: SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM round)
Database: document_management
Question: Find the name and access counts of all documents, in alphabetic order of the document name.
Paraphrased question: Find the name and access counts of all files, in alphabetic order of the file name.
SQL: SELECT document_name ,  access_count FROM documents ORDER BY document_name
Database: document_management
Question: What are the names of all the documents, as well as the access counts of each, ordered alphabetically?
Paraphrased question: What are the names of all the files, as well as the access counts of each, ordered alphabetically?
SQL: SELECT document_name ,  access_count FROM documents ORDER BY document_name
Database: document_management
Question: Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed?
Paraphrased question: Find the name of the file that has been accessed the greatest number of times, as well as the count of how many times it has been accessed?
SQL: SELECT document_name ,  access_count FROM documents ORDER BY access_count DESC LIMIT 1
Database: document_management
Question: What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed?
Paraphrased question: What is the name of the file which has been accessed the most times, as well as the number of times it has been accessed?
SQL: SELECT document_name ,  access_count FROM documents ORDER BY access_count DESC LIMIT 1
Database: document_management
Question: Find the types of documents with more than 4 documents.
Paraphrased question: Find the types of files with more than 4 files.
SQL: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  4
Database: document_management
Question: What are the codes of types of documents of which there are for or more?
Paraphrased question: What are the codes of categories of files of which there are for or more?
SQL: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  4
Database: document_management
Question: Find the total access count of all documents in the most popular document type.
Paraphrased question: Find the total access count of all files in the most popular file category.
SQL: SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1
Database: document_management
Question: What is the total access count of documents that are of the most common document type?
Paraphrased question: What is the total access count of files that are of the most common file category?
SQL: SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1
Database: document_management
Question: What is the average access count of documents?
Paraphrased question: What is the average access count of files?
SQL: SELECT avg(access_count) FROM documents
Database: document_management
Question: Find the average access count across all documents?
Paraphrased question: Find the average access count across all files?
SQL: SELECT avg(access_count) FROM documents
Database: document_management
Question: What is the structure of the document with the least number of accesses?
Paraphrased question: What is the structure of the file with the least number of accesses?
SQL: SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code  =  t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1
Database: document_management
Question: Return the structure description of the document that has been accessed the fewest number of times.
Paraphrased question: Return the structure describing content of the file that has been accessed the fewest number of times.
SQL: SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code  =  t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1
Database: document_management
Question: What is the type of the document named "David CV"?
Paraphrased question: What is the category of the file named "David CV"?
SQL: SELECT document_type_code FROM documents WHERE document_name  =  "David CV"
Database: document_management
Question: Return the type code of the document named "David CV".
Paraphrased question: Return the category code of the file named "David CV".
SQL: SELECT document_type_code FROM documents WHERE document_name  =  "David CV"
Database: document_management
Question: Find the list of documents that are both in the most three popular type and have the most three popular structure.
Paraphrased question: Find the list of files that are both in the most three popular type and have the most three popular structure.
SQL: SELECT document_name FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY count(*) DESC LIMIT 3
Database: document_management
Question: What are the names of documents that have both one of the three most common types and one of three most common structures?
Paraphrased question: What are the names of files that have both one of the three most common types and one of three most common structures?
SQL: SELECT document_name FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 3 INTERSECT SELECT document_name FROM documents GROUP BY document_structure_code ORDER BY count(*) DESC LIMIT 3
Database: document_management
Question: What document types do have more than 10000 total access number.
Paraphrased question: What file categories do have more than 10000 total access number.
SQL: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count)  >  10000
Database: document_management
Question: Return the codes of the document types that do not have a total access count of over 10000.
Paraphrased question: Return the codes of the file categories that do not have a total access count of over 10000.
SQL: SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count)  >  10000
Database: document_management
Question: What are all the section titles of the document named "David CV"?
Paraphrased question: What are all the chapter names of the document named "David CV"?
SQL: SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code WHERE t1.document_name  =  "David CV"
Database: document_management
Question: Give the section titles of the document with the name "David CV".
Paraphrased question: Give the chapter names of the document with the name "David CV".
SQL: SELECT t2.section_title FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code WHERE t1.document_name  =  "David CV"
Database: document_management
Question: Find all the name of documents without any sections.
Paraphrased question: Find all the name of files without any sections.
SQL: SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)
Database: document_management
Question: What are the names of documents that do not have any sections?
Paraphrased question: What are the names of files that do not have any sections?
SQL: SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)
Database: document_management
Question: List all the username and passwords of users with the most popular role.
Paraphrased question: List all the username and passwords of users with the most popular role.
SQL: SELECT user_name ,  password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
Database: document_management
Question: What are the usernames and passwords of users that have the most common role?
Paraphrased question: What are the usernames and passwords of users that have the most common role?
SQL: SELECT user_name ,  password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1
Database: document_management
Question: Find the average access counts of documents with functional area "Acknowledgement".
Paraphrased question: Find the average access counts of files with functional area "Acknowledgement".
SQL: SELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code  =  t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code  =  t3.functional_area_code WHERE t3.functional_area_description  =  "Acknowledgement"