answer stringlengths 18 557 | context stringlengths 27 489 | question stringlengths 12 244 | text stringlengths 275 1.7k |
|---|---|---|---|
SELECT Carrier FROM device WHERE Software_Platform <> 'Android' | CREATE TABLE device (Carrier VARCHAR, Software_Platform VARCHAR) | What are the carriers of devices whose software platforms are not "Android"? | <s>[INST] Given the following SQL query and context: Query: SELECT Carrier FROM device WHERE Software_Platform <> 'Android' Context: CREATE TABLE device (Carrier VARCHAR, Software_Platform VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the carriers of devices whose software pla... |
SELECT Shop_Name FROM shop ORDER BY Open_Year | CREATE TABLE shop (Shop_Name VARCHAR, Open_Year VARCHAR) | What are the names of shops in ascending order of open year? | <s>[INST] Given the following SQL query and context: Query: SELECT Shop_Name FROM shop ORDER BY Open_Year Context: CREATE TABLE shop (Shop_Name VARCHAR, Open_Year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names of shops in ascending order of open year? The answer to yo... |
SELECT AVG(Quantity) FROM stock | CREATE TABLE stock (Quantity INTEGER) | What is the average quantity of stocks? | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(Quantity) FROM stock Context: CREATE TABLE stock (Quantity INTEGER) [/INST] Based on the provided SQL query and context, your question is: What is the average quantity of stocks? The answer to your question is: SELECT AVG(Quantity) FROM stock. [/s> |
SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name | CREATE TABLE shop (Shop_Name VARCHAR, LOCATION VARCHAR) | What are the names and location of the shops in ascending alphabetical order of name. | <s>[INST] Given the following SQL query and context: Query: SELECT Shop_Name, LOCATION FROM shop ORDER BY Shop_Name Context: CREATE TABLE shop (Shop_Name VARCHAR, LOCATION VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the names and location of the shops in ascending alphabetic... |
SELECT COUNT(DISTINCT Software_Platform) FROM device | CREATE TABLE device (Software_Platform VARCHAR) | How many different software platforms are there for devices? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT Software_Platform) FROM device Context: CREATE TABLE device (Software_Platform VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many different software platforms are there for devices? The answer to your... |
SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = "Apple" | CREATE TABLE shop (Open_Date VARCHAR, Open_Year VARCHAR, Shop_Name VARCHAR) | List the open date of open year of the shop named "Apple". | <s>[INST] Given the following SQL query and context: Query: SELECT Open_Date, Open_Year FROM shop WHERE Shop_Name = "Apple" Context: CREATE TABLE shop (Open_Date VARCHAR, Open_Year VARCHAR, Shop_Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the open date of open year of the s... |
SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 | CREATE TABLE shop (Shop_Name VARCHAR, Open_Year VARCHAR) | List the name of the shop with the latest open year. | <s>[INST] Given the following SQL query and context: Query: SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1 Context: CREATE TABLE shop (Shop_Name VARCHAR, Open_Year VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the name of the shop with the latest open year. The answer ... |
SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID | CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Device_ID VARCHAR, Shop_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR) | Show names of shops and the carriers of devices they have in stock. | <s>[INST] Given the following SQL query and context: Query: SELECT T3.Shop_Name, T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID = T3.Shop_ID Context: CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Device_ID VARCHAR, Shop_ID VARCHAR... |
SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 | CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Shop_ID VARCHAR) | Show names of shops that have more than one kind of device in stock. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*) > 1 Context: CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Shop_ID VARCHAR) [/INST] Based on the provided SQL quer... |
SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Shop_ID VARCHAR) | Show the name of the shop that has the most kind of devices in stock. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Shop_ID VARCHAR) [/INST] Based on the provid... |
SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 | CREATE TABLE stock (Shop_ID VARCHAR, quantity INTEGER); CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR) | Show the name of the shop that have the largest quantity of devices in stock. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 Context: CREATE TABLE stock (Shop_ID VARCHAR, quantity INTEGER); CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR) [... |
SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform | CREATE TABLE device (Software_Platform VARCHAR) | Please show different software platforms and the corresponding number of devices using each. | <s>[INST] Given the following SQL query and context: Query: SELECT Software_Platform, COUNT(*) FROM device GROUP BY Software_Platform Context: CREATE TABLE device (Software_Platform VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Please show different software platforms and the correspon... |
SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC | CREATE TABLE device (Software_Platform VARCHAR) | Please show the software platforms of devices in descending order of the count. | <s>[INST] Given the following SQL query and context: Query: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC Context: CREATE TABLE device (Software_Platform VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Please show the software platforms of devices... |
SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE device (Software_Platform VARCHAR) | List the software platform shared by the greatest number of devices. | <s>[INST] Given the following SQL query and context: Query: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE device (Software_Platform VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the software platform shared by ... |
SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock) | CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Shop_Name VARCHAR, Shop_ID VARCHAR) | List the names of shops that have no devices in stock. | <s>[INST] Given the following SQL query and context: Query: SELECT Shop_Name FROM shop WHERE NOT Shop_ID IN (SELECT Shop_ID FROM stock) Context: CREATE TABLE shop (Shop_Name VARCHAR, Shop_ID VARCHAR); CREATE TABLE stock (Shop_Name VARCHAR, Shop_ID VARCHAR) [/INST] Based on the provided SQL query and context, your quest... |
SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008 | CREATE TABLE shop (LOCATION VARCHAR, Open_Year INTEGER) | Show the locations shared by shops with open year later than 2012 and shops with open year before 2008. | <s>[INST] Given the following SQL query and context: Query: SELECT LOCATION FROM shop WHERE Open_Year > 2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year < 2008 Context: CREATE TABLE shop (LOCATION VARCHAR, Open_Year INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the locatio... |
SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock) | CREATE TABLE stock (Carrier VARCHAR, Device_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR) | List the carriers of devices that have no devices in stock. | <s>[INST] Given the following SQL query and context: Query: SELECT Carrier FROM device WHERE NOT Device_ID IN (SELECT Device_ID FROM stock) Context: CREATE TABLE stock (Carrier VARCHAR, Device_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR) [/INST] Based on the provided SQL query and context, your... |
SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1 | CREATE TABLE stock (Device_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR) | Show the carriers of devices in stock at more than one shop. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID = T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*) > 1 Context: CREATE TABLE stock (Device_ID VARCHAR); CREATE TABLE device (Carrier VARCHAR, Device_ID VARCHAR) [/INST] Based on the provide... |
SELECT COUNT(*) FROM BOOKINGS | CREATE TABLE BOOKINGS (Id VARCHAR) | How many bookings do we have? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM BOOKINGS Context: CREATE TABLE BOOKINGS (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many bookings do we have? The answer to your question is: SELECT COUNT(*) FROM BOOKINGS. [/s> |
SELECT Order_Date FROM BOOKINGS | CREATE TABLE BOOKINGS (Order_Date VARCHAR) | List the order dates of all the bookings. | <s>[INST] Given the following SQL query and context: Query: SELECT Order_Date FROM BOOKINGS Context: CREATE TABLE BOOKINGS (Order_Date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: List the order dates of all the bookings. The answer to your question is: SELECT Order_Date FROM BOOKINGS... |
SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS | CREATE TABLE BOOKINGS (Planned_Delivery_Date VARCHAR, Actual_Delivery_Date VARCHAR) | Show all the planned delivery dates and actual delivery dates of bookings. | <s>[INST] Given the following SQL query and context: Query: SELECT Planned_Delivery_Date, Actual_Delivery_Date FROM BOOKINGS Context: CREATE TABLE BOOKINGS (Planned_Delivery_Date VARCHAR, Actual_Delivery_Date VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all the planned delivery d... |
SELECT COUNT(*) FROM CUSTOMERS | CREATE TABLE CUSTOMERS (Id VARCHAR) | How many customers do we have? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM CUSTOMERS Context: CREATE TABLE CUSTOMERS (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many customers do we have? The answer to your question is: SELECT COUNT(*) FROM CUSTOMERS. [/s> |
SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold" | CREATE TABLE CUSTOMERS (Customer_Phone VARCHAR, Customer_Email_Address VARCHAR, Customer_Name VARCHAR) | What are the phone and email for customer Harold? | <s>[INST] Given the following SQL query and context: Query: SELECT Customer_Phone, Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold" Context: CREATE TABLE CUSTOMERS (Customer_Phone VARCHAR, Customer_Email_Address VARCHAR, Customer_Name VARCHAR) [/INST] Based on the provided SQL query and context, you... |
SELECT Store_Name FROM Drama_Workshop_Groups | CREATE TABLE Drama_Workshop_Groups (Store_Name VARCHAR) | Show all the Store_Name of drama workshop groups. | <s>[INST] Given the following SQL query and context: Query: SELECT Store_Name FROM Drama_Workshop_Groups Context: CREATE TABLE Drama_Workshop_Groups (Store_Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all the Store_Name of drama workshop groups. The answer to your question i... |
SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES | CREATE TABLE INVOICES (Order_Quantity INTEGER) | Show the minimum, average, maximum order quantity of all invoices. | <s>[INST] Given the following SQL query and context: Query: SELECT MIN(Order_Quantity), AVG(Order_Quantity), MAX(Order_Quantity) FROM INVOICES Context: CREATE TABLE INVOICES (Order_Quantity INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show the minimum, average, maximum order quantity ... |
SELECT DISTINCT payment_method_code FROM INVOICES | CREATE TABLE INVOICES (payment_method_code VARCHAR) | What are the distinct payment method codes in all the invoices? | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT payment_method_code FROM INVOICES Context: CREATE TABLE INVOICES (payment_method_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the distinct payment method codes in all the invoices? The answer to ... |
SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = "China" | CREATE TABLE Marketing_Regions (Marketing_Region_Descriptrion VARCHAR, Marketing_Region_Name VARCHAR) | What is the description of the marketing region China? | <s>[INST] Given the following SQL query and context: Query: SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = "China" Context: CREATE TABLE Marketing_Regions (Marketing_Region_Descriptrion VARCHAR, Marketing_Region_Name VARCHAR) [/INST] Based on the provided SQL query and context... |
SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS) | CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price INTEGER) | Show all the distinct product names with price higher than the average. | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT AVG(Product_Price) FROM PRODUCTS) Context: CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price INTEGER) [/INST] Based on the provided SQL query and context, your question is: Show ... |
SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1 | CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price VARCHAR) | What is the name of the most expensive product? | <s>[INST] Given the following SQL query and context: Query: SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1 Context: CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the name of the most expensive pro... |
SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = "Ashley" | CREATE TABLE PERFORMERS (Customer_Phone VARCHAR, Customer_Name VARCHAR) | What is the phone number of the performer Ashley? | <s>[INST] Given the following SQL query and context: Query: SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = "Ashley" Context: CREATE TABLE PERFORMERS (Customer_Phone VARCHAR, Customer_Name VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the phone number of the perform... |
SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code | CREATE TABLE INVOICES (payment_method_code VARCHAR) | Show all payment method codes and the number of orders for each code. | <s>[INST] Given the following SQL query and context: Query: SELECT payment_method_code, COUNT(*) FROM INVOICES GROUP BY payment_method_code Context: CREATE TABLE INVOICES (payment_method_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Show all payment method codes and the number of ... |
SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE INVOICES (payment_method_code VARCHAR) | What is the payment method code used by the most orders? | <s>[INST] Given the following SQL query and context: Query: SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE INVOICES (payment_method_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the payment method ... |
SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = "FJA Filming" | CREATE TABLE Addresses (City_Town VARCHAR, Address_ID VARCHAR); CREATE TABLE Stores (Address_ID VARCHAR, Store_Name VARCHAR) | Which city is the address of the store named "FJA Filming" located in? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Store_Name = "FJA Filming" Context: CREATE TABLE Addresses (City_Town VARCHAR, Address_ID VARCHAR); CREATE TABLE Stores (Address_ID VARCHAR, Store_Name VARCHAR... |
SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = "CA" | CREATE TABLE Addresses (State_County VARCHAR, Address_ID VARCHAR); CREATE TABLE Stores (Address_ID VARCHAR, Marketing_Region_Code VARCHAR) | What are the states or counties of the address of the stores with marketing region code "CA"? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID = T2.Address_ID WHERE T2.Marketing_Region_Code = "CA" Context: CREATE TABLE Addresses (State_County VARCHAR, Address_ID VARCHAR); CREATE TABLE Stores (Address_ID VARCHAR, Marketing_... |
SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = "Rob Dinning" | CREATE TABLE Marketing_Regions (Marketing_Region_Name VARCHAR, Marketing_Region_Code VARCHAR); CREATE TABLE Stores (Marketing_Region_Code VARCHAR, Store_Name VARCHAR) | What is the name of the marketing region that the store Rob Dinning belongs to? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code = T2.Marketing_Region_Code WHERE T2.Store_Name = "Rob Dinning" Context: CREATE TABLE Marketing_Regions (Marketing_Region_Name VARCHAR, Marketing_Region_C... |
SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 | CREATE TABLE Services (Service_Type_Code VARCHAR, Product_Price INTEGER); CREATE TABLE Ref_Service_Types (Service_Type_Description VARCHAR, Service_Type_Code VARCHAR) | What are the descriptions of the service types with product price above 100? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 Context: CREATE TABLE Services (Service_Type_Code VARCHAR, Product_Price INTEGER); CREATE TABLE Ref_... |
SELECT T1.Service_Type_Description, T2.Service_Type_Code, COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code | CREATE TABLE Services (Service_Type_Code VARCHAR); CREATE TABLE Ref_Service_Types (Service_Type_Description VARCHAR, Service_Type_Code VARCHAR) | What is the description, code and the corresponding count of each service type? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Service_Type_Description, T2.Service_Type_Code, COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T2.Service_Type_Code Context: CREATE TABLE Services (Service_Type_Code VARCHAR); CREATE ... |
SELECT T1.Service_Type_Description, T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Services (Service_Type_Code VARCHAR); CREATE TABLE Ref_Service_Types (Service_Type_Description VARCHAR, Service_Type_Code VARCHAR) | What is the description and code of the type of service that is performed the most often? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Service_Type_Description, T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Services (Service_Type_C... |
SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID | CREATE TABLE Services (Workshop_Group_ID VARCHAR); CREATE TABLE Drama_Workshop_Groups (Store_Phone VARCHAR, Store_Email_Address VARCHAR, Workshop_Group_ID VARCHAR) | What are the phones and emails of workshop groups in which services are performed? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID Context: CREATE TABLE Services (Workshop_Group_ID VARCHAR); CREATE TABLE Drama_Workshop_Groups (Store_Phone VARCHA... |
SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = "film" | CREATE TABLE Services (Workshop_Group_ID VARCHAR, Product_Name VARCHAR); CREATE TABLE Drama_Workshop_Groups (Store_Phone VARCHAR, Store_Email_Address VARCHAR, Workshop_Group_ID VARCHAR) | What are the names of workshop groups in which services with product name "film" are performed? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Store_Phone, T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T2.Product_Name = "film" Context: CREATE TABLE Services (Workshop_Group_ID VARCHAR, Product_Name VARCHAR); C... |
SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name | CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price INTEGER) | What are the different product names? What is the average product price for each of them? | <s>[INST] Given the following SQL query and context: Query: SELECT Product_Name, AVG(Product_Price) FROM PRODUCTS GROUP BY Product_Name Context: CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the different product names... |
SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000 | CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price INTEGER) | What are the product names with average product price smaller than 1000000? | <s>[INST] Given the following SQL query and context: Query: SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING AVG(Product_Price) < 1000000 Context: CREATE TABLE PRODUCTS (Product_Name VARCHAR, Product_Price INTEGER) [/INST] Based on the provided SQL query and context, your question is: What are the product... |
SELECT SUM(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = "photo" | CREATE TABLE ORDER_ITEMS (Order_Quantity INTEGER, Product_ID VARCHAR); CREATE TABLE Products (Product_ID VARCHAR, Product_Name VARCHAR) | What are the total order quantities of photo products? | <s>[INST] Given the following SQL query and context: Query: SELECT SUM(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_Name = "photo" Context: CREATE TABLE ORDER_ITEMS (Order_Quantity INTEGER, Product_ID VARCHAR); CREATE TABLE Products (Product_ID VARCHAR,... |
SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000 | CREATE TABLE Products (Product_ID VARCHAR, Product_price INTEGER); CREATE TABLE ORDER_ITEMS (Other_Item_Details VARCHAR, Product_ID VARCHAR) | What are the order details of the products with price higher than 2000? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID = T2.Product_ID WHERE T2.Product_price > 2000 Context: CREATE TABLE Products (Product_ID VARCHAR, Product_price INTEGER); CREATE TABLE ORDER_ITEMS (Other_Item_Details VARC... |
SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1 | CREATE TABLE Customer_Orders (Actual_Delivery_Date VARCHAR, Order_ID VARCHAR); CREATE TABLE ORDER_ITEMS (Order_ID VARCHAR, Order_Quantity VARCHAR) | What are the actual delivery dates of orders with quantity 1? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID WHERE T2.Order_Quantity = 1 Context: CREATE TABLE Customer_Orders (Actual_Delivery_Date VARCHAR, Order_ID VARCHAR); CREATE TABLE ORDER_ITEMS (Order_ID... |
SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000 | CREATE TABLE Products (Product_ID VARCHAR, Product_price INTEGER); CREATE TABLE ORDER_ITEMS (Order_ID VARCHAR, Product_ID VARCHAR); CREATE TABLE Customer_Orders (Order_Date VARCHAR, Order_ID VARCHAR) | What are the order dates of orders with price higher than 1000? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID = T2.Order_ID JOIN Products AS T3 ON T2.Product_ID = T3.Product_ID WHERE T3.Product_price > 1000 Context: CREATE TABLE Products (Product_ID VARCHAR, Product_price INTEGER); C... |
SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups | CREATE TABLE Drama_Workshop_Groups (Currency_Code VARCHAR) | How many distinct currency codes are there for all drama workshop groups? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT Currency_Code) FROM Drama_Workshop_Groups Context: CREATE TABLE Drama_Workshop_Groups (Currency_Code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many distinct currency codes are there for all drama ... |
SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = "Feliciaberg" | CREATE TABLE Addresses (Address_ID VARCHAR, City_Town VARCHAR); CREATE TABLE Drama_Workshop_Groups (Store_Name VARCHAR, Address_ID VARCHAR) | What are the names of the drama workshop groups with address in Feliciaberg city? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.City_Town = "Feliciaberg" Context: CREATE TABLE Addresses (Address_ID VARCHAR, City_Town VARCHAR); CREATE TABLE Drama_Workshop_Groups (Store_Na... |
SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = "Alaska" | CREATE TABLE Drama_Workshop_Groups (Store_Email_Address VARCHAR, Address_ID VARCHAR); CREATE TABLE Addresses (Address_ID VARCHAR, State_County VARCHAR) | What are the email addresses of the drama workshop groups with address in Alaska state? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID WHERE T1.State_County = "Alaska" Context: CREATE TABLE Drama_Workshop_Groups (Store_Email_Address VARCHAR, Address_ID VARCHAR); CREATE TABLE Ad... |
SELECT T1.City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town | CREATE TABLE Addresses (City_Town VARCHAR, Address_ID VARCHAR); CREATE TABLE Drama_Workshop_Groups (Address_ID VARCHAR) | Show all cities along with the number of drama workshop groups in each city. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town Context: CREATE TABLE Addresses (City_Town VARCHAR, Address_ID VARCHAR); CREATE TABLE Drama_Workshop_Groups (Address_ID V... |
SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Drama_Workshop_Groups (Marketing_Region_Code VARCHAR) | What is the marketing region code that has the most drama workshop groups? | <s>[INST] Given the following SQL query and context: Query: SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Drama_Workshop_Groups (Marketing_Region_Code VARCHAR) [/INST] Based on the provided SQL query and context, your question... |
SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID | CREATE TABLE Customers (Address_ID VARCHAR); CREATE TABLE Addresses (City_Town VARCHAR, Address_ID VARCHAR); CREATE TABLE Performers (Address_ID VARCHAR) | Show all cities where at least one customer lives in but no performer lives in. | <s>[INST] Given the following SQL query and context: Query: SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID = T2.Address_ID Context: CREATE TABLE Customers (Address_ID VARCHAR); CREATE T... |
SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE BOOKINGS (Status_Code VARCHAR) | What is the most frequent status of bookings? | <s>[INST] Given the following SQL query and context: Query: SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE BOOKINGS (Status_Code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the most frequent status of bookings? The a... |
SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = "stop" | CREATE TABLE Bookings (Workshop_Group_ID VARCHAR, Status_Code VARCHAR); CREATE TABLE Drama_Workshop_Groups (Store_Name VARCHAR, Workshop_Group_ID VARCHAR) | What are the names of the workshop groups that have bookings with status code "stop"? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = "stop" Context: CREATE TABLE Bookings (Workshop_Group_ID VARCHAR, Status_Code VARCHAR); CREATE TABLE Drama_Workshop_... |
SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID | CREATE TABLE Clients (Customer_Name VARCHAR, Client_ID VARCHAR); CREATE TABLE Bookings (Customer_ID VARCHAR); CREATE TABLE Clients (Customer_Name VARCHAR) | Show the names of all the clients with no booking. | <s>[INST] Given the following SQL query and context: Query: SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID = T2.Client_ID Context: CREATE TABLE Clients (Customer_Name VARCHAR, Client_ID VARCHAR); CREATE TABLE Bookings (Customer_ID VARCHAR); CREA... |
SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = "MasterCard" | CREATE TABLE Invoices (Order_Quantity INTEGER, payment_method_code VARCHAR) | What is the average quantities ordered with payment method code "MasterCard" on invoices? | <s>[INST] Given the following SQL query and context: Query: SELECT AVG(Order_Quantity) FROM Invoices WHERE payment_method_code = "MasterCard" Context: CREATE TABLE Invoices (Order_Quantity INTEGER, payment_method_code VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the average qu... |
SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE INVOICES (Product_ID VARCHAR) | What is the product ID of the most frequently ordered item on invoices? | <s>[INST] Given the following SQL query and context: Query: SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE INVOICES (Product_ID VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the product ID of the most frequently ordered ... |
SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product... | CREATE TABLE Ref_Service_Types (Service_Type_Description VARCHAR, Service_Type_Code VARCHAR); CREATE TABLE Services (Service_Type_Code VARCHAR, Product_Name VARCHAR) | What is the description of the service type which offers both the photo product and the film product? | <s>[INST] Given the following SQL query and context: Query: SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Name = 'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON ... |
SELECT COUNT(*) FROM Band | CREATE TABLE Band (Id VARCHAR) | How many bands are there? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Band Context: CREATE TABLE Band (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many bands are there? The answer to your question is: SELECT COUNT(*) FROM Band. [/s> |
SELECT DISTINCT label FROM Albums | CREATE TABLE Albums (label VARCHAR) | What are all the labels? | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT label FROM Albums Context: CREATE TABLE Albums (label VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are all the labels? The answer to your question is: SELECT DISTINCT label FROM Albums. [/s> |
SELECT * FROM Albums WHERE YEAR = 2012 | CREATE TABLE Albums (YEAR VARCHAR) | Find all the albums in 2012. | <s>[INST] Given the following SQL query and context: Query: SELECT * FROM Albums WHERE YEAR = 2012 Context: CREATE TABLE Albums (YEAR VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find all the albums in 2012. The answer to your question is: SELECT * FROM Albums WHERE YEAR = 2012. [/s> |
SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = "Solveig" | CREATE TABLE Band (id VARCHAR); CREATE TABLE Performance (stageposition VARCHAR, bandmate VARCHAR) | Find all the stage positions of the musicians with first name "Solveig" | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE Firstname = "Solveig" Context: CREATE TABLE Band (id VARCHAR); CREATE TABLE Performance (stageposition VARCHAR, bandmate VARCHAR) [/INST] Based on the provided... |
SELECT COUNT(*) FROM Songs | CREATE TABLE Songs (Id VARCHAR) | How many songs are there? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM Songs Context: CREATE TABLE Songs (Id VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many songs are there? The answer to your question is: SELECT COUNT(*) FROM Songs. [/s> |
SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = "Heilo" | CREATE TABLE Songs (Title VARCHAR, SongId VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR); CREATE TABLE Band (id VARCHAR, Lastname VARCHAR) | Find all the songs performed by artist with last name "Heilo" | <s>[INST] Given the following SQL query and context: Query: SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.Lastname = "Heilo" Context: CREATE TABLE Songs (Title VARCHAR, SongId VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId ... |
SELECT COUNT(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = "Flash" | CREATE TABLE performance (bandmate VARCHAR, songid VARCHAR); CREATE TABLE songs (songid VARCHAR, Title VARCHAR); CREATE TABLE band (id VARCHAR) | Hom many musicians performed in the song "Flash"? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.Title = "Flash" Context: CREATE TABLE performance (bandmate VARCHAR, songid VARCHAR); CREATE TABLE songs (songid VARCHAR, Title VAR... |
SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = "Marianne" | CREATE TABLE Songs (Title VARCHAR, SongId VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR); CREATE TABLE Band (id VARCHAR, firstname VARCHAR) | Find all the songs produced by artists with first name "Marianne". | <s>[INST] Given the following SQL query and context: Query: SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T2.firstname = "Marianne" Context: CREATE TABLE Songs (Title VARCHAR, SongId VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, Son... |
SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Badlands" | CREATE TABLE Band (firstname VARCHAR, lastname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR); CREATE TABLE Songs (SongId VARCHAR, Title VARCHAR) | Who performed the song named "Badlands"? Show the first name and the last name. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Badlands" Context: CREATE TABLE Band (firstname VARCHAR, lastname VARCHAR, id VARCHAR); CREATE TABLE Perf... |
SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Badlands" AND T1.StagePosition = "back" | CREATE TABLE Band (firstname VARCHAR, lastname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR, StagePosition VARCHAR); CREATE TABLE Songs (SongId VARCHAR, Title VARCHAR) | Who is performing in the back stage position for the song "Badlands"? Show the first name and the last name. | <s>[INST] Given the following SQL query and context: Query: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Badlands" AND T1.StagePosition = "back" Context: CREATE TABLE Band (firstname VARCHAR, lastname VARCHAR, ... |
SELECT COUNT(DISTINCT label) FROM albums | CREATE TABLE albums (label VARCHAR) | How many unique labels are there for albums? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT label) FROM albums Context: CREATE TABLE albums (label VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many unique labels are there for albums? The answer to your question is: SELECT COUNT(DISTINCT labe... |
SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE albums (label VARCHAR) | What is the label that has the most albums? | <s>[INST] Given the following SQL query and context: Query: SELECT label FROM albums GROUP BY label ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE albums (label VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the label that has the most albums? The answer to your question i... |
SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Songs (SongId VARCHAR); CREATE TABLE Band (lastname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR) | What is the last name of the musician that have produced the most number of songs? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Songs (SongId VARCHAR); CREATE TABLE Band (lastname VARCHAR, id VA... |
SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = "back" GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE Band (lastname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR) | What is the last name of the musician that has been at the back position the most? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id WHERE stageposition = "back" GROUP BY lastname ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE Band (lastname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR... |
SELECT title FROM songs WHERE title LIKE '% the %' | CREATE TABLE songs (title VARCHAR) | Find all the songs whose name contains the word "the". | <s>[INST] Given the following SQL query and context: Query: SELECT title FROM songs WHERE title LIKE '% the %' Context: CREATE TABLE songs (title VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find all the songs whose name contains the word "the". The answer to your question is: SELECT ... |
SELECT DISTINCT instrument FROM Instruments | CREATE TABLE Instruments (instrument VARCHAR) | What are all the instruments used? | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT instrument FROM Instruments Context: CREATE TABLE Instruments (instrument VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are all the instruments used? The answer to your question is: SELECT DISTINCT instrum... |
SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = "Heilo" AND T3.title = "Le Pop" | CREATE TABLE Songs (SongId VARCHAR, songid VARCHAR, title VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR); CREATE TABLE Band (id VARCHAR, lastname VARCHAR); CREATE TABLE Instruments (instrument VARCHAR, songid VARCHAR, bandmateid VARCHAR) | What instrument did the musician with last name "Heilo" use in the song "Le Pop"? | <s>[INST] Given the following SQL query and context: Query: SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = "Heilo" AND T3.title = "Le Pop" Context: ... |
SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE instruments (instrument VARCHAR) | What is the most used instrument? | <s>[INST] Given the following SQL query and context: Query: SELECT instrument FROM instruments GROUP BY instrument ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE instruments (instrument VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What is the most used instrument? The answer to ... |
SELECT COUNT(*) FROM instruments WHERE instrument = "drums" | CREATE TABLE instruments (instrument VARCHAR) | How many songs have used the instrument "drums"? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM instruments WHERE instrument = "drums" Context: CREATE TABLE instruments (instrument VARCHAR) [/INST] Based on the provided SQL query and context, your question is: How many songs have used the instrument "drums"? The answer to your questi... |
SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" | CREATE TABLE instruments (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) | What instruments does the the song "Le Pop" use? | <s>[INST] Given the following SQL query and context: Query: SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" Context: CREATE TABLE instruments (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) [/INST] Based on the provided SQL query and context, your question... |
SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" | CREATE TABLE instruments (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) | How many instruments does the song "Le Pop" use? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" Context: CREATE TABLE instruments (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) [/INST] Based on the provided SQL query and contex... |
SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" | CREATE TABLE instruments (bandmateid VARCHAR); CREATE TABLE Band (id VARCHAR, lastname VARCHAR) | How many instrument does the musician with last name "Heilo" use? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" Context: CREATE TABLE instruments (bandmateid VARCHAR); CREATE TABLE Band (id VARCHAR, lastname VARCHAR) [/INST] Based on the provided... |
SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" | CREATE TABLE instruments (bandmateid VARCHAR); CREATE TABLE Band (id VARCHAR, lastname VARCHAR) | Find all the instruments ever used by the musician with last name "Heilo"? | <s>[INST] Given the following SQL query and context: Query: SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid = T2.id WHERE T2.lastname = "Heilo" Context: CREATE TABLE instruments (bandmateid VARCHAR); CREATE TABLE Band (id VARCHAR, lastname VARCHAR) [/INST] Based on the provided SQL query and c... |
SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) | Which song has the most vocals? | <s>[INST] Given the following SQL query and context: Query: SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid GROUP BY T1.songid ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) [/INST] Based on the provided SQL query and context, y... |
SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE vocals (TYPE VARCHAR) | Which vocal type is the most frequently appearring type? | <s>[INST] Given the following SQL query and context: Query: SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE vocals (TYPE VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Which vocal type is the most frequently appearring type? The answer to your ... |
SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = "Heilo" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE vocals (bandmate VARCHAR); CREATE TABLE band (id VARCHAR) | Which vocal type has the band mate with last name "Heilo" played the most? | <s>[INST] Given the following SQL query and context: Query: SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE lastname = "Heilo" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE vocals (bandmate VARCHAR); CREATE TABLE band (id VARCHAR) [/INST] Based on the provided SQL query a... |
SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" | CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) | What are the vocal types used in song "Le Pop"? | <s>[INST] Given the following SQL query and context: Query: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" Context: CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are th... |
SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Demon Kitty Rag" | CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) | Find the number of vocal types used in song "Demon Kitty Rag"? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Demon Kitty Rag" Context: CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) [/INST] Based on the provided SQL query and context, your question is... |
SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "lead" | CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) | How many songs have a lead vocal? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "lead" Context: CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) [/INST] Based on the provided SQL query and context, your question i... |
SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = "Solveig" AND T2.title = "A Bar In Amsterdam" | CREATE TABLE vocals (songid VARCHAR, bandmate VARCHAR); CREATE TABLE band (id VARCHAR, firstname VARCHAR); CREATE TABLE songs (songid VARCHAR, title VARCHAR) | Which vocal type did the musician with first name "Solveig" played in the song with title "A Bar in Amsterdam"? | <s>[INST] Given the following SQL query and context: Query: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.firstname = "Solveig" AND T2.title = "A Bar In Amsterdam" Context: CREATE TABLE vocals (songid VARCHAR, bandmate VARCHAR); CREATE TABLE band... |
SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = "lead" | CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE vocals (songid VARCHAR) | Find all the songs that do not have a lead vocal. | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = "lead" Context: CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE v... |
SELECT DISTINCT TYPE FROM vocals | CREATE TABLE vocals (TYPE VARCHAR) | Find all the vocal types. | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT TYPE FROM vocals Context: CREATE TABLE vocals (TYPE VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find all the vocal types. The answer to your question is: SELECT DISTINCT TYPE FROM vocals. [/s> |
SELECT * FROM Albums WHERE YEAR = 2010 | CREATE TABLE Albums (YEAR VARCHAR) | What are the albums produced in year 2010? | <s>[INST] Given the following SQL query and context: Query: SELECT * FROM Albums WHERE YEAR = 2010 Context: CREATE TABLE Albums (YEAR VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are the albums produced in year 2010? The answer to your question is: SELECT * FROM Albums WHERE YEAR... |
SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Le Pop" | CREATE TABLE Band (firstname VARCHAR, lastname VARCHAR, id VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR); CREATE TABLE Songs (SongId VARCHAR, Title VARCHAR) | Who performed the song named "Le Pop"? | <s>[INST] Given the following SQL query and context: Query: SELECT T2.firstname, T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId WHERE T3.Title = "Le Pop" Context: CREATE TABLE Band (firstname VARCHAR, lastname VARCHAR, id VARCHAR); CREATE TABLE Perfor... |
SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = "Heilo" AND T3.title = "Badlands" | CREATE TABLE Songs (SongId VARCHAR, songid VARCHAR, title VARCHAR); CREATE TABLE Performance (bandmate VARCHAR, SongId VARCHAR); CREATE TABLE Band (id VARCHAR, lastname VARCHAR); CREATE TABLE Instruments (instrument VARCHAR, songid VARCHAR, bandmateid VARCHAR) | What instrument did the musician with last name "Heilo" use in the song "Badlands"? | <s>[INST] Given the following SQL query and context: Query: SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate = T2.id JOIN Songs AS T3 ON T3.SongId = T1.SongId JOIN Instruments AS T4 ON T4.songid = T3.songid AND T4.bandmateid = T2.id WHERE T2.lastname = "Heilo" AND T3.title = "Badlands" Context... |
SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Badlands" | CREATE TABLE instruments (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) | How many instruments does the song "Badlands" use? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Badlands" Context: CREATE TABLE instruments (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) [/INST] Based on the provided SQL query and cont... |
SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Badlands" | CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) | What are the vocal types used in song "Badlands"? | <s>[INST] Given the following SQL query and context: Query: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Badlands" Context: CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) [/INST] Based on the provided SQL query and context, your question is: What are ... |
SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" | CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) | Find the number of vocal types used in song "Le Pop" | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Le Pop" Context: CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) [/INST] Based on the provided SQL query and context, your question is: Find th... |
SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "shared" | CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) | How many songs have a shared vocal? | <s>[INST] Given the following SQL query and context: Query: SELECT COUNT(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE TYPE = "shared" Context: CREATE TABLE vocals (songid VARCHAR); CREATE TABLE songs (songid VARCHAR) [/INST] Based on the provided SQL query and context, your question... |
SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = "back" | CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE vocals (songid VARCHAR) | Find all the songs that do not have a back vocal. | <s>[INST] Given the following SQL query and context: Query: SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE TYPE = "back" Context: CREATE TABLE songs (title VARCHAR, songid VARCHAR); CREATE TABLE v... |
SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Solveig" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | CREATE TABLE vocals (bandmate VARCHAR); CREATE TABLE band (id VARCHAR) | Which vocal type has the band mate with first name "Solveig" played the most? | <s>[INST] Given the following SQL query and context: Query: SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Solveig" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 Context: CREATE TABLE vocals (bandmate VARCHAR); CREATE TABLE band (id VARCHAR) [/INST] Based on the provided SQL quer... |
SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = "Heilo" AND T2.title = "Der Kapitan" | CREATE TABLE band (id VARCHAR, lastname VARCHAR); CREATE TABLE vocals (songid VARCHAR, bandmate VARCHAR); CREATE TABLE songs (songid VARCHAR, title VARCHAR) | Which vocal type did the musician with last name "Heilo" played in the song with title "Der Kapitan"? | <s>[INST] Given the following SQL query and context: Query: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid JOIN band AS T3 ON T1.bandmate = T3.id WHERE T3.lastname = "Heilo" AND T2.title = "Der Kapitan" Context: CREATE TABLE band (id VARCHAR, lastname VARCHAR); CREATE TABLE vocals (songid VARCH... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.