cnatale/presto-athena-txt-2-sql huggingface dataset:
Give me all the distinct location codes for documents.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT DISTINCT location_code FROM Document_locations
Show the location name for document 'Robin CV'.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = 'Robin CV'
What is the location name of the document 'Robin CV'?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id = T2.document_id JOIN Ref_locations AS T3 ON T2.location_code = T3.location_code WHERE T1.document_name = 'Robin CV'
Show the location code, the starting date and ending data in that location for all the documents.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations
What are each document's location code, and starting date and ending data in that location?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations
What is 'the date in location from' and 'the date in location to' for the document with name 'Robin CV'?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT T1.date_in_location_from, T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = 'Robin CV'
Find the starting date and ending data in location for the document named 'Robin CV'.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT T1.date_in_location_from, T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = 'Robin CV'
Show the location codes and the number of documents in each location.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code
What is the code of each location and the number of documents in that location?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code
What is the location code with the most documents?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1
Find the code of the location with the largest number of documents.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1
Show the location codes with at least 3 documents.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3
What are the codes of the locations with at least three documents?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3
Show the location name and code with the least documents.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT T2.location_name, T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1
What are the name and code of the location with the smallest number of documents?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT T2.location_name, T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code = T2.location_code GROUP BY T1.location_code ORDER BY COUNT(*) ASC NULLS FIRST LIMIT 1
What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT T2.employee_name, T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id
List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT T2.employee_name, T3.employee_name FROM Documents_to_be_destroyed AS T1 JOIN Employees AS T2 ON T1.Destruction_Authorised_by_Employee_ID = T2.employee_id JOIN Employees AS T3 ON T1.Destroyed_by_Employee_ID = T3.employee_id
Show the id of each employee and the number of document destruction authorised by that employee.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID
What are the id of each employee and the number of document destruction authorised by that employee?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID
Show the employee ids and the number of documents destroyed by each employee.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
What are the id of each employee and the number of document destroyed by that employee?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
Show the ids of the employees who don't authorize destruction for any document.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
Which employees do not authorize destruction for any document? Give me their employee ids.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
Show the ids of all employees who have authorized destruction.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
What are the ids of all the employees who authorize document destruction?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
Show the ids of all employees who have destroyed a document.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
What are the ids of all the employees who have destroyed documents?
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
Show the ids of all employees who don't destroy any document.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
Which employees do not destroy any document? Find their employee ids.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
Show the ids of all employees who have either destroyed a document or made an authorization to do this.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.
Additional table information: table: cre_Doc_Tracking_DB
SQL: SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
How many clubs are there?
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club
Count the total number of clubs.
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club
What are the names of all clubs?
Additional table information: table: club_1
SQL: SELECT clubname FROM club
Give me the name of each club.
Additional table information: table: club_1
SQL: SELECT clubname FROM club
How many students are there?
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM student
Count the total number of students.
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM student
What are the first names of all the students?
Additional table information: table: club_1
SQL: SELECT DISTINCT fname FROM student
Find each student's first name.
Additional table information: table: club_1
SQL: SELECT DISTINCT fname FROM student
Find the last names of the members of the club 'Bootup Baltimore'.
Additional table information: table: club_1
SQL: SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore'
Who are the members of the club named 'Bootup Baltimore'? Give me their last names.
Additional table information: table: club_1
SQL: SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore'
Who are the members of the club named 'Hopkins Student Enterprises'? Show the last name.
Additional table information: table: club_1
SQL: SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises'
Return the last name for the members of the club named 'Hopkins Student Enterprises'.
Additional table information: table: club_1
SQL: SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises'
How many members does the club 'Tennis Club' has?
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club'
Count the members of the club 'Tennis Club'.
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club'
Find the number of members of club 'Pen and Paper Gaming'.
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Pen and Paper Gaming'
How many people have membership in the club 'Pen and Paper Gaming'?
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Pen and Paper Gaming'
How many clubs does 'Linda Smith' belong to?
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Linda' AND t3.lname = 'Smith'
How many clubs does 'Linda Smith' have membership for?
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Linda' AND t3.lname = 'Smith'
Find the number of clubs where 'Tracy Kim' is a member.
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Tracy' AND t3.lname = 'Kim'
For how many clubs is 'Tracy Kim' a member?
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Tracy' AND t3.lname = 'Kim'
Find all the female members of club 'Bootup Baltimore'. Show the first name and last name.
Additional table information: table: club_1
SQL: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.sex = 'F'
Give me the first name and last name for all the female members of the club 'Bootup Baltimore'.
Additional table information: table: club_1
SQL: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.sex = 'F'
Find all the male members of club 'Hopkins Student Enterprises'. Show the first name and last name.
Additional table information: table: club_1
SQL: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t3.sex = 'M'
What are the first name and last name of each male member in club 'Hopkins Student Enterprises'?
Additional table information: table: club_1
SQL: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t3.sex = 'M'
Find all members of 'Bootup Baltimore' whose major is '600'. Show the first name and last name.
Additional table information: table: club_1
SQL: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.major = '600'
Which members of 'Bootup Baltimore' major in '600'? Give me their first names and last names.
Additional table information: table: club_1
SQL: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.major = '600'
Which club has the most members majoring in '600'?
Additional table information: table: club_1
SQL: SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = '600' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1
Find the club which has the largest number of members majoring in '600'.
Additional table information: table: club_1
SQL: SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.major = '600' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1
Find the name of the club that has the most female students.
Additional table information: table: club_1
SQL: SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = 'F' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1
Which club has the most female students as their members? Give me the name of the club.
Additional table information: table: club_1
SQL: SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.sex = 'F' GROUP BY t1.clubname ORDER BY COUNT(*) DESC LIMIT 1
What is the description of the club named 'Tennis Club'?
Additional table information: table: club_1
SQL: SELECT clubdesc FROM club WHERE clubname = 'Tennis Club'
Find the description of the club called 'Tennis Club'.
Additional table information: table: club_1
SQL: SELECT clubdesc FROM club WHERE clubname = 'Tennis Club'
Find the description of the club 'Pen and Paper Gaming'.
Additional table information: table: club_1
SQL: SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming'
What is the description of the club 'Pen and Paper Gaming'?
Additional table information: table: club_1
SQL: SELECT clubdesc FROM club WHERE clubname = 'Pen and Paper Gaming'
What is the location of the club named 'Tennis Club'?
Additional table information: table: club_1
SQL: SELECT clublocation FROM club WHERE clubname = 'Tennis Club'
Where us the club named 'Tennis Club' located?
Additional table information: table: club_1
SQL: SELECT clublocation FROM club WHERE clubname = 'Tennis Club'
Find the location of the club 'Pen and Paper Gaming'.
Additional table information: table: club_1
SQL: SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming'
Where is the club 'Pen and Paper Gaming' located?
Additional table information: table: club_1
SQL: SELECT clublocation FROM club WHERE clubname = 'Pen and Paper Gaming'
Where is the club 'Hopkins Student Enterprises' located?
Additional table information: table: club_1
SQL: SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises'
Tell me the location of the club 'Hopkins Student Enterprises'.
Additional table information: table: club_1
SQL: SELECT clublocation FROM club WHERE clubname = 'Hopkins Student Enterprises'
Find the name of all the clubs at 'AKW'.
Additional table information: table: club_1
SQL: SELECT clubname FROM club WHERE clublocation = 'AKW'
Which clubs are located at 'AKW'? Return the club names.
Additional table information: table: club_1
SQL: SELECT clubname FROM club WHERE clublocation = 'AKW'
How many clubs are located at 'HHH'?
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club WHERE clublocation = 'HHH'
Count the number of clubs located at 'HHH'.
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club WHERE clublocation = 'HHH'
What are the first and last name of the president of the club 'Bootup Baltimore'?
Additional table information: table: club_1
SQL: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t2.position = 'President'
Who is the president of the club 'Bootup Baltimore'? Give me the first and last name.
Additional table information: table: club_1
SQL: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t2.position = 'President'
Who is the 'CTO' of club 'Hopkins Student Enterprises'? Show the first name and last name.
Additional table information: table: club_1
SQL: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t2.position = 'CTO'
Find the first name and last name for the 'CTO' of the club 'Hopkins Student Enterprises'?
Additional table information: table: club_1
SQL: SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises' AND t2.position = 'CTO'
How many different roles are there in the club 'Bootup Baltimore'?
Additional table information: table: club_1
SQL: SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = 'Bootup Baltimore'
Count the number of different positions in the club 'Bootup Baltimore'.
Additional table information: table: club_1
SQL: SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = 'Bootup Baltimore'
How many members of 'Bootup Baltimore' are older than 18?
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age > 18
Count the number of members in club 'Bootup Baltimore' whose age is above 18.
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age > 18
How many members of club 'Bootup Baltimore' are younger than 18?
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age < 18
Count the number of members in club 'Bootup Baltimore' whose age is below 18.
Additional table information: table: club_1
SQL: SELECT COUNT(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore' AND t3.age < 18
Find the names of all the clubs that have at least a member from the city with city code 'BAL'.
Additional table information: table: club_1
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'BAL'
Which clubs have one or more members from the city with code 'BAL'? Give me the names of the clubs.
Additional table information: table: club_1
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'BAL'
Find the names of the clubs that have at least a member from the city with city code 'HOU'.
Additional table information: table: club_1
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'HOU'
Which clubs have one or more members from the city with code 'HOU'? Give me the names of the clubs.
Additional table information: table: club_1
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.city_code = 'HOU'
How many clubs does the student named 'Eric Tai' belong to?
Additional table information: table: club_1
SQL: SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Eric' AND t3.lname = 'Tai'
Count the number of clubs for which the student named 'Eric Tai' is a member.
Additional table information: table: club_1
SQL: SELECT COUNT(DISTINCT t1.clubname) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Eric' AND t3.lname = 'Tai'
List the clubs having 'Davis Steven' as a member.
Additional table information: table: club_1
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Davis' AND t3.lname = 'Steven'
What are the names of the clubs that have 'Davis Steven' as a member?
Additional table information: table: club_1
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.fname = 'Davis' AND t3.lname = 'Steven'
List the clubs that have at least a member with advisor '1121'.
Additional table information: table: club_1
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121
Which clubs have one or more members whose advisor is '1121'?
Additional table information: table: club_1
SQL: SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t3.advisor = 1121
What is the average age of the members of the club 'Bootup Baltimore'?
Additional table information: table: club_1
SQL: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore'
Find the average age of the members in the club 'Bootup Baltimore'.
Additional table information: table: club_1
SQL: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Bootup Baltimore'
Find the average age of members of the club 'Hopkins Student Enterprises'.
Additional table information: table: club_1
SQL: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises'
On average, how old are the members in the club 'Hopkins Student Enterprises'?
Additional table information: table: club_1
SQL: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Hopkins Student Enterprises'
Retrieve the average age of members of the club 'Tennis Club'.
Additional table information: table: club_1
SQL: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club'
Compute the average age of the members in the club 'Tennis Club'.
Additional table information: table: club_1
SQL: SELECT AVG(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = 'Tennis Club'
What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'
What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id = T2.grant_id WHERE T2.sent_date < '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date > '1989-03-16 18:27:16'
List the project details of the project both producing patent and paper as outcomes.
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'
What are the details of the project that is producing both patents and papers as outcomes?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id WHERE T2.outcome_code = 'Patent'
What is the total grant amount of the organisations described as research?
Additional table information: table: tracking_grants_for_research
SQL: SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'
What is the total amount of grant money for research?
Additional table information: table: tracking_grants_for_research
SQL: SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research'
List from which date and to which date these staff work: project staff of the project which hires the most staffs
Additional table information: table: tracking_grants_for_research
SQL: SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader'
From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role?
Additional table information: table: tracking_grants_for_research
SQL: SELECT date_from, date_to FROM Project_Staff WHERE project_id IN (SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'leader'
Find the organisation ids and details of the organisations which are involved in
Additional table information: table: tracking_grants_for_research
SQL: SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING SUM(T1.grant_amount) > 6000
What are the ids and details for all organizations that have grants of more than 6000 dollars?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T2.organisation_id, T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_id HAVING SUM(T1.grant_amount) > 6000
What is the organisation type and id of the organisation which has the most number of research staff?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1
What is the type and id of the organization that has the most research staff?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.organisation_type, T1.organisation_id FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1
Which organisation type hires most research staff?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1
What is the type of the organization with the most research staff?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.organisation_type FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_type ORDER BY COUNT(*) DESC LIMIT 1
Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'
What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id = T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id = T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type = T4.organisation_type WHERE T2.grant_amount > 5000 AND T4.organisation_type_description = 'Research'
What are the response received dates for the documents described as 'Regular' or granted with more than 100?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100
What is the response received date for the document described as Regular that was granted more than 100 dollars?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code = T2.document_type_code JOIN Grants AS T3 ON T1.grant_id = T3.grant_id WHERE T2.document_description = 'Regular' OR T3.grant_amount > 100
List the project details of the projects which did not hire any staff for a researcher role.
Additional table information: table: tracking_grants_for_research
SQL: SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher')
What are the details for all projects that did not hire any staff in a research role?
Additional table information: table: tracking_grants_for_research
SQL: SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_Staff WHERE role_code = 'researcher')
What are the task details, task id and project id for the projects which are detailed as 'omnis' or  have more than 2 outcomes?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING COUNT(*) > 2
What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id WHERE T2.project_details = 'omnis' UNION SELECT T1.task_details, T1.task_id, T2.project_id FROM Tasks AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.project_id HAVING COUNT(*) > 2
When do all the researcher role staff start to work, and when do they stop working?
Additional table information: table: tracking_grants_for_research
SQL: SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher'
When did researchers start and stop working?
Additional table information: table: tracking_grants_for_research
SQL: SELECT date_from, date_to FROM Project_Staff WHERE role_code = 'researcher'
How many kinds of roles are there for the staff?
Additional table information: table: tracking_grants_for_research
SQL: SELECT COUNT(DISTINCT role_code) FROM Project_Staff
How many different roles are there on the project staff?
Additional table information: table: tracking_grants_for_research
SQL: SELECT COUNT(DISTINCT role_code) FROM Project_Staff
What is the total amount of grants given by each organisations? Also list the organisation id.
Additional table information: table: tracking_grants_for_research
SQL: SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id
What is the total amount of grant money given to each organization and what is its id?
Additional table information: table: tracking_grants_for_research
SQL: SELECT SUM(grant_amount), organisation_id FROM Grants GROUP BY organisation_id
List the project details of the projects with the research outcome described with the substring 'Published'.
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'
What are the details for the project whose research has been published?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code = T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'
How many staff does each project has? List the project id and the number in an ascending order.
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.project_id, COUNT(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) ASC NULLS FIRST
For each project id, how many staff does it have? List them in increasing order.
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.project_id, COUNT(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) ASC NULLS FIRST
What is the complete description of the researcher role.
Additional table information: table: tracking_grants_for_research
SQL: SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'
What is the complete description of the job of a researcher?
Additional table information: table: tracking_grants_for_research
SQL: SELECT role_description FROM Staff_Roles WHERE role_code = 'researcher'
When did the first staff for the projects started working?
Additional table information: table: tracking_grants_for_research
SQL: SELECT date_from FROM Project_Staff ORDER BY date_from ASC NULLS FIRST LIMIT 1
When did the first staff member start working?
Additional table information: table: tracking_grants_for_research
SQL: SELECT date_from FROM Project_Staff ORDER BY date_from ASC NULLS FIRST LIMIT 1
Which project made the most number of outcomes? List the project details and the project id.
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.project_details, T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) DESC LIMIT 1
What are the details and id of the project with the most outcomes?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.project_details, T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id = T2.project_id GROUP BY T1.project_id ORDER BY COUNT(*) DESC LIMIT 1
Which projects have no outcome? List the project details.
Additional table information: table: tracking_grants_for_research
SQL: SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes)
What are the details of the project with no outcomes?
Additional table information: table: tracking_grants_for_research
SQL: SELECT project_details FROM Projects WHERE NOT project_id IN (SELECT project_id FROM Project_outcomes)
Which organisation hired the most number of research staff? List the organisation id, type and detail.
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.organisation_id, T1.organisation_type, T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1
What are the ids, types, and details of the organization with the most research staff?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.organisation_id, T1.organisation_type, T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id = T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY COUNT(*) DESC LIMIT 1
Show the role description and the id of the project staff involved in most number of project outcomes?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY COUNT(*) DESC LIMIT 1
For each staff id, what is the description of the role that is involved with the most number of projects?
Additional table information: table: tracking_grants_for_research
SQL: SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY COUNT(*) DESC LIMIT 1
Which document type is described with the prefix 'Initial'?
Additional table information: table: tracking_grants_for_research
SQL: SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'
What is the type of the document whose description starts with the word 'Initial'?
Additional table information: table: tracking_grants_for_research
SQL: SELECT document_type_code FROM Document_Types WHERE document_description LIKE 'Initial%'
For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.
Additional table information: table: tracking_grants_for_research
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'
For grants that have descriptions of Regular and Initial Applications, what are their start dates?
Additional table information: table: tracking_grants_for_research
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'
How many documents can one grant have at most? List the grant id and number.
Additional table information: table: tracking_grants_for_research
SQL: SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1
For each grant id, how many documents does it have, and which one has the most?
Additional table information: table: tracking_grants_for_research
SQL: SELECT grant_id, COUNT(*) FROM Documents GROUP BY grant_id ORDER BY COUNT(*) DESC LIMIT 1
Find the organisation type description of the organisation detailed as 'quo'.
Additional table information: table: tracking_grants_for_research
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'
What is the type description of the organization whose detail is listed as 'quo'?
Additional table information: table: tracking_grants_for_research
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'
What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.
Additional table information: table: tracking_grants_for_research
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 NULLS FIRST
What are the details of all organizations that are described as Sponsors and sort the results in ascending order?
Additional table information: table: tracking_grants_for_research
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 NULLS FIRST
How many Patent outcomes are generated from all the projects?
Additional table information: table: tracking_grants_for_research
SQL: SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent'
How many patents outcomes were listed for all the projects?
Additional table information: table: tracking_grants_for_research
SQL: SELECT COUNT(*) FROM Project_outcomes WHERE outcome_code = 'Patent'
How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?
Additional table information: table: tracking_grants_for_research
SQL: SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'
How many project members were leaders or started working before '1989-04-24 23:51:54'?
Additional table information: table: tracking_grants_for_research
SQL: SELECT COUNT(*) FROM Project_Staff WHERE role_code = 'leader' OR date_from < '1989-04-24 23:51:54'
What is the last date of the staff leaving the projects?
Additional table information: table: tracking_grants_for_research
SQL: SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1
What is the last date that a staff member left a project?
Additional table information: table: tracking_grants_for_research
SQL: SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1
What are the result description of the project whose detail is 'sint'?
Additional table information: table: tracking_grants_for_research
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'
What is the description for the results whose project detail is 'sint'?
Additional table information: table: tracking_grants_for_research
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'
List the organisation id with the maximum outcome count, and the count.
Additional table information: table: tracking_grants_for_research
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
What is the id of the organization with the maximum number of outcomes and how many outcomes are there?
Additional table information: table: tracking_grants_for_research
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
List the project details of the projects launched by the organisation
Additional table information: table: tracking_grants_for_research
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)
What are the details for the projects which were launched by the organization with the most projects?
Additional table information: table: tracking_grants_for_research
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)
List the research staff details, and order in ascending order.
Additional table information: table: tracking_grants_for_research
SQL: SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC NULLS FIRST
What details are there on the research staff? List the result in ascending alphabetical order.
Additional table information: table: tracking_grants_for_research
SQL: SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC NULLS FIRST
How many tasks are there in total?
Additional table information: table: tracking_grants_for_research
SQL: SELECT COUNT(*) FROM Tasks
How many tasks are there?
Additional table information: table: tracking_grants_for_research
SQL: SELECT COUNT(*) FROM Tasks