training_input
stringlengths
118
1.06k
###context:CREATE TABLE film (Title VARCHAR, Film_ID VARCHAR); CREATE TABLE film_market_estimation (Type VARCHAR, Film_ID VARCHAR) ###human: Please show the titles of films and the types of market estimations. ###assistant: SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID
###context:CREATE TABLE film (Director VARCHAR, Film_ID VARCHAR); CREATE TABLE film_market_estimation (Film_ID VARCHAR, Year VARCHAR) ###human: Show the distinct director of films with market estimation in the year of 1995. ###assistant: SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID WHERE T2.Year = 1995
###context:CREATE TABLE market (Number_cities INTEGER, Market_ID VARCHAR); CREATE TABLE film_market_estimation (Market_ID VARCHAR, Low_Estimate INTEGER) ###human: What is the average number of cities of markets with low film market estimate bigger than 10000? ###assistant: SELECT AVG(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T1.Low_Estimate > 10000
###context:CREATE TABLE film_market_estimation (Year VARCHAR, Market_ID VARCHAR); CREATE TABLE market (Country VARCHAR, Market_ID VARCHAR) ###human: Please list the countries and years of film market estimations. ###assistant: SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID
###context:CREATE TABLE film_market_estimation (Year VARCHAR, Market_ID VARCHAR); CREATE TABLE market (Market_ID VARCHAR, Country VARCHAR) ###human: Please list the years of film market estimations when the market is in country "Japan" in descending order. ###assistant: SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID WHERE T2.Country = "Japan" ORDER BY T1.Year DESC
###context:CREATE TABLE film (Studio VARCHAR) ###human: List the studios of each film and the number of films produced by that studio. ###assistant: SELECT Studio, COUNT(*) FROM film GROUP BY Studio
###context:CREATE TABLE film (Studio VARCHAR) ###human: List the name of film studio that have the most number of films. ###assistant: SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1
###context:CREATE TABLE film (Studio VARCHAR) ###human: List the names of studios that have at least two films. ###assistant: SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2
###context:CREATE TABLE film_market_estimation (Title VARCHAR, Film_ID VARCHAR); CREATE TABLE film (Title VARCHAR, Film_ID VARCHAR) ###human: List the title of films that do not have any market estimation. ###assistant: SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation)
###context:CREATE TABLE film (Studio VARCHAR, Director VARCHAR) ###human: Show the studios that have produced films with director "Nicholas Meyer" and "Walter Hill". ###assistant: SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill"
###context:CREATE TABLE film (title VARCHAR, Studio VARCHAR) ###human: Find the titles and studios of the films that are produced by some film studios that contained the word "Universal". ###assistant: SELECT title, Studio FROM film WHERE Studio LIKE "%Universal%"
###context:CREATE TABLE film (Studio VARCHAR, Director VARCHAR) ###human: Show the studios that have not produced films with director "Walter Hill". ###assistant: SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill"
###context:CREATE TABLE film (Studio VARCHAR, Gross_in_dollar INTEGER) ###human: List the studios which average gross is above 4500000. ###assistant: SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000
###context:CREATE TABLE film_market_estimation (Film_ID VARCHAR); CREATE TABLE film (Film_ID VARCHAR) ###human: What is the title of the film that has the highest high market estimation. ###assistant: SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1
###context:CREATE TABLE film (title VARCHAR, director VARCHAR, film_id VARCHAR, country VARCHAR); CREATE TABLE market (Market_ID VARCHAR); CREATE TABLE film_market_estimation (market_id VARCHAR) ###human: What are the titles and directors of the films were never presented in China? ###assistant: SELECT title, director FROM film WHERE NOT film_id IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id = T2.Market_ID WHERE country = 'China')
###context:CREATE TABLE Ref_calendar (Id VARCHAR) ###human: How many calendar items do we have? ###assistant: SELECT COUNT(*) FROM Ref_calendar
###context:CREATE TABLE Ref_calendar (calendar_date VARCHAR, day_Number VARCHAR) ###human: Show all calendar dates and day Numbers. ###assistant: SELECT calendar_date, day_Number FROM Ref_calendar
###context:CREATE TABLE Ref_document_types (Id VARCHAR) ###human: Show the number of document types. ###assistant: SELECT COUNT(*) FROM Ref_document_types
###context:CREATE TABLE Ref_document_types (document_type_code VARCHAR, document_type_name VARCHAR) ###human: List all document type codes and document type names. ###assistant: SELECT document_type_code, document_type_name FROM Ref_document_types
###context:CREATE TABLE Ref_document_types (document_type_name VARCHAR, document_type_description VARCHAR, document_type_code VARCHAR) ###human: What is the name and description for document type code RV? ###assistant: SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = "RV"
###context:CREATE TABLE Ref_document_types (document_type_code VARCHAR, document_type_name VARCHAR) ###human: What is the document type code for document type "Paper"? ###assistant: SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper"
###context:CREATE TABLE All_documents (document_type_code VARCHAR) ###human: Show the number of documents with document type code CV or BK. ###assistant: SELECT COUNT(*) FROM All_documents WHERE document_type_code = "CV" OR document_type_code = "BK"
###context:CREATE TABLE All_documents (date_stored VARCHAR, Document_name VARCHAR) ###human: What is the date when the document "Marry CV" was stored? ###assistant: SELECT date_stored FROM All_documents WHERE Document_name = "Marry CV"
###context:CREATE TABLE All_documents (Date_Stored VARCHAR, date_stored VARCHAR); CREATE TABLE Ref_calendar (day_Number VARCHAR, calendar_date VARCHAR) ###human: What is the day Number and date of all the documents? ###assistant: SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date
###context:CREATE TABLE Ref_document_types (document_type_name VARCHAR, document_type_code VARCHAR); CREATE TABLE All_documents (document_type_code VARCHAR, document_name VARCHAR) ###human: What is the document type name for the document with name "How to read a book"? ###assistant: SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code = T2.document_type_code WHERE T1.document_name = "How to read a book"
###context:CREATE TABLE Ref_locations (Id VARCHAR) ###human: Show the number of locations. ###assistant: SELECT COUNT(*) FROM Ref_locations
###context:CREATE TABLE Ref_locations (location_code VARCHAR, location_name VARCHAR) ###human: List all location codes and location names. ###assistant: SELECT location_code, location_name FROM Ref_locations
###context:CREATE TABLE Ref_locations (location_name VARCHAR, location_description VARCHAR, location_code VARCHAR) ###human: What are the name and description for location code x? ###assistant: SELECT location_name, location_description FROM Ref_locations WHERE location_code = "x"
###context:CREATE TABLE Ref_locations (location_code VARCHAR, location_name VARCHAR) ###human: What is the location code for the country "Canada"? ###assistant: SELECT location_code FROM Ref_locations WHERE location_name = "Canada"
###context:CREATE TABLE ROLES (Id VARCHAR) ###human: How many roles are there? ###assistant: SELECT COUNT(*) FROM ROLES
###context:CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR, role_description VARCHAR) ###human: List all role codes, role names, and role descriptions. ###assistant: SELECT role_code, role_name, role_description FROM ROLES
###context:CREATE TABLE ROLES (role_name VARCHAR, role_description VARCHAR, role_code VARCHAR) ###human: What are the name and description for role code "MG"? ###assistant: SELECT role_name, role_description FROM ROLES WHERE role_code = "MG"
###context:CREATE TABLE ROLES (role_description VARCHAR, role_name VARCHAR) ###human: Show the description for role name "Proof Reader". ###assistant: SELECT role_description FROM ROLES WHERE role_name = "Proof Reader"
###context:CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR, date_of_birth VARCHAR, employee_Name VARCHAR) ###human: Show the name, role code, and date of birth for the employee with name 'Armani'. ###assistant: SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani'
###context:CREATE TABLE Employees (employee_ID VARCHAR, employee_name VARCHAR) ###human: What is the id for the employee called Ebba? ###assistant: SELECT employee_ID FROM Employees WHERE employee_name = "Ebba"
###context:CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR) ###human: Show the names of all the employees with role "HR". ###assistant: SELECT employee_name FROM Employees WHERE role_code = "HR"
###context:CREATE TABLE Employees (role_code VARCHAR) ###human: Show all role codes and the number of employees in each role. ###assistant: SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code
###context:CREATE TABLE Employees (role_code VARCHAR) ###human: What is the role code with the largest number of employees? ###assistant: SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1
###context:CREATE TABLE Employees (role_code VARCHAR) ###human: Show all role codes with at least 3 employees. ###assistant: SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3
###context:CREATE TABLE Employees (role_code VARCHAR) ###human: Show the role code with the least employees. ###assistant: SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) LIMIT 1
###context:CREATE TABLE Employees (role_code VARCHAR, employee_name VARCHAR); CREATE TABLE ROLES (role_name VARCHAR, role_description VARCHAR, role_code VARCHAR) ###human: What is the role name and role description for employee called Ebba? ###assistant: SELECT T2.role_name, T2.role_description FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T1.employee_name = "Ebba"
###context:CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR); CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR) ###human: Show the names of employees with role name Editor. ###assistant: SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Editor"
###context:CREATE TABLE Employees (employee_id VARCHAR, role_code VARCHAR); CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR) ###human: Show the employee ids for all employees with role name "Human Resource" or "Manager". ###assistant: SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Human Resource" OR T2.role_name = "Manager"
###context:CREATE TABLE Document_locations (location_code VARCHAR) ###human: What are the different location codes for documents? ###assistant: SELECT DISTINCT location_code FROM Document_locations
###context:CREATE TABLE Ref_locations (location_name VARCHAR, location_code VARCHAR); CREATE TABLE All_documents (document_id VARCHAR, document_name VARCHAR); CREATE TABLE Document_locations (document_id VARCHAR, location_code VARCHAR) ###human: Show the location name for document "Robin CV". ###assistant: 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"
###context:CREATE TABLE Document_locations (location_code VARCHAR, date_in_location_from VARCHAR, date_in_locaton_to VARCHAR) ###human: Show the location code, the starting date and ending data in that location for all the documents. ###assistant: SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations
###context:CREATE TABLE All_documents (document_id VARCHAR, document_name VARCHAR); CREATE TABLE Document_locations (date_in_location_from VARCHAR, date_in_locaton_to VARCHAR, document_id VARCHAR) ###human: What is "the date in location from" and "the date in location to" for the document with name "Robin CV"? ###assistant: 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"
###context:CREATE TABLE Document_locations (location_code VARCHAR) ###human: Show the location codes and the number of documents in each location. ###assistant: SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code
###context:CREATE TABLE Document_locations (location_code VARCHAR) ###human: What is the location code with the most documents? ###assistant: SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1
###context:CREATE TABLE Document_locations (location_code VARCHAR) ###human: Show the location codes with at least 3 documents. ###assistant: SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3
###context:CREATE TABLE Document_locations (location_code VARCHAR); CREATE TABLE Ref_locations (location_name VARCHAR, location_code VARCHAR) ###human: Show the location name and code with the least documents. ###assistant: 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(*) LIMIT 1
###context:CREATE TABLE Employees (employee_name VARCHAR, employee_id VARCHAR); CREATE TABLE Documents_to_be_destroyed (Destruction_Authorised_by_Employee_ID VARCHAR, Destroyed_by_Employee_ID VARCHAR) ###human: What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents? ###assistant: 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
###context:CREATE TABLE Documents_to_be_destroyed (Destruction_Authorised_by_Employee_ID VARCHAR) ###human: Show the id of each employee and the number of document destruction authorised by that employee. ###assistant: SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID
###context:CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR) ###human: Show the employee ids and the number of documents destroyed by each employee. ###assistant: SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID
###context:CREATE TABLE Documents_to_be_destroyed (employee_id VARCHAR, Destruction_Authorised_by_Employee_ID VARCHAR); CREATE TABLE Employees (employee_id VARCHAR, Destruction_Authorised_by_Employee_ID VARCHAR) ###human: Show the ids of the employees who don't authorize destruction for any document. ###assistant: SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
###context:CREATE TABLE Documents_to_be_destroyed (Destruction_Authorised_by_Employee_ID VARCHAR) ###human: Show the ids of all employees who have authorized destruction. ###assistant: SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
###context:CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR) ###human: Show the ids of all employees who have destroyed a document. ###assistant: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
###context:CREATE TABLE Employees (employee_id VARCHAR, Destroyed_by_Employee_ID VARCHAR); CREATE TABLE Documents_to_be_destroyed (employee_id VARCHAR, Destroyed_by_Employee_ID VARCHAR) ###human: Show the ids of all employees who don't destroy any document. ###assistant: SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed
###context:CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR, Destruction_Authorised_by_Employee_ID VARCHAR) ###human: Show the ids of all employees who have either destroyed a document or made an authorization to do this. ###assistant: SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed
###context:CREATE TABLE club (clubname VARCHAR) ###human: What are the names of all clubs? ###assistant: SELECT clubname FROM club
###context:CREATE TABLE student (Id VARCHAR) ###human: How many students are there? ###assistant: SELECT COUNT(*) FROM student
###context:CREATE TABLE student (fname VARCHAR) ###human: What are the first names of all the students? ###assistant: SELECT DISTINCT fname FROM student
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) ###human: Find the last names of the members of the club "Bootup Baltimore". ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) ###human: Who are the members of the club named "Hopkins Student Enterprises"? Show the last name. ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR) ###human: How many members does the club "Tennis Club" has? ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR) ###human: Find the number of members of club "Pen and Paper Gaming". ###assistant: 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"
###context:CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubid VARCHAR) ###human: How many clubs does "Linda Smith" belong to? ###assistant: 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"
###context:CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubid VARCHAR) ###human: Find the number of clubs where "Tracy Kim" is a member. ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) ###human: Find all the female members of club "Bootup Baltimore". Show the first name and last name. ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) ###human: Find all the male members of club "Hopkins Student Enterprises". Show the first name and last name. ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR, major VARCHAR) ###human: Find all members of "Bootup Baltimore" whose major is "600". Show the first name and last name. ###assistant: 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"
###context:CREATE TABLE student (stuid VARCHAR, major VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR) ###human: Which club has the most members majoring in "600"? ###assistant: 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
###context:CREATE TABLE student (stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR) ###human: Find the name of the club that has the most female students. ###assistant: 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
###context:CREATE TABLE club (clubdesc VARCHAR, clubname VARCHAR) ###human: What is the description of the club named "Tennis Club"? ###assistant: SELECT clubdesc FROM club WHERE clubname = "Tennis Club"
###context:CREATE TABLE club (clubdesc VARCHAR, clubname VARCHAR) ###human: Find the description of the club "Pen and Paper Gaming". ###assistant: SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming"
###context:CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR) ###human: What is the location of the club named "Tennis Club"? ###assistant: SELECT clublocation FROM club WHERE clubname = "Tennis Club"
###context:CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR) ###human: Find the location of the club "Pen and Paper Gaming". ###assistant: SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming"
###context:CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR) ###human: Where is the club "Hopkins Student Enterprises" located? ###assistant: SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises"
###context:CREATE TABLE club (clubname VARCHAR, clublocation VARCHAR) ###human: Find the name of all the clubs at "AKW". ###assistant: SELECT clubname FROM club WHERE clublocation = "AKW"
###context:CREATE TABLE club (clublocation VARCHAR) ###human: How many clubs are located at "HHH"? ###assistant: SELECT COUNT(*) FROM club WHERE clublocation = "HHH"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR, position VARCHAR) ###human: What are the first and last name of the president of the club "Bootup Baltimore"? ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (fname VARCHAR, lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR, position VARCHAR) ###human: Who is the "CTO" of club "Hopkins Student Enterprises"? Show the first name and last name. ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (position VARCHAR, clubid VARCHAR) ###human: How many different roles are there in the club "Bootup Baltimore"? ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (stuid VARCHAR, age VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) ###human: How many members of "Bootup Baltimore" are older than 18? ###assistant: 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
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (stuid VARCHAR, age VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) ###human: How many members of club "Bootup Baltimore" are younger than 18? ###assistant: 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
###context:CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR) ###human: Find the names of all the clubs that have at least a member from the city with city code "BAL". ###assistant: 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"
###context:CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR) ###human: Find the names of the clubs that have at least a member from the city with city code "HOU". ###assistant: 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"
###context:CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR) ###human: How many clubs does the student named "Eric Tai" belong to? ###assistant: 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"
###context:CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR) ###human: List the clubs having "Davis Steven" as a member. ###assistant: 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"
###context:CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, advisor VARCHAR) ###human: List the clubs that have at least a member with advisor "1121". ###assistant: 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
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) ###human: What is the average age of the members of the club "Bootup Baltimore"? ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) ###human: Find the average age of members of the club "Hopkins Student Enterprises". ###assistant: 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"
###context:CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) ###human: Retrieve the average age of members of the club "Tennis Club". ###assistant: 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"
###context:CREATE TABLE grants (grant_amount VARCHAR, grant_end_date INTEGER); CREATE TABLE Grants (grant_amount VARCHAR, grant_id VARCHAR); CREATE TABLE Documents (grant_id VARCHAR, sent_date INTEGER) ###human: 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'? ###assistant: 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'
###context:CREATE TABLE Project_outcomes (project_id VARCHAR, outcome_code VARCHAR); CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR) ###human: List the project details of the project both producing patent and paper as outcomes. ###assistant: 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'
###context:CREATE TABLE organisation_Types (organisation_type VARCHAR, organisation_type_description VARCHAR); CREATE TABLE Grants (organisation_id VARCHAR); CREATE TABLE Organisations (organisation_id VARCHAR, organisation_type VARCHAR) ###human: What is the total grant amount of the organisations described as research? ###assistant: 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'
###context:CREATE TABLE Project_Staff (date_from VARCHAR, date_to VARCHAR, project_id VARCHAR, role_code VARCHAR) ###human: List from which date and to which date these staff work: project staff of the project which hires the most staffs ###assistant: 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'
###context:CREATE TABLE Grants (organisation_id VARCHAR, grant_amount INTEGER); CREATE TABLE Organisations (organisation_id VARCHAR, organisation_details VARCHAR) ###human: Find the organisation ids and details of the organisations which are involved in ###assistant: 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
###context:CREATE TABLE Research_Staff (employer_organisation_id VARCHAR); CREATE TABLE Organisations (organisation_type VARCHAR, organisation_id VARCHAR) ###human: What is the organisation type and id of the organisation which has the most number of research staff? ###assistant: 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
###context:CREATE TABLE Research_Staff (employer_organisation_id VARCHAR); CREATE TABLE Organisations (organisation_type VARCHAR, organisation_id VARCHAR) ###human: Which organisation type hires most research staff? ###assistant: 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