answer stringlengths 18 557 | context stringlengths 27 489 | question stringlengths 12 244 | text stringlengths 275 1.7k |
|---|---|---|---|
SELECT T1.Title, T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID | CREATE TABLE film (Title VARCHAR, Film_ID VARCHAR); CREATE TABLE film_market_estimation (Type VARCHAR, Film_ID VARCHAR) | Please show the titles of films and the types of market estimations. | <s>[INST] Given the following SQL query and context: Query: 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 (Title VARCHAR, Film_ID VARCHAR); CREATE TABLE film_market_estimation (Type VARCHAR, Film_ID VARCHAR) [/INST] Based on the provided... |
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 | CREATE TABLE film (Director VARCHAR, Film_ID VARCHAR); CREATE TABLE film_market_estimation (Film_ID VARCHAR, Year VARCHAR) | Show the distinct director of films with market estimation in the year of 1995. | <s>[INST] Given the following SQL query and context: Query: 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 film (Director VARCHAR, Film_ID VARCHAR); CREATE TABLE film_market_estimation (Film_ID VARCHAR, Year VARCHAR) [/... |
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 | CREATE TABLE market (Number_cities INTEGER, Market_ID VARCHAR); CREATE TABLE film_market_estimation (Market_ID VARCHAR, Low_Estimate INTEGER) | What is the average number of cities of markets with low film market estimate bigger than 10000? | <s>[INST] Given the following SQL query and context: Query: 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 market (Number_cities INTEGER, Market_ID VARCHAR); CREATE TABLE film_market_estimation (Market_I... |
SELECT T2.Country, T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID = T2.Market_ID | CREATE TABLE film_market_estimation (Year VARCHAR, Market_ID VARCHAR); CREATE TABLE market (Country VARCHAR, Market_ID VARCHAR) | Please list the countries and years of film market estimations. | <s>[INST] Given the following SQL query and context: Query: 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 (Country VARCHAR, Market_ID VARCHAR) [/INST] Based... |
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 | CREATE TABLE film_market_estimation (Year VARCHAR, Market_ID VARCHAR); CREATE TABLE market (Market_ID VARCHAR, Country VARCHAR) | Please list the years of film market estimations when the market is in country "Japan" in descending order. | <s>[INST] Given the following SQL query and context: Query: 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_market_estimation (Year VARCHAR, Market_ID VARCHAR); CREATE TABLE market (Market_ID VA... |
SELECT Studio, COUNT(*) FROM film GROUP BY Studio | CREATE TABLE film (Studio VARCHAR) | List the studios of each film and the number of films produced by that studio. | <s>[INST] Given the following SQL query and context: Query: SELECT Studio, COUNT(*) FROM film GROUP BY Studio Context: CREATE TABLE film (Studio VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the studios of each film and the number of films produced by that studio. The answer to yo... |
SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE film (Studio VARCHAR) | List the name of film studio that have the most number of films. | <s>[INST] Given the following SQL query and context: Query: SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE film (Studio VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name of film studio that have the most number of films. The answe... |
SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2 | CREATE TABLE film (Studio VARCHAR) | List the names of studios that have at least two films. | <s>[INST] Given the following SQL query and context: Query: SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2 Context: CREATE TABLE film (Studio VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the names of studios that have at least two films. The answer to your question ... |
SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation) | CREATE TABLE film_market_estimation (Title VARCHAR, Film_ID VARCHAR); CREATE TABLE film (Title VARCHAR, Film_ID VARCHAR) | List the title of films that do not have any market estimation. | <s>[INST] Given the following SQL query and context: Query: SELECT Title FROM film WHERE NOT Film_ID IN (SELECT Film_ID FROM film_market_estimation) Context: CREATE TABLE film_market_estimation (Title VARCHAR, Film_ID VARCHAR); CREATE TABLE film (Title VARCHAR, Film_ID VARCHAR) [/INST] Based on the provided SQL query a... |
SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill" | CREATE TABLE film (Studio VARCHAR, Director VARCHAR) | Show the studios that have produced films with director "Nicholas Meyer" and "Walter Hill". | <s>[INST] Given the following SQL query and context: Query: SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill" Context: CREATE TABLE film (Studio VARCHAR, Director VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show... |
SELECT title, Studio FROM film WHERE Studio LIKE "%Universal%" | CREATE TABLE film (title VARCHAR, Studio VARCHAR) | Find the titles and studios of the films that are produced by some film studios that contained the word "Universal". | <s>[INST] Given the following SQL query and context: Query: SELECT title, Studio FROM film WHERE Studio LIKE "%Universal%" Context: CREATE TABLE film (title VARCHAR, Studio VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the titles and studios of the films that are produced by some ... |
SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill" | CREATE TABLE film (Studio VARCHAR, Director VARCHAR) | Show the studios that have not produced films with director "Walter Hill". | <s>[INST] Given the following SQL query and context: Query: SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill" Context: CREATE TABLE film (Studio VARCHAR, Director VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the studios that have not produced f... |
SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000 | CREATE TABLE film (Studio VARCHAR, Gross_in_dollar INTEGER) | List the studios which average gross is above 4500000. | <s>[INST] Given the following SQL query and context: Query: SELECT Studio FROM film GROUP BY Studio HAVING AVG(Gross_in_dollar) >= 4500000 Context: CREATE TABLE film (Studio VARCHAR, Gross_in_dollar INTEGER) [/INST] Based on the provided SQL query and context, your question is: List the studios which average gross is a... |
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 | CREATE TABLE film_market_estimation (Film_ID VARCHAR); CREATE TABLE film (Film_ID VARCHAR) | What is the title of the film that has the highest high market estimation. | <s>[INST] Given the following SQL query and context: Query: 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_market_estimation (Film_ID VARCHAR); CREATE TABLE film (Film_ID VARCHAR) [/INST] Based on the provided S... |
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') | 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) | What are the titles and directors of the films were never presented in China? | <s>[INST] Given the following SQL query and context: Query: 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 film (title VARCHAR, director VARCHAR, film_id VARCHAR, coun... |
SELECT COUNT(*) FROM Ref_calendar | CREATE TABLE Ref_calendar (Id VARCHAR) | How many calendar items do we have? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Ref_calendar Context: CREATE TABLE Ref_calendar (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many calendar items do we have? The answer to your question is: SELECT COUNT(*) FROM Ref_calendar. [/s> |
SELECT calendar_date, day_Number FROM Ref_calendar | CREATE TABLE Ref_calendar (calendar_date VARCHAR, day_Number VARCHAR) | Show all calendar dates and day Numbers. | <s>[INST] Given the following SQL query and context: Query: SELECT calendar_date, day_Number FROM Ref_calendar Context: CREATE TABLE Ref_calendar (calendar_date VARCHAR, day_Number VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all calendar dates and day Numbers. The answer to your... |
SELECT COUNT(*) FROM Ref_document_types | CREATE TABLE Ref_document_types (Id VARCHAR) | Show the number of document types. | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Ref_document_types Context: CREATE TABLE Ref_document_types (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the number of document types. The answer to your question is: SELECT COUNT(*) FROM Ref_doc... |
SELECT document_type_code, document_type_name FROM Ref_document_types | CREATE TABLE Ref_document_types (document_type_code VARCHAR, document_type_name VARCHAR) | List all document type codes and document type names. | <s>[INST] Given the following SQL query and context: Query: SELECT document_type_code, document_type_name FROM Ref_document_types Context: CREATE TABLE Ref_document_types (document_type_code VARCHAR, document_type_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all document typ... |
SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = "RV" | CREATE TABLE Ref_document_types (document_type_name VARCHAR, document_type_description VARCHAR, document_type_code VARCHAR) | What is the name and description for document type code RV? | <s>[INST] Given the following SQL query and context: Query: SELECT document_type_name, document_type_description FROM Ref_document_types WHERE document_type_code = "RV" Context: CREATE TABLE Ref_document_types (document_type_name VARCHAR, document_type_description VARCHAR, document_type_code VARCHAR) [/INST] Based on t... |
SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper" | CREATE TABLE Ref_document_types (document_type_code VARCHAR, document_type_name VARCHAR) | What is the document type code for document type "Paper"? | <s>[INST] Given the following SQL query and context: Query: SELECT document_type_code FROM Ref_document_types WHERE document_type_name = "Paper" Context: CREATE TABLE Ref_document_types (document_type_code VARCHAR, document_type_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What i... |
SELECT COUNT(*) FROM All_documents WHERE document_type_code = "CV" OR document_type_code = "BK" | CREATE TABLE All_documents (document_type_code VARCHAR) | Show the number of documents with document type code CV or BK. | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM All_documents WHERE document_type_code = "CV" OR document_type_code = "BK" Context: CREATE TABLE All_documents (document_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the number of documents... |
SELECT date_stored FROM All_documents WHERE Document_name = "Marry CV" | CREATE TABLE All_documents (date_stored VARCHAR, Document_name VARCHAR) | What is the date when the document "Marry CV" was stored? | <s>[INST] Given the following SQL query and context: Query: SELECT date_stored FROM All_documents WHERE Document_name = "Marry CV" Context: CREATE TABLE All_documents (date_stored VARCHAR, Document_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the date when the document "M... |
SELECT T2.day_Number, T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored = T2.calendar_date | CREATE TABLE All_documents (Date_Stored VARCHAR, date_stored VARCHAR); CREATE TABLE Ref_calendar (day_Number VARCHAR, calendar_date VARCHAR) | What is the day Number and date of all the documents? | <s>[INST] Given the following SQL query and context: Query: 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 All_documents (Date_Stored VARCHAR, date_stored VARCHAR); CREATE TABLE Ref_calendar (day_Number VARCHAR, calendar_d... |
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" | CREATE TABLE Ref_document_types (document_type_name VARCHAR, document_type_code VARCHAR); CREATE TABLE All_documents (document_type_code VARCHAR, document_name VARCHAR) | What is the document type name for the document with name "How to read a book"? | <s>[INST] Given the following SQL query and context: Query: 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_document_types (document_type_name VARCHAR, document_ty... |
SELECT COUNT(*) FROM Ref_locations | CREATE TABLE Ref_locations (Id VARCHAR) | Show the number of locations. | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Ref_locations Context: CREATE TABLE Ref_locations (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the number of locations. The answer to your question is: SELECT COUNT(*) FROM Ref_locations. [/s> |
SELECT location_code, location_name FROM Ref_locations | CREATE TABLE Ref_locations (location_code VARCHAR, location_name VARCHAR) | List all location codes and location names. | <s>[INST] Given the following SQL query and context: Query: SELECT location_code, location_name FROM Ref_locations Context: CREATE TABLE Ref_locations (location_code VARCHAR, location_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all location codes and location names. The ans... |
SELECT location_name, location_description FROM Ref_locations WHERE location_code = "x" | CREATE TABLE Ref_locations (location_name VARCHAR, location_description VARCHAR, location_code VARCHAR) | What are the name and description for location code x? | <s>[INST] Given the following SQL query and context: Query: SELECT location_name, location_description FROM Ref_locations WHERE location_code = "x" Context: CREATE TABLE Ref_locations (location_name VARCHAR, location_description VARCHAR, location_code VARCHAR) [/INST] Based on the provided SQL query and context, your q... |
SELECT location_code FROM Ref_locations WHERE location_name = "Canada" | CREATE TABLE Ref_locations (location_code VARCHAR, location_name VARCHAR) | What is the location code for the country "Canada"? | <s>[INST] Given the following SQL query and context: Query: SELECT location_code FROM Ref_locations WHERE location_name = "Canada" Context: CREATE TABLE Ref_locations (location_code VARCHAR, location_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the location code for the c... |
SELECT COUNT(*) FROM ROLES | CREATE TABLE ROLES (Id VARCHAR) | How many roles are there? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM ROLES Context: CREATE TABLE ROLES (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many roles are there? The answer to your question is: SELECT COUNT(*) FROM ROLES. [/s> |
SELECT role_code, role_name, role_description FROM ROLES | CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR, role_description VARCHAR) | List all role codes, role names, and role descriptions. | <s>[INST] Given the following SQL query and context: Query: SELECT role_code, role_name, role_description FROM ROLES Context: CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR, role_description VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List all role codes, role names, and ro... |
SELECT role_name, role_description FROM ROLES WHERE role_code = "MG" | CREATE TABLE ROLES (role_name VARCHAR, role_description VARCHAR, role_code VARCHAR) | What are the name and description for role code "MG"? | <s>[INST] Given the following SQL query and context: Query: SELECT role_name, role_description FROM ROLES WHERE role_code = "MG" Context: CREATE TABLE ROLES (role_name VARCHAR, role_description VARCHAR, role_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the name and descr... |
SELECT role_description FROM ROLES WHERE role_name = "Proof Reader" | CREATE TABLE ROLES (role_description VARCHAR, role_name VARCHAR) | Show the description for role name "Proof Reader". | <s>[INST] Given the following SQL query and context: Query: SELECT role_description FROM ROLES WHERE role_name = "Proof Reader" Context: CREATE TABLE ROLES (role_description VARCHAR, role_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the description for role name "Proof Reade... |
SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani' | CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR, date_of_birth VARCHAR, employee_Name VARCHAR) | Show the name, role code, and date of birth for the employee with name 'Armani'. | <s>[INST] Given the following SQL query and context: Query: SELECT employee_name, role_code, date_of_birth FROM Employees WHERE employee_Name = 'Armani' Context: CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR, date_of_birth VARCHAR, employee_Name VARCHAR) [/INST] Based on the provided SQL query and co... |
SELECT employee_ID FROM Employees WHERE employee_name = "Ebba" | CREATE TABLE Employees (employee_ID VARCHAR, employee_name VARCHAR) | What is the id for the employee called Ebba? | <s>[INST] Given the following SQL query and context: Query: SELECT employee_ID FROM Employees WHERE employee_name = "Ebba" Context: CREATE TABLE Employees (employee_ID VARCHAR, employee_name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the id for the employee called Ebba? The ... |
SELECT employee_name FROM Employees WHERE role_code = "HR" | CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR) | Show the names of all the employees with role "HR". | <s>[INST] Given the following SQL query and context: Query: SELECT employee_name FROM Employees WHERE role_code = "HR" Context: CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the names of all the employees with role "HR". The... |
SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code | CREATE TABLE Employees (role_code VARCHAR) | Show all role codes and the number of employees in each role. | <s>[INST] Given the following SQL query and context: Query: SELECT role_code, COUNT(*) FROM Employees GROUP BY role_code Context: CREATE TABLE Employees (role_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all role codes and the number of employees in each role. The answer to ... |
SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Employees (role_code VARCHAR) | What is the role code with the largest number of employees? | <s>[INST] Given the following SQL query and context: Query: SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Employees (role_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the role code with the largest number of employ... |
SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3 | CREATE TABLE Employees (role_code VARCHAR) | Show all role codes with at least 3 employees. | <s>[INST] Given the following SQL query and context: Query: SELECT role_code FROM Employees GROUP BY role_code HAVING COUNT(*) >= 3 Context: CREATE TABLE Employees (role_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all role codes with at least 3 employees. The answer to your... |
SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) LIMIT 1 | CREATE TABLE Employees (role_code VARCHAR) | Show the role code with the least employees. | <s>[INST] Given the following SQL query and context: Query: SELECT role_code FROM Employees GROUP BY role_code ORDER BY COUNT(*) LIMIT 1 Context: CREATE TABLE Employees (role_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the role code with the least employees. The answer to y... |
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" | CREATE TABLE Employees (role_code VARCHAR, employee_name VARCHAR); CREATE TABLE ROLES (role_name VARCHAR, role_description VARCHAR, role_code VARCHAR) | What is the role name and role description for employee called Ebba? | <s>[INST] Given the following SQL query and context: Query: 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 Employees (role_code VARCHAR, employee_name VARCHAR); CREATE TABLE ROLES (role_name VARCHAR, rol... |
SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Editor" | CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR); CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR) | Show the names of employees with role name Editor. | <s>[INST] Given the following SQL query and context: Query: 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 ROLES (role_code VARCHAR, role_name VARCHAR); CREATE TABLE Employees (employee_name VARCHAR, role_code VARCHAR) [/I... |
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" | CREATE TABLE Employees (employee_id VARCHAR, role_code VARCHAR); CREATE TABLE ROLES (role_code VARCHAR, role_name VARCHAR) | Show the employee ids for all employees with role name "Human Resource" or "Manager". | <s>[INST] Given the following SQL query and context: Query: 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 Employees (employee_id VARCHAR, role_code VARCHAR); CREATE TABLE ROLES (role_code... |
SELECT DISTINCT location_code FROM Document_locations | CREATE TABLE Document_locations (location_code VARCHAR) | What are the different location codes for documents? | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT location_code FROM Document_locations Context: CREATE TABLE Document_locations (location_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the different location codes for documents? The answer to you... |
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" | 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) | Show the location name for document "Robin CV". | <s>[INST] Given the following SQL query and context: Query: 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 Ref_locations (location_... |
SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations | CREATE TABLE Document_locations (location_code VARCHAR, date_in_location_from VARCHAR, date_in_locaton_to VARCHAR) | Show the location code, the starting date and ending data in that location for all the documents. | <s>[INST] Given the following SQL query and context: Query: SELECT location_code, date_in_location_from, date_in_locaton_to FROM Document_locations Context: CREATE TABLE Document_locations (location_code VARCHAR, date_in_location_from VARCHAR, date_in_locaton_to VARCHAR) [/INST] Based on the provided SQL query and cont... |
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" | 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) | What is "the date in location from" and "the date in location to" for the document with name "Robin CV"? | <s>[INST] Given the following SQL query and context: Query: 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 All_documents (document_id VARCHAR, document_name VARCHAR... |
SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code | CREATE TABLE Document_locations (location_code VARCHAR) | Show the location codes and the number of documents in each location. | <s>[INST] Given the following SQL query and context: Query: SELECT location_code, COUNT(*) FROM Document_locations GROUP BY location_code Context: CREATE TABLE Document_locations (location_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the location codes and the number of docu... |
SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Document_locations (location_code VARCHAR) | What is the location code with the most documents? | <s>[INST] Given the following SQL query and context: Query: SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Document_locations (location_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the location code... |
SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3 | CREATE TABLE Document_locations (location_code VARCHAR) | Show the location codes with at least 3 documents. | <s>[INST] Given the following SQL query and context: Query: SELECT location_code FROM Document_locations GROUP BY location_code HAVING COUNT(*) >= 3 Context: CREATE TABLE Document_locations (location_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the location codes with at lea... |
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 | CREATE TABLE Document_locations (location_code VARCHAR); CREATE TABLE Ref_locations (location_name VARCHAR, location_code VARCHAR) | Show the location name and code with the least documents. | <s>[INST] Given the following SQL query and context: Query: 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 Document_locations (location_code VARCHAR); CREATE... |
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 | 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) | What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents? | <s>[INST] Given the following SQL query and context: Query: 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 Employee... |
SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destruction_Authorised_by_Employee_ID | CREATE TABLE Documents_to_be_destroyed (Destruction_Authorised_by_Employee_ID VARCHAR) | Show the id of each employee and the number of document destruction authorised by that employee. | <s>[INST] Given the following SQL query and context: Query: 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 (Destruction_Authorised_by_Employee_ID VARCHAR) [/INST] Based on the provided S... |
SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID | CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR) | Show the employee ids and the number of documents destroyed by each employee. | <s>[INST] Given the following SQL query and context: Query: SELECT Destroyed_by_Employee_ID, COUNT(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID Context: CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is:... |
SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed | 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) | Show the ids of the employees who don't authorize destruction for any document. | <s>[INST] Given the following SQL query and context: Query: SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed Context: CREATE TABLE Documents_to_be_destroyed (employee_id VARCHAR, Destruction_Authorised_by_Employee_ID VARCHAR); CREATE TABLE Employees (e... |
SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed | CREATE TABLE Documents_to_be_destroyed (Destruction_Authorised_by_Employee_ID VARCHAR) | Show the ids of all employees who have authorized destruction. | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed Context: CREATE TABLE Documents_to_be_destroyed (Destruction_Authorised_by_Employee_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the... |
SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed | CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR) | Show the ids of all employees who have destroyed a document. | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed Context: CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the ids of all employees who ... |
SELECT employee_id FROM Employees EXCEPT SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed | 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) | Show the ids of all employees who don't destroy any document. | <s>[INST] Given the following SQL query and context: Query: SELECT employee_id FROM Employees EXCEPT SELECT 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, Destro... |
SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed | CREATE TABLE Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR, Destruction_Authorised_by_Employee_ID VARCHAR) | Show the ids of all employees who have either destroyed a document or made an authorization to do this. | <s>[INST] Given the following SQL query and context: Query: 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 Documents_to_be_destroyed (Destroyed_by_Employee_ID VARCHAR, Destruction_Authorised_by_Employ... |
SELECT clubname FROM club | CREATE TABLE club (clubname VARCHAR) | What are the names of all clubs? | <s>[INST] Given the following SQL query and context: Query: SELECT clubname FROM club Context: CREATE TABLE club (clubname VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of all clubs? The answer to your question is: SELECT clubname FROM club. [/s> |
SELECT COUNT(*) FROM student | CREATE TABLE student (Id VARCHAR) | How many students are there? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM student Context: CREATE TABLE student (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many students are there? The answer to your question is: SELECT COUNT(*) FROM student. [/s> |
SELECT DISTINCT fname FROM student | CREATE TABLE student (fname VARCHAR) | What are the first names of all the students? | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT fname FROM student Context: CREATE TABLE student (fname VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the first names of all the students? The answer to your question is: SELECT DISTINCT fname FROM stu... |
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" | CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) | Find the last names of the members of the club "Bootup Baltimore". | <s>[INST] Given the following SQL query and context: Query: 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 VARCH... |
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" | CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (lname VARCHAR, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) | Who are the members of the club named "Hopkins Student Enterprises"? Show the last name. | <s>[INST] Given the following SQL query and context: Query: 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 student (... |
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" | CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR) | How many members does the club "Tennis Club" has? | <s>[INST] Given the following SQL query and context: Query: 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 VA... |
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" | CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE student (stuid VARCHAR) | Find the number of members of club "Pen and Paper Gaming". | <s>[INST] Given the following SQL query and context: Query: 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 club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (... |
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" | CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubid VARCHAR) | How many clubs does "Linda Smith" belong to? | <s>[INST] Given the following SQL query and context: Query: 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 TAB... |
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" | CREATE TABLE student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubid VARCHAR) | Find the number of clubs where "Tracy Kim" is a member. | <s>[INST] Given the following SQL query and context: Query: 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 student (stuid VARCHAR, fname VARCHAR, lname VARCHAR); CREATE TABLE... |
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" | 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) | Find all the female members of club "Bootup Baltimore". Show the first name and last name. | <s>[INST] Given the following SQL query and context: Query: 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... |
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" | 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) | Find all the male members of club "Hopkins Student Enterprises". Show the first name and last name. | <s>[INST] Given the following SQL query and context: Query: 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 VARCH... |
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" | 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) | Find all members of "Bootup Baltimore" whose major is "600". Show the first name and last name. | <s>[INST] Given the following SQL query and context: Query: 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 club (clubid VARCHAR, clubname VARCHAR); CR... |
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 | CREATE TABLE student (stuid VARCHAR, major VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR) | Which club has the most members majoring in "600"? | <s>[INST] Given the following SQL query and context: Query: 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, major VARCH... |
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 | CREATE TABLE student (stuid VARCHAR, sex VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR) | Find the name of the club that has the most female students. | <s>[INST] Given the following SQL query and context: Query: 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 student (stuid VARCHAR, sex VARCHAR); C... |
SELECT clubdesc FROM club WHERE clubname = "Tennis Club" | CREATE TABLE club (clubdesc VARCHAR, clubname VARCHAR) | What is the description of the club named "Tennis Club"? | <s>[INST] Given the following SQL query and context: Query: SELECT clubdesc FROM club WHERE clubname = "Tennis Club" Context: CREATE TABLE club (clubdesc VARCHAR, clubname VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the description of the club named "Tennis Club"? The answer ... |
SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming" | CREATE TABLE club (clubdesc VARCHAR, clubname VARCHAR) | Find the description of the club "Pen and Paper Gaming". | <s>[INST] Given the following SQL query and context: Query: SELECT clubdesc FROM club WHERE clubname = "Pen and Paper Gaming" Context: CREATE TABLE club (clubdesc VARCHAR, clubname VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the description of the club "Pen and Paper Gaming". Th... |
SELECT clublocation FROM club WHERE clubname = "Tennis Club" | CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR) | What is the location of the club named "Tennis Club"? | <s>[INST] Given the following SQL query and context: Query: SELECT clublocation FROM club WHERE clubname = "Tennis Club" Context: CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the location of the club named "Tennis Club"? The an... |
SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming" | CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR) | Find the location of the club "Pen and Paper Gaming". | <s>[INST] Given the following SQL query and context: Query: SELECT clublocation FROM club WHERE clubname = "Pen and Paper Gaming" Context: CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the location of the club "Pen and Paper Gaming... |
SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises" | CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR) | Where is the club "Hopkins Student Enterprises" located? | <s>[INST] Given the following SQL query and context: Query: SELECT clublocation FROM club WHERE clubname = "Hopkins Student Enterprises" Context: CREATE TABLE club (clublocation VARCHAR, clubname VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Where is the club "Hopkins Student Enterpris... |
SELECT clubname FROM club WHERE clublocation = "AKW" | CREATE TABLE club (clubname VARCHAR, clublocation VARCHAR) | Find the name of all the clubs at "AKW". | <s>[INST] Given the following SQL query and context: Query: SELECT clubname FROM club WHERE clublocation = "AKW" Context: CREATE TABLE club (clubname VARCHAR, clublocation VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the name of all the clubs at "AKW". The answer to your question... |
SELECT COUNT(*) FROM club WHERE clublocation = "HHH" | CREATE TABLE club (clublocation VARCHAR) | How many clubs are located at "HHH"? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM club WHERE clublocation = "HHH" Context: CREATE TABLE club (clublocation VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many clubs are located at "HHH"? The answer to your question is: SELECT COUNT(*) F... |
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" | 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) | What are the first and last name of the president of the club "Bootup Baltimore"? | <s>[INST] Given the following SQL query and context: Query: 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 VAR... |
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" | 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) | Who is the "CTO" of club "Hopkins Student Enterprises"? Show the first name and last name. | <s>[INST] Given the following SQL query and context: Query: 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, clubnam... |
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" | CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE member_of_club (position VARCHAR, clubid VARCHAR) | How many different roles are there in the club "Bootup Baltimore"? | <s>[INST] Given the following SQL query and context: Query: 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 member_of_club (position VARCHAR, clubid VA... |
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 | CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (stuid VARCHAR, age VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) | How many members of "Bootup Baltimore" are older than 18? | <s>[INST] Given the following SQL query and context: Query: 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 stud... |
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 | CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (stuid VARCHAR, age VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) | How many members of club "Bootup Baltimore" are younger than 18? | <s>[INST] Given the following SQL query and context: Query: 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 stud... |
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" | CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR) | Find the names of all the clubs that have at least a member from the city with city code "BAL". | <s>[INST] Given the following SQL query and context: Query: 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 (clubnam... |
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" | CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, city_code VARCHAR) | Find the names of the clubs that have at least a member from the city with city code "HOU". | <s>[INST] Given the following SQL query and context: Query: 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 member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubnam... |
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" | 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) | How many clubs does the student named "Eric Tai" belong to? | <s>[INST] Given the following SQL query and context: Query: 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 VARC... |
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" | 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) | List the clubs having "Davis Steven" as a member. | <s>[INST] Given the following SQL query and context: Query: 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 student (stuid VARCHAR, fname VARCHAR, lname VARCHAR... |
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 | CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname VARCHAR, clubid VARCHAR); CREATE TABLE student (stuid VARCHAR, advisor VARCHAR) | List the clubs that have at least a member with advisor "1121". | <s>[INST] Given the following SQL query and context: Query: 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 member_of_club (clubid VARCHAR, stuid VARCHAR); CREATE TABLE club (clubname V... |
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" | CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) | What is the average age of the members of the club "Bootup Baltimore"? | <s>[INST] Given the following SQL query and context: Query: 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 INTE... |
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" | CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) | Find the average age of members of the club "Hopkins Student Enterprises". | <s>[INST] Given the following SQL query and context: Query: 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 studen... |
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" | CREATE TABLE club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (age INTEGER, stuid VARCHAR); CREATE TABLE member_of_club (clubid VARCHAR, stuid VARCHAR) | Retrieve the average age of members of the club "Tennis Club". | <s>[INST] Given the following SQL query and context: Query: 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 club (clubid VARCHAR, clubname VARCHAR); CREATE TABLE student (age INTEGER, ... |
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' | 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) | 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'? | <s>[INST] Given the following SQL query and context: Query: 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 grants (grant_amo... |
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' | CREATE TABLE Project_outcomes (project_id VARCHAR, outcome_code VARCHAR); CREATE TABLE Projects (project_details VARCHAR, project_id VARCHAR) | List the project details of the project both producing patent and paper as outcomes. | <s>[INST] Given the following SQL query and context: Query: 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 WHER... |
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' | 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) | What is the total grant amount of the organisations described as research? | <s>[INST] Given the following SQL query and context: Query: 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 TABL... |
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' | CREATE TABLE Project_Staff (date_from VARCHAR, date_to VARCHAR, project_id VARCHAR, role_code VARCHAR) | List from which date and to which date these staff work: project staff of the project which hires the most staffs | <s>[INST] Given the following SQL query and context: Query: 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 Proje... |
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 | CREATE TABLE Grants (organisation_id VARCHAR, grant_amount INTEGER); CREATE TABLE Organisations (organisation_id VARCHAR, organisation_details VARCHAR) | Find the organisation ids and details of the organisations which are involved in | <s>[INST] Given the following SQL query and context: Query: 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 Grants (organisation_id VARCHAR, grant... |
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 | CREATE TABLE Research_Staff (employer_organisation_id VARCHAR); CREATE TABLE Organisations (organisation_type VARCHAR, organisation_id VARCHAR) | What is the organisation type and id of the organisation which has the most number of research staff? | <s>[INST] Given the following SQL query and context: Query: 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_org... |
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 | CREATE TABLE Research_Staff (employer_organisation_id VARCHAR); CREATE TABLE Organisations (organisation_type VARCHAR, organisation_id VARCHAR) | Which organisation type hires most research staff? | <s>[INST] Given the following SQL query and context: Query: 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 Context: CREATE TABLE Research_Staff (employer_organisation_id VARCH... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.