target-benchmark/spider-queries huggingface dataset:
Database: device (tables: stock, shop, device)
Question: What are the names of device shops, and what are the carriers that they carry devices in stock for?
SQL: SELECT T3.Shop_Name ,  T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID  =  T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID  =  T3.Shop_ID
Database: device (tables: stock, shop)
Question: Show names of shops that have more than one kind of device in stock.
SQL: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID  =  T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*)  >  1
Database: device (tables: stock, shop)
Question: What are the names of shops that have more than a single kind of device in stock?
SQL: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID  =  T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*)  >  1
Database: device (tables: stock, shop)
Question: Show the name of the shop that has the most kind of devices in stock.
SQL: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID  =  T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1
Database: device (tables: stock, shop)
Question: What is the name of the shop that has the most different kinds of devices in stock?
SQL: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID  =  T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1
Database: device (tables: stock, shop)
Question: Show the name of the shop that have the largest quantity of devices in stock.
SQL: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID  =  T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1
Database: device (tables: stock, shop)
Question: What is the name of the shop that has the greatest quantity of devices in stock?
SQL: SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID  =  T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1
Database: device (tables: device)
Question: Please show different software platforms and the corresponding number of devices using each.
SQL: SELECT Software_Platform ,  COUNT(*) FROM device GROUP BY Software_Platform
Database: device (tables: device)
Question: What are the different software platforms for devices, and how many devices have each?
SQL: SELECT Software_Platform ,  COUNT(*) FROM device GROUP BY Software_Platform
Database: device (tables: device)
Question: Please show the software platforms of devices in descending order of the count.
SQL: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC
Database: device (tables: device)
Question: What are the different software platforms for devices, ordered by frequency descending?
SQL: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC
Database: device (tables: device)
Question: List the software platform shared by the greatest number of devices.
SQL: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1
Database: device (tables: device)
Question: What is the software platform that is most common amongst all devices?
SQL: SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1
Database: device (tables: stock, shop)
Question: List the names of shops that have no devices in stock.
SQL: SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)
Database: device (tables: stock, shop)
Question: What are the names of shops that do not have any devices in stock?
SQL: SELECT Shop_Name FROM shop WHERE Shop_ID NOT IN (SELECT Shop_ID FROM stock)
Database: device (tables: shop)
Question: Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.
SQL: SELECT LOCATION FROM shop WHERE Open_Year  >  2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year  <  2008
Database: device (tables: shop)
Question: Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?
SQL: SELECT LOCATION FROM shop WHERE Open_Year  >  2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year  <  2008
Database: device (tables: stock, device)
Question: List the carriers of devices that have no devices in stock.
SQL: SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)
Database: device (tables: stock, device)
Question: What are the carriers of devices that are not in stock anywhere?
SQL: SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)
Database: device (tables: stock, device)
Question: Show the carriers of devices in stock at more than one shop.
SQL: SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID  =  T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*)  >  1
Database: device (tables: stock, device)
Question: What are the carriers of devices that are in stock in more than a single shop?
SQL: SELECT T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID  =  T2.Device_ID GROUP BY T1.Device_ID HAVING COUNT(*)  >  1
Database: cre_Drama_Workshop_Groups (tables: bookings)
Question: How many bookings do we have?
SQL: SELECT count(*) FROM BOOKINGS
Database: cre_Drama_Workshop_Groups (tables: bookings)
Question: Count the total number of bookings made.
SQL: SELECT count(*) FROM BOOKINGS
Database: cre_Drama_Workshop_Groups (tables: bookings)
Question: List the order dates of all the bookings.
SQL: SELECT Order_Date FROM BOOKINGS
Database: cre_Drama_Workshop_Groups (tables: bookings)
Question: What is the order date of each booking?
SQL: SELECT Order_Date FROM BOOKINGS
Database: cre_Drama_Workshop_Groups (tables: bookings)
Question: Show all the planned delivery dates and actual delivery dates of bookings.
SQL: SELECT Planned_Delivery_Date ,  Actual_Delivery_Date FROM BOOKINGS
Database: cre_Drama_Workshop_Groups (tables: bookings)
Question: What are the planned delivery date and actual delivery date for each booking?
SQL: SELECT Planned_Delivery_Date ,  Actual_Delivery_Date FROM BOOKINGS
Database: cre_Drama_Workshop_Groups (tables: customers)
Question: How many customers do we have?
SQL: SELECT count(*) FROM CUSTOMERS
Database: cre_Drama_Workshop_Groups (tables: customers)
Question: Count the number of customers recorded.
SQL: SELECT count(*) FROM CUSTOMERS
Database: cre_Drama_Workshop_Groups (tables: customers)
Question: What are the phone and email for customer Harold?
SQL: SELECT Customer_Phone ,  Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name  =  "Harold"
Database: cre_Drama_Workshop_Groups (tables: customers)
Question: Find the phone number and email address of customer "Harold".
SQL: SELECT Customer_Phone ,  Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name  =  "Harold"
Database: cre_Drama_Workshop_Groups (tables: drama_workshop_groups)
Question: Show all the Store_Name of drama workshop groups.
SQL: SELECT Store_Name FROM Drama_Workshop_Groups
Database: cre_Drama_Workshop_Groups (tables: drama_workshop_groups)
Question: What are the store names of drama workshop groups?
SQL: SELECT Store_Name FROM Drama_Workshop_Groups
Database: cre_Drama_Workshop_Groups (tables: invoices)
Question: Show the minimum, average, maximum order quantity of all invoices.
SQL: SELECT min(Order_Quantity) ,  avg(Order_Quantity) ,  max(Order_Quantity) FROM INVOICES
Database: cre_Drama_Workshop_Groups (tables: invoices)
Question: What are the minimum, average, and maximum quantities ordered? Check all the invoices.
SQL: SELECT min(Order_Quantity) ,  avg(Order_Quantity) ,  max(Order_Quantity) FROM INVOICES
Database: cre_Drama_Workshop_Groups (tables: invoices)
Question: What are the distinct payment method codes in all the invoices?
SQL: SELECT DISTINCT payment_method_code FROM INVOICES
Database: cre_Drama_Workshop_Groups (tables: invoices)
Question: Show me the distinct payment method codes from the invoice record.
SQL: SELECT DISTINCT payment_method_code FROM INVOICES
Database: cre_Drama_Workshop_Groups (tables: marketing_regions)
Question: What is the description of the marketing region China?
SQL: SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name  =  "China"
Database: cre_Drama_Workshop_Groups (tables: marketing_regions)
Question: Find the marketing region description of China?
SQL: SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name  =  "China"
Database: cre_Drama_Workshop_Groups (tables: products)
Question: Show all the distinct product names with price higher than the average.
SQL: SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price  >  (SELECT avg(Product_Price) FROM PRODUCTS)
Database: cre_Drama_Workshop_Groups (tables: products)
Question: What are the distinct names of the products that cost more than the average?
SQL: SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price  >  (SELECT avg(Product_Price) FROM PRODUCTS)
Database: cre_Drama_Workshop_Groups (tables: products)
Question: What is the name of the most expensive product?
SQL: SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1
Database: cre_Drama_Workshop_Groups (tables: products)
Question: Tell me the name of the most pricy product.
SQL: SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1
Database: cre_Drama_Workshop_Groups (tables: products)
Question: List all product names in ascending order of price.
SQL: SELECT Product_Name FROM Products ORDER BY Product_Price ASC
Database: cre_Drama_Workshop_Groups (tables: products)
Question: Sort the names of products in ascending order of their price.
SQL: SELECT Product_Name FROM Products ORDER BY Product_Price ASC
Database: cre_Drama_Workshop_Groups (tables: performers)
Question: What is the phone number of the performer Ashley?
SQL: SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name  =  "Ashley"
Database: cre_Drama_Workshop_Groups (tables: performers)
Question: Find the phone number of performer "Ashley".
SQL: SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name  =  "Ashley"
Database: cre_Drama_Workshop_Groups (tables: invoices)
Question: Show all payment method codes and the number of orders for each code.
SQL: SELECT payment_method_code ,  count(*) FROM INVOICES GROUP BY payment_method_code
Database: cre_Drama_Workshop_Groups (tables: invoices)
Question: List the distinct payment method codes with the number of orders made
SQL: SELECT payment_method_code ,  count(*) FROM INVOICES GROUP BY payment_method_code
Database: cre_Drama_Workshop_Groups (tables: invoices)
Question: What is the payment method code used by the most orders?
SQL: SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Drama_Workshop_Groups (tables: invoices)
Question: Find the payment method that is used the most often in all the invoices. Give me its code.
SQL: SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count(*) DESC LIMIT 1
Database: cre_Drama_Workshop_Groups (tables: addresses, stores)
Question: Which city is the address of the store named "FJA Filming" located in?
SQL: SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T2.Store_Name  =  "FJA Filming"
Database: cre_Drama_Workshop_Groups (tables: addresses, stores)
Question: Find the city the store named "FJA Filming" is in.
SQL: SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T2.Store_Name  =  "FJA Filming"
Database: cre_Drama_Workshop_Groups (tables: addresses, stores)
Question: What are the states or counties of the address of the stores with marketing region code "CA"?
SQL: SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T2.Marketing_Region_Code  =  "CA"
Database: cre_Drama_Workshop_Groups (tables: addresses, stores)
Question: Find the states or counties where the stores with marketing region code "CA" are located.
SQL: SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T2.Marketing_Region_Code  =  "CA"
Database: cre_Drama_Workshop_Groups (tables: marketing_regions, stores)
Question: What is the name of the marketing region that the store Rob Dinning belongs to?
SQL: SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code  =  T2.Marketing_Region_Code WHERE T2.Store_Name  =  "Rob Dinning"
Database: cre_Drama_Workshop_Groups (tables: marketing_regions, stores)
Question: Return the name of the marketing region the store Rob Dinning is located in.
SQL: SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code  =  T2.Marketing_Region_Code WHERE T2.Store_Name  =  "Rob Dinning"
Database: cre_Drama_Workshop_Groups (tables: ref_service_types, services)
Question: What are the descriptions of the service types with product price above 100?
SQL: SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code WHERE T2.Product_Price  >  100
Database: cre_Drama_Workshop_Groups (tables: ref_service_types, services)
Question: Give me the descriptions of the service types that cost more than 100.
SQL: SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code WHERE T2.Product_Price  >  100
Database: cre_Drama_Workshop_Groups (tables: ref_service_types, services)
Question: What is the description, code and the corresponding count of each service type?
SQL: SELECT T1.Service_Type_Description ,  T2.Service_Type_Code ,  COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code GROUP BY T2.Service_Type_Code
Database: cre_Drama_Workshop_Groups (tables: ref_service_types, services)
Question: List the description, code and the number of services for each service type.
SQL: SELECT T1.Service_Type_Description ,  T2.Service_Type_Code ,  COUNT(*) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code GROUP BY T2.Service_Type_Code
Database: cre_Drama_Workshop_Groups (tables: ref_service_types, services)
Question: What is the description and code of the type of service that is performed the most often?
SQL: SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
Database: cre_Drama_Workshop_Groups (tables: ref_service_types, services)
Question: Find the description and code of the service type that is performed the most times.
SQL: SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
Database: cre_Drama_Workshop_Groups (tables: services, drama_workshop_groups)
Question: What are the phones and emails of workshop groups in which services are performed?
SQL: SELECT T1.Store_Phone ,  T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID  =  T2.Workshop_Group_ID
Database: cre_Drama_Workshop_Groups (tables: services, drama_workshop_groups)
Question: Give me all the phone numbers and email addresses of the workshop groups where services are performed.
SQL: SELECT T1.Store_Phone ,  T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID  =  T2.Workshop_Group_ID
Database: cre_Drama_Workshop_Groups (tables: services, drama_workshop_groups)
Question: What are the names of workshop groups in which services with product name "film" are performed?
SQL: SELECT T1.Store_Phone ,  T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID  =  T2.Workshop_Group_ID WHERE T2.Product_Name  =  "film"
Database: cre_Drama_Workshop_Groups (tables: services, drama_workshop_groups)
Question: Find the names of the workshop groups where services with product name "film" are performed.
SQL: SELECT T1.Store_Phone ,  T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID  =  T2.Workshop_Group_ID WHERE T2.Product_Name  =  "film"
Database: cre_Drama_Workshop_Groups (tables: products)
Question: What are the different product names? What is the average product price for each of them?
SQL: SELECT Product_Name ,  avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name
Database: cre_Drama_Workshop_Groups (tables: products)
Question: For each distinct product name, show its average product price.
SQL: SELECT Product_Name ,  avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name
Database: cre_Drama_Workshop_Groups (tables: products)
Question: What are the product names with average product price smaller than 1000000?
SQL: SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING avg(Product_Price)  <  1000000
Database: cre_Drama_Workshop_Groups (tables: products)
Question: Find the product names whose average product price is below 1000000.
SQL: SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING avg(Product_Price)  <  1000000
Database: cre_Drama_Workshop_Groups (tables: order_items, products)
Question: What are the total order quantities of photo products?
SQL: SELECT sum(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID  =  T2.Product_ID WHERE T2.Product_Name  =  "photo"
Database: cre_Drama_Workshop_Groups (tables: order_items, products)
Question: Compute the total order quantities of the product "photo".
SQL: SELECT sum(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID  =  T2.Product_ID WHERE T2.Product_Name  =  "photo"
Database: cre_Drama_Workshop_Groups (tables: order_items, products)
Question: What are the order details of the products with price higher than 2000?
SQL: 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
Database: cre_Drama_Workshop_Groups (tables: order_items, products)
Question: Find the order detail for the products with price above 2000.
SQL: 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
Database: cre_Drama_Workshop_Groups (tables: order_items, customer_orders)
Question: What are the actual delivery dates of orders with quantity 1?
SQL: 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
Database: cre_Drama_Workshop_Groups (tables: order_items, customer_orders)
Question: List the actual delivery date for all the orders with quantity 1
SQL: 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
Database: cre_Drama_Workshop_Groups (tables: order_items, products, customer_orders)
Question: What are the order dates of orders with price higher than 1000?
SQL: 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
Database: cre_Drama_Workshop_Groups (tables: order_items, products, customer_orders)
Question: Find the order dates of the orders with price above 1000.
SQL: 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
Database: cre_Drama_Workshop_Groups (tables: drama_workshop_groups)
Question: How many distinct currency codes are there for all drama workshop groups?
SQL: SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups
Database: cre_Drama_Workshop_Groups (tables: drama_workshop_groups)
Question: Find the number of distinct currency codes used in drama workshop groups.
SQL: SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups
Database: cre_Drama_Workshop_Groups (tables: addresses, drama_workshop_groups)
Question: What are the names of the drama workshop groups with address in Feliciaberg city?
SQL: 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"
Database: cre_Drama_Workshop_Groups (tables: addresses, drama_workshop_groups)
Question: Return the the names of the drama workshop groups that are located in Feliciaberg city.
SQL: 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"
Database: cre_Drama_Workshop_Groups (tables: addresses, drama_workshop_groups)
Question: What are the email addresses of the drama workshop groups with address in Alaska state?
SQL: 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"
Database: cre_Drama_Workshop_Groups (tables: addresses, drama_workshop_groups)
Question: List the email addresses of the drama workshop groups located in Alaska state.
SQL: 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"
Database: cre_Drama_Workshop_Groups (tables: addresses, drama_workshop_groups)
Question: Show all cities along with the number of drama workshop groups in each city.
SQL: 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
Database: cre_Drama_Workshop_Groups (tables: addresses, drama_workshop_groups)
Question: How many drama workshop groups are there in each city? Return both the city and the count.
SQL: 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
Database: cre_Drama_Workshop_Groups (tables: drama_workshop_groups)
Question: What is the marketing region code that has the most drama workshop groups?
SQL: SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1
Database: cre_Drama_Workshop_Groups (tables: drama_workshop_groups)
Question: Which marketing region has the most drama workshop groups? Give me the region code.
SQL: SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1
Database: cre_Drama_Workshop_Groups (tables: addresses, performers, customers)
Question: Show all cities where at least one customer lives in but no performer lives in.
SQL: 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
Database: cre_Drama_Workshop_Groups (tables: addresses, performers, customers)
Question: Which cities have at least one customer but no performer?
SQL: 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
Database: cre_Drama_Workshop_Groups (tables: bookings)
Question: What is the most frequent status of bookings?
SQL: SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY count(*) DESC LIMIT 1
Database: cre_Drama_Workshop_Groups (tables: bookings)
Question: Which status code is the most common of all the bookings?
SQL: SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY count(*) DESC LIMIT 1
Database: cre_Drama_Workshop_Groups (tables: bookings, drama_workshop_groups)
Question: What are the names of the workshop groups that have bookings with status code "stop"?
SQL: 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"