Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of the clients who do not have any booking? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What is the average quantities ordered with payment method code "MasterCard" on invoices? [/INST]

Output: SELECT avg(Order_Quantity) FROM Invoices WHERE payment_method_code  =  "MasterCard";


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Check the invoices record and compute the average quantities ordered with the payment method "MasterCard". [/INST]

Output: SELECT avg(Order_Quantity) FROM Invoices WHERE payment_method_code  =  "MasterCard";


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What is the product ID of the most frequently ordered item on invoices? [/INST]

Output: SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Find the id of the product ordered the most often on invoices. [/INST]

Output: SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: What is the description of the service type which offers both the photo product and the film product? [/INST]

Output: 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_Name  =  'film';


Input:
[INST] Here is a database schema:
Ref_Payment_Methods :
payment_method_code [ TEXT ] primary_key
payment_method_description [ TEXT ]

Ref_Service_Types :
Service_Type_Code [ TEXT ] primary_key
Parent_Service_Type_Code [ TEXT ]
Service_Type_Description [ TEXT ]

Addresses :
Address_ID [ TEXT ] primary_key
Line_1 [ TEXT ]
Line_2 [ TEXT ]
City_Town [ TEXT ]
State_County [ TEXT ]
Other_Details [ TEXT ]

Products :
Product_ID [ TEXT ] primary_key
Product_Name [ TEXT ]
Product_Price [ INT ]
Product_Description [ TEXT ]
Other_Product_Service_Details [ TEXT ]

Marketing_Regions :
Marketing_Region_Code [ TEXT ] primary_key
Marketing_Region_Name [ TEXT ]
Marketing_Region_Descriptrion [ TEXT ]
Other_Details [ TEXT ]

Clients :
Client_ID [ INT ] primary_key
Address_ID [ INT ] Clients.Address_ID = Addresses.Address_ID
Customer_Email_Address [ TEXT ]
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Other_Details [ TEXT ]

Drama_Workshop_Groups :
Workshop_Group_ID [ INT ] primary_key
Address_ID [ INT ] Drama_Workshop_Groups.Address_ID = Addresses.Address_ID
Currency_Code [ TEXT ]
Marketing_Region_Code [ TEXT ]
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Performers :
Performer_ID [ INT ] primary_key
Address_ID [ INT ] Performers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Customers :
Customer_ID [ TEXT ] primary_key
Address_ID [ INT ] Customers.Address_ID = Addresses.Address_ID
Customer_Name [ TEXT ]
Customer_Phone [ TEXT ]
Customer_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Stores :
Store_ID [ TEXT ] primary_key
Address_ID [ INT ] Stores.Address_ID = Addresses.Address_ID
Marketing_Region_Code [ TEXT ] Stores.Marketing_Region_Code = Marketing_Regions.Marketing_Region_Code
Store_Name [ TEXT ]
Store_Phone [ TEXT ]
Store_Email_Address [ TEXT ]
Other_Details [ TEXT ]

Bookings :
Booking_ID [ INT ] primary_key
Customer_ID [ INT ] Bookings.Customer_ID = Clients.Client_ID
Workshop_Group_ID [ TEXT ] Bookings.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Status_Code [ TEXT ]
Store_ID [ INT ]
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Performers_in_Bookings :
Order_ID [ INT ] primary_key Performers_in_Bookings.Order_ID = Bookings.Booking_ID
Performer_ID [ INT ] Performers_in_Bookings.Performer_ID = Performers.Performer_ID

Customer_Orders :
Order_ID [ INT ] primary_key
Customer_ID [ INT ] Customer_Orders.Customer_ID = Customers.Customer_ID
Store_ID [ INT ] Customer_Orders.Store_ID = Stores.Store_ID
Order_Date [ TEXT ]
Planned_Delivery_Date [ TEXT ]
Actual_Delivery_Date [ TEXT ]
Other_Order_Details [ TEXT ]

Order_Items :
Order_Item_ID [ INT ] primary_key
Order_ID [ INT ] Order_Items.Order_ID = Customer_Orders.Order_ID
Product_ID [ INT ] Order_Items.Product_ID = Products.Product_ID
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]

