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 order detail for the products with price above 2000. [/INST]

Output: SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID  =  T2.Product_ID WHERE T2.Product_price  >  2000;


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 actual delivery dates of orders with quantity 1? [/INST]

Output: SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID  =  T2.Order_ID WHERE T2.Order_Quantity  =  1;


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: List the actual delivery date for all the orders with quantity 1 [/INST]

Output: SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID  =  T2.Order_ID WHERE T2.Order_Quantity  =  1;


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 order dates of orders with price higher than 1000? [/INST]

Output: SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID  =  T2.Order_ID JOIN Products AS T3 ON T2.Product_ID  =  T3.Product_ID WHERE T3.Product_price  >  1000;


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 order dates of the orders with price above 1000. [/INST]

Output: SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID  =  T2.Order_ID JOIN Products AS T3 ON T2.Product_ID  =  T3.Product_ID WHERE T3.Product_price  >  1000;


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: How many distinct currency codes are there for all drama workshop groups? [/INST]

Output: SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups;


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 number of distinct currency codes used in drama workshop groups. [/INST]

Output: SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups;


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 drama workshop groups with address in Feliciaberg city? [/INST]

Output: SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T1.City_Town  =  "Feliciaberg";


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: Return the the names of the drama workshop groups that are located in Feliciaberg city. [/INST]

Output: SELECT T2.Store_Name FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T1.City_Town  =  "Feliciaberg";


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 email addresses of the drama workshop groups with address in Alaska state? [/INST]

Output: SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T1.State_County  =  "Alaska";


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: List the email addresses of the drama workshop groups located in Alaska state. [/INST]

Output: SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T1.State_County  =  "Alaska";


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: Show all cities along with the number of drama workshop groups in each city. [/INST]

Output: SELECT T1.City_Town ,  count(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID GROUP BY T1.City_Town;


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: How many drama workshop groups are there in each city? Return both the city and the count. [/INST]

Output: SELECT T1.City_Town ,  count(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID GROUP BY T1.City_Town;


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 marketing region code that has the most drama workshop groups? [/INST]

Output: SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code 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: Which marketing region has the most drama workshop groups? Give me the region code. [/INST]

Output: SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code 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: Show all cities where at least one customer lives in but no performer lives in. [/INST]

Output: SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID  =  T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID  =  T2.Address_ID;


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: Which cities have at least one customer but no performer? [/INST]

Output: SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID  =  T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID  =  T2.Address_ID;


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 most frequent status of bookings? [/INST]

Output: SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code 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: Which status code is the most common of all the bookings? [/INST]

Output: SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code 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 are the names of the workshop groups that have bookings with status code "stop"? [/INST]

Output: SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID  =  T2.Workshop_Group_ID WHERE T1.Status_Code  =  "stop";


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: Which workshop groups have bookings with status code "stop"? Give me the names. [/INST]

Output: SELECT T2.Store_Name FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID  =  T2.Workshop_Group_ID WHERE T1.Status_Code  =  "stop";


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: Show the names of all the clients with no 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;