answer stringlengths 18 557 | context stringlengths 27 489 | question stringlengths 12 244 | text stringlengths 275 1.7k |
|---|---|---|---|
SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE customers (customer_type_code VARCHAR) | How many customers are there in the customer type with the most customers? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM customers GROUP BY customer_type_code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE customers (customer_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many customers are there in the cu... |
SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1 | CREATE TABLE staff (last_name VARCHAR, staff_id VARCHAR); CREATE TABLE complaints (staff_id VARCHAR, date_complaint_raised VARCHAR) | What is the last name of the staff who has handled the first ever complaint? | <s>[INST] Given the following SQL query and context: Query: SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1 Context: CREATE TABLE staff (last_name VARCHAR, staff_id VARCHAR); CREATE TABLE complaints (staff_id VARCHAR, date_complaint_raise... |
SELECT COUNT(DISTINCT complaint_type_code) FROM complaints | CREATE TABLE complaints (complaint_type_code VARCHAR) | How many distinct complaint type codes are there in the database? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT complaint_type_code) FROM complaints Context: CREATE TABLE complaints (complaint_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct complaint type codes are there in the database? T... |
SELECT address_line_1, address_line_2 FROM customers WHERE email_address = "vbogisich@example.org" | CREATE TABLE customers (address_line_1 VARCHAR, address_line_2 VARCHAR, email_address VARCHAR) | Find the address line 1 and 2 of the customer with email "vbogisich@example.org". | <s>[INST] Given the following SQL query and context: Query: SELECT address_line_1, address_line_2 FROM customers WHERE email_address = "vbogisich@example.org" Context: CREATE TABLE customers (address_line_1 VARCHAR, address_line_2 VARCHAR, email_address VARCHAR) [/INST] Based on the provided SQL query and context, your... |
SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = "Product Failure" GROUP BY complaint_status_code | CREATE TABLE complaints (complaint_status_code VARCHAR, complaint_type_code VARCHAR) | Find the number of complaints with Product Failure type for each complaint status. | <s>[INST] Given the following SQL query and context: Query: SELECT complaint_status_code, COUNT(*) FROM complaints WHERE complaint_type_code = "Product Failure" GROUP BY complaint_status_code Context: CREATE TABLE complaints (complaint_status_code VARCHAR, complaint_type_code VARCHAR) [/INST] Based on the provided SQL ... |
SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) LIMIT 5 | CREATE TABLE complaints (staff_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, staff_id VARCHAR) | What is first names of the top 5 staff who have handled the greatest number of complaints? | <s>[INST] Given the following SQL query and context: Query: SELECT t1.first_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id = t2.staff_id GROUP BY t2.staff_id ORDER BY COUNT(*) LIMIT 5 Context: CREATE TABLE complaints (staff_id VARCHAR); CREATE TABLE staff (first_name VARCHAR, staff_id VARCHAR) [/INST] Based... |
SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) LIMIT 1 | CREATE TABLE customers (state VARCHAR) | Which state has the most customers? | <s>[INST] Given the following SQL query and context: Query: SELECT state FROM customers GROUP BY state ORDER BY COUNT(*) LIMIT 1 Context: CREATE TABLE customers (state VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which state has the most customers? The answer to your question is: SELE... |
SELECT COUNT(*) FROM submission | CREATE TABLE submission (Id VARCHAR) | How many submissions are there? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM submission Context: CREATE TABLE submission (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many submissions are there? The answer to your question is: SELECT COUNT(*) FROM submission. [/s> |
SELECT Author FROM submission ORDER BY Scores | CREATE TABLE submission (Author VARCHAR, Scores VARCHAR) | List the authors of submissions in ascending order of scores. | <s>[INST] Given the following SQL query and context: Query: SELECT Author FROM submission ORDER BY Scores Context: CREATE TABLE submission (Author VARCHAR, Scores VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the authors of submissions in ascending order of scores. The answer to y... |
SELECT Author, College FROM submission | CREATE TABLE submission (Author VARCHAR, College VARCHAR) | What are the authors of submissions and their colleges? | <s>[INST] Given the following SQL query and context: Query: SELECT Author, College FROM submission Context: CREATE TABLE submission (Author VARCHAR, College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the authors of submissions and their colleges? The answer to your question... |
SELECT Author FROM submission WHERE College = "Florida" OR College = "Temple" | CREATE TABLE submission (Author VARCHAR, College VARCHAR) | Show the names of authors from college "Florida" or "Temple" | <s>[INST] Given the following SQL query and context: Query: SELECT Author FROM submission WHERE College = "Florida" OR College = "Temple" Context: CREATE TABLE submission (Author VARCHAR, College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the names of authors from college "Flor... |
SELECT AVG(Scores) FROM submission | CREATE TABLE submission (Scores INTEGER) | What is the average score of submissions? | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(Scores) FROM submission Context: CREATE TABLE submission (Scores INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average score of submissions? The answer to your question is: SELECT AVG(Scores) FROM submis... |
SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1 | CREATE TABLE submission (Author VARCHAR, Scores VARCHAR) | What is the author of the submission with the highest score? | <s>[INST] Given the following SQL query and context: Query: SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1 Context: CREATE TABLE submission (Author VARCHAR, Scores VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the author of the submission with the highest score? The... |
SELECT College, COUNT(*) FROM submission GROUP BY College | CREATE TABLE submission (College VARCHAR) | Show different colleges along with the number of authors of submission from each college. | <s>[INST] Given the following SQL query and context: Query: SELECT College, COUNT(*) FROM submission GROUP BY College Context: CREATE TABLE submission (College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show different colleges along with the number of authors of submission from each... |
SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE submission (College VARCHAR) | Show the most common college of authors of submissions. | <s>[INST] Given the following SQL query and context: Query: SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE submission (College VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the most common college of authors of submissions. The... |
SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 | CREATE TABLE submission (College VARCHAR, Scores INTEGER) | Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80. | <s>[INST] Given the following SQL query and context: Query: SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 Context: CREATE TABLE submission (College VARCHAR, Scores INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the colle... |
SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID | CREATE TABLE acceptance (Result VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR) | Show the authors of submissions and the acceptance results of their submissions. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Author, T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID Context: CREATE TABLE acceptance (Result VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR) [/INST] Bas... |
SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1 | CREATE TABLE acceptance (Result VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Submission_ID VARCHAR, Scores VARCHAR) | Show the result of the submission with the highest score. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY T2.Scores DESC LIMIT 1 Context: CREATE TABLE acceptance (Result VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Submission_ID VARCHAR, Scores... |
SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author | CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE acceptance (workshop_id VARCHAR, Submission_ID VARCHAR) | Show each author and the number of workshops they submitted to. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Author, COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author Context: CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE acceptance (workshop_i... |
SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1 | CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE acceptance (Submission_ID VARCHAR, workshop_id VARCHAR) | Show the authors who have submissions to more than one workshop. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id) > 1 Context: CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE acceptance (... |
SELECT Date, Venue FROM workshop ORDER BY Venue | CREATE TABLE workshop (Date VARCHAR, Venue VARCHAR) | Show the date and venue of each workshop in ascending alphabetical order of the venue. | <s>[INST] Given the following SQL query and context: Query: SELECT Date, Venue FROM workshop ORDER BY Venue Context: CREATE TABLE workshop (Date VARCHAR, Venue VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the date and venue of each workshop in ascending alphabetical order of the ... |
SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance) | CREATE TABLE acceptance (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR) | List the authors who do not have submission to any workshop. | <s>[INST] Given the following SQL query and context: Query: SELECT Author FROM submission WHERE NOT Submission_ID IN (SELECT Submission_ID FROM acceptance) Context: CREATE TABLE acceptance (Author VARCHAR, Submission_ID VARCHAR); CREATE TABLE submission (Author VARCHAR, Submission_ID VARCHAR) [/INST] Based on the provi... |
SELECT COUNT(*) FROM INVESTORS | CREATE TABLE INVESTORS (Id VARCHAR) | Find the number of investors in total. | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM INVESTORS Context: CREATE TABLE INVESTORS (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find the number of investors in total. The answer to your question is: SELECT COUNT(*) FROM INVESTORS. [/s> |
SELECT Investor_details FROM INVESTORS | CREATE TABLE INVESTORS (Investor_details VARCHAR) | Show all investor details. | <s>[INST] Given the following SQL query and context: Query: SELECT Investor_details FROM INVESTORS Context: CREATE TABLE INVESTORS (Investor_details VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all investor details. The answer to your question is: SELECT Investor_details FROM INV... |
SELECT DISTINCT lot_details FROM LOTS | CREATE TABLE LOTS (lot_details VARCHAR) | Show all distinct lot details. | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT lot_details FROM LOTS Context: CREATE TABLE LOTS (lot_details VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all distinct lot details. The answer to your question is: SELECT DISTINCT lot_details FROM LOTS. ... |
SELECT MAX(amount_of_transaction) FROM TRANSACTIONS | CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER) | Show the maximum amount of transaction. | <s>[INST] Given the following SQL query and context: Query: SELECT MAX(amount_of_transaction) FROM TRANSACTIONS Context: CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the maximum amount of transaction. The answer to your question is... |
SELECT date_of_transaction, share_count FROM TRANSACTIONS | CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR) | Show all date and share count of transactions. | <s>[INST] Given the following SQL query and context: Query: SELECT date_of_transaction, share_count FROM TRANSACTIONS Context: CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all date and share count of transactions... |
SELECT SUM(share_count) FROM TRANSACTIONS | CREATE TABLE TRANSACTIONS (share_count INTEGER) | What is the total share of transactions? | <s>[INST] Given the following SQL query and context: Query: SELECT SUM(share_count) FROM TRANSACTIONS Context: CREATE TABLE TRANSACTIONS (share_count INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the total share of transactions? The answer to your question is: SELECT SUM(share_... |
SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' | CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, transaction_type_code VARCHAR) | Show all transaction ids with transaction code 'PUR'. | <s>[INST] Given the following SQL query and context: Query: SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code = 'PUR' Context: CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, transaction_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all transaction i... |
SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = "SALE" | CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_type_code VARCHAR) | Show all dates of transactions whose type code is "SALE". | <s>[INST] Given the following SQL query and context: Query: SELECT date_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = "SALE" Context: CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all da... |
SELECT AVG(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" | CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, transaction_type_code VARCHAR) | Show the average amount of transactions with type code "SALE". | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" Context: CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, transaction_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Sh... |
SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = "PUR" | CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR) | Show the description of transaction type with code "PUR". | <s>[INST] Given the following SQL query and context: Query: SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = "PUR" Context: CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR) [/INST] Based on the provided SQL query and con... |
SELECT MIN(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "PUR" AND share_count > 50 | CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, transaction_type_code VARCHAR, share_count VARCHAR) | Show the minimum amount of transactions whose type code is "PUR" and whose share count is bigger than 50. | <s>[INST] Given the following SQL query and context: Query: SELECT MIN(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "PUR" AND share_count > 50 Context: CREATE TABLE TRANSACTIONS (amount_of_transaction INTEGER, transaction_type_code VARCHAR, share_count VARCHAR) [/INST] Based on the provided SQ... |
SELECT MAX(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000 | CREATE TABLE TRANSACTIONS (share_count INTEGER, amount_of_transaction INTEGER) | Show the maximum share count of transactions where the amount is smaller than 10000 | <s>[INST] Given the following SQL query and context: Query: SELECT MAX(share_count) FROM TRANSACTIONS WHERE amount_of_transaction < 10000 Context: CREATE TABLE TRANSACTIONS (share_count INTEGER, amount_of_transaction INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the maximum share ... |
SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000 | CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR, amount_of_transaction VARCHAR) | Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000. | <s>[INST] Given the following SQL query and context: Query: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000 Context: CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR, amount_of_transaction VARCHAR) [/INST] Based on the provided SQL query an... |
SELECT T1.transaction_type_description, T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 | CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR); CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_type_code VARCHAR, share_count INTEGER) | Show the transaction type descriptions and dates if the share count is smaller than 10. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.transaction_type_description, T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 Context: CREATE TABLE Ref_Transaction_Types (transaction_ty... |
SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100 | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) | Show details of all investors if they make any transaction with share count greater than 100. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100 Context: CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER); CREATE TABLE INVESTORS (Investor_details VARCHA... |
SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) | How many distinct transaction types are used in the transactions? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS Context: CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct transaction types are used in the transac... |
SELECT lot_details, investor_id FROM LOTS | CREATE TABLE LOTS (lot_details VARCHAR, investor_id VARCHAR) | Return the lot details and investor ids. | <s>[INST] Given the following SQL query and context: Query: SELECT lot_details, investor_id FROM LOTS Context: CREATE TABLE LOTS (lot_details VARCHAR, investor_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Return the lot details and investor ids. The answer to your question is: SELE... |
SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" | CREATE TABLE LOTS (lot_details VARCHAR, investor_id VARCHAR); CREATE TABLE INVESTORS (investor_id VARCHAR, Investor_details VARCHAR) | Return the lot details of lots that belong to investors with details "l"? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" Context: CREATE TABLE LOTS (lot_details VARCHAR, investor_id VARCHAR); CREATE TABLE INVESTORS (investor_id VARCHAR, Investor_details V... |
SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000 | CREATE TABLE PURCHASES (purchase_details VARCHAR, purchase_transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, amount_of_transaction INTEGER) | What are the purchase details of transactions with amount bigger than 10000? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000 Context: CREATE TABLE PURCHASES (purchase_details VARCHAR, purchase_transaction_id VARCHAR); CREATE... |
SELECT T1.sales_details, T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000 | CREATE TABLE SALES (sales_details VARCHAR, sales_transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, transaction_id VARCHAR, amount_of_transaction INTEGER) | What are the sale details and dates of transactions with amount smaller than 3000? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.sales_details, T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000 Context: CREATE TABLE SALES (sales_details VARCHAR, sales_transaction_id VARCHAR); CRE... |
SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50 | CREATE TABLE LOTS (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count INTEGER) | What are the lot details of lots associated with transactions with share count smaller than 50? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50 Context: CREATE TABLE LOTS (lot_details VARCHAR, lot_id VARCHAR); CRE... |
SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR" | CREATE TABLE LOTS (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE TRANSACTIONS_LOTS (transaction_id VARCHAR); CREATE TABLE TRANSACTIONS (transaction_id VARCHAR, share_count VARCHAR, transaction_type_code VARCHAR) | What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR" Context: CREATE TABLE LOTS (lot... |
SELECT transaction_type_code, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR, amount_of_transaction INTEGER) | Show the average transaction amount for different transaction types. | <s>[INST] Given the following SQL query and context: Query: SELECT transaction_type_code, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code Context: CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR, amount_of_transaction INTEGER) [/INST] Based on the provided SQL query and context, you... |
SELECT transaction_type_code, MAX(share_count), MIN(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR, share_count INTEGER) | Show the maximum and minimum share count of different transaction types. | <s>[INST] Given the following SQL query and context: Query: SELECT transaction_type_code, MAX(share_count), MIN(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code Context: CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR, share_count INTEGER) [/INST] Based on the provided SQL query and context, your ... |
SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER) | Show the average share count of transactions for different investors. | <s>[INST] Given the following SQL query and context: Query: SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id Context: CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the average share count of tra... |
SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY AVG(share_count) | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER) | Show the average share count of transactions each each investor, ordered by average share count. | <s>[INST] Given the following SQL query and context: Query: SELECT investor_id, AVG(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY AVG(share_count) Context: CREATE TABLE TRANSACTIONS (investor_id VARCHAR, share_count INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the ... |
SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, amount_of_transaction INTEGER) | Show the average amount of transactions for different investors. | <s>[INST] Given the following SQL query and context: Query: SELECT investor_id, AVG(amount_of_transaction) FROM TRANSACTIONS GROUP BY investor_id Context: CREATE TABLE TRANSACTIONS (investor_id VARCHAR, amount_of_transaction INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the averag... |
SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id | CREATE TABLE TRANSACTIONS (transaction_id VARCHAR); CREATE TABLE Transactions_Lots (lot_id VARCHAR, transaction_id VARCHAR) | Show the average amount of transactions for different lots. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id Context: CREATE TABLE TRANSACTIONS (transaction_id VARCHAR); CREATE TABLE Transactions_Lots (lot_id VA... |
SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction) | CREATE TABLE TRANSACTIONS (transaction_id VARCHAR); CREATE TABLE Transactions_Lots (lot_id VARCHAR, transaction_id VARCHAR) | Show the average amount of transactions for different lots, ordered by average amount of transactions. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.lot_id, AVG(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY AVG(amount_of_transaction) Context: CREATE TABLE TRANSACTIONS (transaction_id VARCHAR); CREAT... |
SELECT investor_id, COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" GROUP BY investor_id | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR) | Show the number of transactions with transaction type code "SALE" for different investors if it is larger than 0. | <s>[INST] Given the following SQL query and context: Query: SELECT investor_id, COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" GROUP BY investor_id Context: CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question ... |
SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id | CREATE TABLE TRANSACTIONS (investor_id VARCHAR) | Show the number of transactions for different investors. | <s>[INST] Given the following SQL query and context: Query: SELECT investor_id, COUNT(*) FROM TRANSACTIONS GROUP BY investor_id Context: CREATE TABLE TRANSACTIONS (investor_id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the number of transactions for different investors. The ans... |
SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) LIMIT 1 | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) | Show the transaction type code that occurs the fewest times. | <s>[INST] Given the following SQL query and context: Query: SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) LIMIT 1 Context: CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the transacti... |
SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) | Show the transaction type code that occurs the most frequently. | <s>[INST] Given the following SQL query and context: Query: SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the tran... |
SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE TRANSACTIONS (transaction_type_code VARCHAR); CREATE TABLE Ref_Transaction_Types (transaction_type_description VARCHAR, transaction_type_code VARCHAR) | Show the description of the transaction type that occurs most frequently. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE TRANSACTIONS (transact... |
SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) | Show the id and details of the investor that has the largest number of transactions. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (... |
SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3 | CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) | Show the id and details for the investors who have the top 3 number of transactions. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3 Context: CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (... |
SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2 | CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (investor_id VARCHAR) | Show the ids of the investors who have at least two transactions. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2 Context: CREATE TABLE TRANSACTIONS (investor_id VARCHAR); CREATE TABLE INVESTORS (investor_id VARCHAR) [/INST] Ba... |
SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" GROUP BY T2.investor_id HAVING COUNT(*) >= 2 | CREATE TABLE TRANSACTIONS (investor_id VARCHAR, transaction_type_code VARCHAR); CREATE TABLE INVESTORS (Investor_details VARCHAR, investor_id VARCHAR) | Show the ids and details of the investors who have at least two transactions with type code "SALE". | <s>[INST] Given the following SQL query and context: Query: SELECT T2.investor_id, T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" GROUP BY T2.investor_id HAVING COUNT(*) >= 2 Context: CREATE TABLE TRANSACTIONS (investor_id VARC... |
SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100 | CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR, amount_of_transaction VARCHAR) | What are the dates of transactions with at least 100 share count or amount bigger than 100? | <s>[INST] Given the following SQL query and context: Query: SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100 Context: CREATE TABLE TRANSACTIONS (date_of_transaction VARCHAR, share_count VARCHAR, amount_of_transaction VARCHAR) [/INST] Based on the provided SQL query a... |
SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases | CREATE TABLE purchases (sales_details VARCHAR, purchase_details VARCHAR); CREATE TABLE sales (sales_details VARCHAR, purchase_details VARCHAR) | What are the details of all sales and purchases? | <s>[INST] Given the following SQL query and context: Query: SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases Context: CREATE TABLE purchases (sales_details VARCHAR, purchase_details VARCHAR); CREATE TABLE sales (sales_details VARCHAR, purchase_details VARCHAR) [/INST] Based on the provided S... |
SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id | CREATE TABLE Lots (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE Lots (lot_details VARCHAR); CREATE TABLE transactions_lots (lot_id VARCHAR) | What are the details of the lots which are not used in any transactions? | <s>[INST] Given the following SQL query and context: Query: SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id Context: CREATE TABLE Lots (lot_details VARCHAR, lot_id VARCHAR); CREATE TABLE Lots (lot_details VARCHAR); CREATE TABLE transactions... |
SELECT COUNT(*) FROM HOTELS | CREATE TABLE HOTELS (Id VARCHAR) | How many available hotels are there in total? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM HOTELS Context: CREATE TABLE HOTELS (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many available hotels are there in total? The answer to your question is: SELECT COUNT(*) FROM HOTELS. [/s> |
SELECT price_range FROM HOTELS | CREATE TABLE HOTELS (price_range VARCHAR) | What are the price ranges of hotels? | <s>[INST] Given the following SQL query and context: Query: SELECT price_range FROM HOTELS Context: CREATE TABLE HOTELS (price_range VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the price ranges of hotels? The answer to your question is: SELECT price_range FROM HOTELS. [/s> |
SELECT DISTINCT Location_Name FROM LOCATIONS | CREATE TABLE LOCATIONS (Location_Name VARCHAR) | Show all distinct location names. | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT Location_Name FROM LOCATIONS Context: CREATE TABLE LOCATIONS (Location_Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all distinct location names. The answer to your question is: SELECT DISTINCT Locati... |
SELECT Name, Other_Details FROM Staff | CREATE TABLE Staff (Name VARCHAR, Other_Details VARCHAR) | Show the names and details of all the staff members. | <s>[INST] Given the following SQL query and context: Query: SELECT Name, Other_Details FROM Staff Context: CREATE TABLE Staff (Name VARCHAR, Other_Details VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the names and details of all the staff members. The answer to your question is: ... |
SELECT Tourist_Details FROM VISITORS | CREATE TABLE VISITORS (Tourist_Details VARCHAR) | Show details of all visitors. | <s>[INST] Given the following SQL query and context: Query: SELECT Tourist_Details FROM VISITORS Context: CREATE TABLE VISITORS (Tourist_Details VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show details of all visitors. The answer to your question is: SELECT Tourist_Details FROM VISIT... |
SELECT price_range FROM HOTELS WHERE star_rating_code = "5" | CREATE TABLE HOTELS (price_range VARCHAR, star_rating_code VARCHAR) | Show the price ranges of hotels with 5 star ratings. | <s>[INST] Given the following SQL query and context: Query: SELECT price_range FROM HOTELS WHERE star_rating_code = "5" Context: CREATE TABLE HOTELS (price_range VARCHAR, star_rating_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the price ranges of hotels with 5 star ratings.... |
SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = "5" AND pets_allowed_yn = 1 | CREATE TABLE HOTELS (price_range INTEGER, star_rating_code VARCHAR, pets_allowed_yn VARCHAR) | Show the average price range of hotels that have 5 star ratings and allow pets. | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = "5" AND pets_allowed_yn = 1 Context: CREATE TABLE HOTELS (price_range INTEGER, star_rating_code VARCHAR, pets_allowed_yn VARCHAR) [/INST] Based on the provided SQL query and context, your question is... |
SELECT Address FROM LOCATIONS WHERE Location_Name = "UK Gallery" | CREATE TABLE LOCATIONS (Address VARCHAR, Location_Name VARCHAR) | What is the address of the location "UK Gallery"? | <s>[INST] Given the following SQL query and context: Query: SELECT Address FROM LOCATIONS WHERE Location_Name = "UK Gallery" Context: CREATE TABLE LOCATIONS (Address VARCHAR, Location_Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the address of the location "UK Gallery"? T... |
SELECT Other_Details FROM LOCATIONS WHERE Location_Name = "UK Gallery" | CREATE TABLE LOCATIONS (Other_Details VARCHAR, Location_Name VARCHAR) | What is the detail of the location UK Gallery? | <s>[INST] Given the following SQL query and context: Query: SELECT Other_Details FROM LOCATIONS WHERE Location_Name = "UK Gallery" Context: CREATE TABLE LOCATIONS (Other_Details VARCHAR, Location_Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the detail of the location UK G... |
SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%" | CREATE TABLE LOCATIONS (Location_Name VARCHAR) | Which location names contain the word "film"? | <s>[INST] Given the following SQL query and context: Query: SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%" Context: CREATE TABLE LOCATIONS (Location_Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which location names contain the word "film"? The answer to you... |
SELECT COUNT(DISTINCT Name) FROM PHOTOS | CREATE TABLE PHOTOS (Name VARCHAR) | How many distinct names are associated with all the photos? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT Name) FROM PHOTOS Context: CREATE TABLE PHOTOS (Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct names are associated with all the photos? The answer to your question is: SELECT COUNT(... |
SELECT DISTINCT Visit_Date FROM VISITS | CREATE TABLE VISITS (Visit_Date VARCHAR) | What are the distinct visit dates? | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT Visit_Date FROM VISITS Context: CREATE TABLE VISITS (Visit_Date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the distinct visit dates? The answer to your question is: SELECT DISTINCT Visit_Date FROM V... |
SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" | CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, How_to_Get_There VARCHAR) | What are the names of the tourist attractions that can be accessed by bus? | <s>[INST] Given the following SQL query and context: Query: SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" Context: CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, How_to_Get_There VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of the tourist attr... |
SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" OR How_to_Get_There = "walk" | CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, Opening_Hours VARCHAR, How_to_Get_There VARCHAR) | What are the names and opening hours of the tourist attractions that can be accessed by bus or walk? | <s>[INST] Given the following SQL query and context: Query: SELECT Name, Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" OR How_to_Get_There = "walk" Context: CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, Opening_Hours VARCHAR, How_to_Get_There VARCHAR) [/INST] Based on the provided SQL query an... |
SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000 | CREATE TABLE HOTELS (star_rating_code VARCHAR, price_range INTEGER); CREATE TABLE Ref_Hotel_Star_Ratings (star_rating_description VARCHAR, star_rating_code VARCHAR) | What are the star rating descriptions of the hotels with price above 10000? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000 Context: CREATE TABLE HOTELS (star_rating_code VARCHAR, price_range INTEGER); CREATE TABLE Ref_Hotel... |
SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID | CREATE TABLE TOURIST_ATTRACTIONS (Opening_Hours VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE MUSEUMS (Museum_Details VARCHAR, Museum_ID VARCHAR) | What are the details and opening hours of the museums? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Museum_Details, T2.Opening_Hours FROM MUSEUMS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Museum_ID = T2.Tourist_Attraction_ID Context: CREATE TABLE TOURIST_ATTRACTIONS (Opening_Hours VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE MUSEUMS (Muse... |
SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1" | CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE PHOTOS (Tourist_Attraction_ID VARCHAR, Name VARCHAR) | What is the name of the tourist attraction that is associated with the photo "game1"? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1" Context: CREATE TABLE TOURIST_ATTRACTIONS (Name VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE PHOTOS (Tourist... |
SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = "film festival" | CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, Name VARCHAR); CREATE TABLE PHOTOS (Name VARCHAR, Description VARCHAR, Tourist_Attraction_ID VARCHAR) | What are the names and descriptions of the photos taken at the tourist attraction "film festival"? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Name, T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = "film festival" Context: CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, Name VARCHAR); CREA... |
SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID | CREATE TABLE TOURIST_ATTRACTIONS (How_to_Get_There VARCHAR, Tourist_Attraction_ID VARCHAR); CREATE TABLE ROYAL_FAMILY (Royal_Family_Details VARCHAR, Royal_Family_ID VARCHAR) | What are the details and ways to get to tourist attractions related to royal family? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Royal_Family_Details, T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID = T2.Tourist_Attraction_ID Context: CREATE TABLE TOURIST_ATTRACTIONS (How_to_Get_There VARCHAR, Tourist_Attraction_ID VARCHAR); CRE... |
SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" | CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE SHOPS (Shop_Details VARCHAR, Shop_ID VARCHAR) | What are the details of the shops that can be accessed by walk? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" Context: CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE... |
SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = "US museum" | CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, Name VARCHAR); CREATE TABLE STAFF (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | What is the name of the staff that is in charge of the attraction named "US museum"? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T2.Name = "US museum" Context: CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, Name VARCHAR); CREATE TABLE STAFF (Name ... |
SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" OR T2.How_to_Get_There = "bus" | CREATE TABLE Street_Markets (Market_Details VARCHAR, Market_ID VARCHAR); CREATE TABLE TOURIST_ATTRACTIONS (Tourist_Attraction_ID VARCHAR, How_to_Get_There VARCHAR) | What are the details of the markets that can be accessed by walk or bus? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Market_Details FROM Street_Markets AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Market_ID = T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There = "walk" OR T2.How_to_Get_There = "bus" Context: CREATE TABLE Street_Markets (Market_Details VARCHAR, Market_... |
SELECT T2.Visit_Date, T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = "Vincent" | CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE VISITS (Visit_Date VARCHAR, Visit_Details VARCHAR, Tourist_ID VARCHAR) | What are the visit date and details of the visitor whose detail is 'Vincent'? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Visit_Date, T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID = T2.Tourist_ID WHERE T1.Tourist_Details = "Vincent" Context: CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE VISITS (Visit_Date VAR... |
SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = "Vincent" | CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | Which tourist attractions does the visitor with detail 'Vincent' visit? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID = T3.Tourist_ID WHERE T3.Tourist_Details = "Vincent" Context: CREATE TABLE VISITS (Tourist_Attraction_ID... |
SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" OR T2.Tourist_Details = "Vivian" | CREATE TABLE VISITORS (Tourist_ID VARCHAR, Tourist_Details VARCHAR); CREATE TABLE VISITS (Visit_Date VARCHAR, Tourist_Attraction_ID VARCHAR, Tourist_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Name, T3.Visit_Date FROM Tourist_Attractions AS T1 JOIN VISITORS AS T2 JOIN VISITS AS T3 ON T1.Tourist_Attraction_ID = T3.Tourist_Attraction_ID AND T2.Tourist_ID = T3.Tourist_ID WHERE T2.Tourist_Details = "Vincent" OR T2.Tourist_Details = "Vivian" Co... |
SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code | CREATE TABLE HOTELS (star_rating_code VARCHAR, price_range INTEGER) | Show the average price of hotels for each star rating code. | <s>[INST] Given the following SQL query and context: Query: SELECT star_rating_code, AVG(price_range) FROM HOTELS GROUP BY star_rating_code Context: CREATE TABLE HOTELS (star_rating_code VARCHAR, price_range INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the average price of hotels... |
SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn | CREATE TABLE HOTELS (pets_allowed_yn VARCHAR, price_range INTEGER) | Show the average price of hotels for different pet policy. | <s>[INST] Given the following SQL query and context: Query: SELECT pets_allowed_yn, AVG(price_range) FROM HOTELS GROUP BY pets_allowed_yn Context: CREATE TABLE HOTELS (pets_allowed_yn VARCHAR, price_range INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the average price of hotels fo... |
SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range | CREATE TABLE HOTELS (hotel_id VARCHAR, star_rating_code VARCHAR, price_range VARCHAR) | Show the id and star rating of each hotel, ordered by its price from low to high. | <s>[INST] Given the following SQL query and context: Query: SELECT hotel_id, star_rating_code FROM HOTELS ORDER BY price_range Context: CREATE TABLE HOTELS (hotel_id VARCHAR, star_rating_code VARCHAR, price_range VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the id and star rating... |
SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3 | CREATE TABLE HOTELS (other_hotel_details VARCHAR, price_range VARCHAR) | Show the details of the top 3 most expensive hotels. | <s>[INST] Given the following SQL query and context: Query: SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3 Context: CREATE TABLE HOTELS (other_hotel_details VARCHAR, price_range VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the details of the top 3 most e... |
SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range LIMIT 3 | CREATE TABLE HOTELS (other_hotel_details VARCHAR, star_rating_code VARCHAR, price_range VARCHAR) | Show the details and star ratings of the 3 least expensive hotels. | <s>[INST] Given the following SQL query and context: Query: SELECT other_hotel_details, star_rating_code FROM HOTELS ORDER BY price_range LIMIT 3 Context: CREATE TABLE HOTELS (other_hotel_details VARCHAR, star_rating_code VARCHAR, price_range VARCHAR) [/INST] Based on the provided SQL query and context, your question i... |
SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Tourist_Attractions (How_to_Get_There VARCHAR) | Show the transportation method most people choose to get to tourist attractions. | <s>[INST] Given the following SQL query and context: Query: SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Tourist_Attractions (How_to_Get_There VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show the trans... |
SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Ref_Attraction_Types (Attraction_Type_Description VARCHAR, Attraction_Type_Code VARCHAR); CREATE TABLE Tourist_Attractions (Attraction_Type_Code VARCHAR) | Show the description and code of the attraction type most tourist attractions belong to. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Attraction_Type_Description, T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code = T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE T... |
SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There | CREATE TABLE Tourist_Attractions (How_to_Get_There VARCHAR) | Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way. | <s>[INST] Given the following SQL query and context: Query: SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There Context: CREATE TABLE Tourist_Attractions (How_to_Get_There VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show different ways to get to attra... |
SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID | CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | Show different tourist attractions' names, ids, and the corresponding number of visits. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Name, T2.Tourist_Attraction_ID, COUNT(*) FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID Context: CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TA... |
SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) >= 2 | CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | Show the names and ids of tourist attractions that are visited at least two times. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Name, T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) >= 2 Context: CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR)... |
SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) <= 1 | CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR); CREATE TABLE Tourist_Attractions (Name VARCHAR, Tourist_Attraction_ID VARCHAR) | Show the names and ids of tourist attractions that are visited at most once. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) <= 1 Context: CREATE TABLE VISITS (Tourist_Attraction_ID VARCHAR)... |
SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = "660 Shea Crescent" OR T2.How_to_Get_There = "walk" | CREATE TABLE Tourist_Attractions (Name VARCHAR, Location_ID VARCHAR, How_to_Get_There VARCHAR); CREATE TABLE Locations (Location_ID VARCHAR, Address VARCHAR) | What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID = T2.Location_ID WHERE T1.Address = "660 Shea Crescent" OR T2.How_to_Get_There = "walk" Context: CREATE TABLE Tourist_Attractions (Name VARCHAR, Location_ID VARCHAR, How_to_Ge... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.