Invoices :
Invoice_ID [ INT ] primary_key
Order_ID [ INT ] Invoices.Order_ID = Customer_Orders.Order_ID
payment_method_code [ TEXT ] Invoices.payment_method_code = Ref_Payment_Methods.payment_method_code
Product_ID [ INT ]
Order_Quantity [ TEXT ]
Other_Item_Details [ TEXT ]
Order_Item_ID [ INT ]

Services :
Service_ID [ INT ] primary_key
Service_Type_Code [ TEXT ] Services.Service_Type_Code = Ref_Service_Types.Service_Type_Code
Workshop_Group_ID [ INT ] Services.Workshop_Group_ID = Drama_Workshop_Groups.Workshop_Group_ID
Product_Description [ TEXT ]
Product_Name [ TEXT ]
Product_Price [ INT ]
Other_Product_Service_Details [ TEXT ]

Bookings_Services :
Order_ID [ INT ] primary_key Bookings_Services.Order_ID = Bookings.Booking_ID
Product_ID [ INT ] Bookings_Services.Product_ID = Services.Service_ID

Invoice_Items :
Invoice_Item_ID [ INT ] primary_key
Invoice_ID [ INT ] Invoice_Items.Invoice_ID = Invoices.Invoice_ID
Order_ID [ INT ] Invoice_Items.Order_ID = Bookings_Services.Order_ID
Order_Item_ID [ INT ] Invoice_Items.Order_Item_ID = Order_Items.Order_Item_ID
Product_ID [ INT ] Invoice_Items.Product_ID = Bookings_Services.Product_ID
Order_Quantity [ INT ]
Other_Item_Details [ TEXT ]

Please write me a SQL statement that answers the following question: Give me the description of the service type that offers not only the photo product but also the film product. [/INST]

Output: 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_Name  =  'film';


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many bands are there? [/INST]

Output: SELECT count(*) FROM Band;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Find the number of bands. [/INST]

Output: SELECT count(*) FROM Band;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are all the labels? [/INST]

Output: SELECT DISTINCT label FROM Albums;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the different album labels listed? [/INST]

Output: SELECT DISTINCT label FROM Albums;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Find all the albums in 2012. [/INST]

Output: SELECT * FROM Albums WHERE YEAR  =  2012;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: return all columns of the albums created in the year of 2012. [/INST]

Output: SELECT * FROM Albums WHERE YEAR  =  2012;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Find all the stage positions of the musicians with first name "Solveig" [/INST]

Output: SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id WHERE Firstname  =  "Solveig";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the different stage positions for all musicians whose first name is "Solveig"? [/INST]

Output: SELECT DISTINCT T1.stageposition FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id WHERE Firstname  =  "Solveig";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many songs are there? [/INST]

Output: SELECT count(*) FROM Songs;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Count the number of songs. [/INST]

Output: SELECT count(*) FROM Songs;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Find all the songs performed by artist with last name "Heilo" [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of the songs by the artist whose last name is "Heilo"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Hom many musicians performed in the song "Flash"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many musicians play in the song "Flash"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Find all the songs produced by artists with first name "Marianne". [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of all songs produced by the artist with the first name "Marianne"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Who performed the song named "Badlands"? Show the first name and the last name. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the first and last names of the artist who perfomed the song "Badlands"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Who is performing in the back stage position for the song "Badlands"? Show the first name and the last name. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the first and last names of the performer who was in the back stage position for the song "Badlands"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many unique labels are there for albums? [/INST]

Output: SELECT count(DISTINCT label) FROM albums;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the unique labels for the albums? [/INST]

Output: SELECT count(DISTINCT label) FROM albums;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the label that has the most albums? [/INST]

Output: SELECT label FROM albums GROUP BY label ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the label with the most albums? [/INST]

Output: SELECT label FROM albums GROUP BY label ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the last name of the musician that have produced the most number of songs? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the last name of the musician who was in the most songs? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the last name of the musician that has been at the back position the most? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the last name of the musicians who has played back position the most? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Find all the songs whose name contains the word "the". [/INST]

Output: SELECT title FROM songs WHERE title LIKE '% the %';


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of the songs whose title has the word "the"? [/INST]

Output: SELECT title FROM songs WHERE title LIKE '% the %';


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are all the instruments used? [/INST]

Output: SELECT DISTINCT instrument FROM Instruments;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the different instruments listed in the database? [/INST]

Output: SELECT DISTINCT instrument FROM Instruments;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What instrument did the musician with last name "Heilo" use in the song "Le Pop"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What instruments did the musician with the last name "Heilo" play in the song "Le Pop"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the most used instrument? [/INST]

Output: SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What instrument is used the most? [/INST]

Output: SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many songs have used the instrument "drums"? [/INST]

Output: SELECT count(*) FROM instruments WHERE instrument  =  "drums";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many songs use drums as an instrument? [/INST]

Output: SELECT count(*) FROM instruments WHERE instrument  =  "drums";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What instruments does the the song "Le Pop" use? [/INST]

Output: SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Le Pop";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the instruments are used in the song "Le Pop"? [/INST]

Output: SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Le Pop";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many instruments does the song "Le Pop" use? [/INST]

Output: SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Le Pop";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many different instruments are used in the song "Le Pop"? [/INST]

Output: SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Le Pop";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many instrument does the musician with last name "Heilo" use? [/INST]

Output: SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid  =  T2.id WHERE T2.lastname  =  "Heilo";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many different instruments does the musician with the last name "Heilo" use? [/INST]

Output: SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid  =  T2.id WHERE T2.lastname  =  "Heilo";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Find all the instruments ever used by the musician with last name "Heilo"? [/INST]

Output: SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid  =  T2.id WHERE T2.lastname  =  "Heilo";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are all the instruments used by the musician with the last name "Heilo"? [/INST]

Output: SELECT instrument FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid  =  T2.id WHERE T2.lastname  =  "Heilo";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Which song has the most vocals? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the song with the most vocals? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Which vocal type is the most frequently appearring type? [/INST]

Output: SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the type of vocables that appears most frequently? [/INST]

Output: SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Which vocal type has the band mate with last name "Heilo" played the most? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What is the type of vocals that the band member with the last name "Heilo" played the most? [/INST]

Output: 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;


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the vocal types used in song "Le Pop"? [/INST]

Output: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Le Pop";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the types of vocals used in the song "Le Pop"? [/INST]

Output: SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Le Pop";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Find the number of vocal types used in song "Demon Kitty Rag"? [/INST]

Output: SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Demon Kitty Rag";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the types of vocals used in the song "Demon Kitty Rag"? [/INST]

Output: SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Demon Kitty Rag";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many songs have a lead vocal? [/INST]

Output: SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE TYPE  =  "lead";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: How many songs have vocals of type lead? [/INST]

Output: SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE TYPE  =  "lead";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Which vocal type did the musician with first name "Solveig" played in the song with title "A Bar in Amsterdam"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the types of vocals that the musician with the first name "Solveig" played in the song "A Bar in Amsterdam"? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Find all the songs that do not have a lead vocal. [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: What are the names of the songs without a lead vocal? [/INST]

Output: 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";


Input:
[INST] Here is a database schema:
Songs :
SongId [ INT ] primary_key
Title [ TEXT ]

Albums :
AId [ INT ] primary_key
Title [ TEXT ]
Year [ INT ]
Label [ TEXT ]
Type [ TEXT ]

Band :
Id [ INT ] primary_key
Firstname [ TEXT ]
Lastname [ TEXT ]

Instruments :
SongId [ INT ] primary_key Instruments.SongId = Songs.SongId
BandmateId [ INT ] Instruments.BandmateId = Band.Id
Instrument [ TEXT ]

Performance :
SongId [ INT ] primary_key Performance.SongId = Songs.SongId
Bandmate [ INT ] Performance.Bandmate = Band.Id
StagePosition [ TEXT ]

Tracklists :
AlbumId [ INT ] primary_key Tracklists.AlbumId = Albums.AId
Position [ INT ]
SongId [ INT ] Tracklists.SongId = Songs.SongId

Vocals :
SongId [ INT ] primary_key Vocals.SongId = Songs.SongId
Bandmate [ INT ] Vocals.Bandmate = Band.Id
Type [ TEXT ]

Please write me a SQL statement that answers the following question: Find all the vocal types. [/INST]

Output: SELECT DISTINCT TYPE FROM vocals;