interaction_utterance
sequencelengths
0
6
interaction_query
sequencelengths
0
6
final_utterance
stringlengths
19
224
final_query
stringlengths
22
577
db_id
stringclasses
140 values
[ "What are the names of the regions affected?", "How many are there?", "How about the names of regions not affected?" ]
[ "SELECT region_name FROM region WHERE region_id IN (SELECT region_id FROM affected_region);", "SELECT count(region_name) FROM region WHERE region_id IN (SELECT region_id FROM affected_region);", "SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region);" ]
Show the name for regions not affected.
SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region);
storm_record
[ "Show me the storm ids for each region.", "What's the maximum number of storms of one region?", "Show the region names and the number of storms for each region." ]
[ "SELECT T2.storm_id FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id;", "SELECT count(T2.storm_id) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id ORDER BY count(storm_id) DESC LIMIT 1;", "SELECT T1.region_name , count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id;" ]
Show the name for regions and the number of storms for each region.
SELECT T1.region_name , count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id;
storm_record
[ "Show me the names of all storms that affect more than 1 regions?", "List the name for storms and the number of affected regions for each storm." ]
[ "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) > 1;", "SELECT T1.name , count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id;" ]
List the name for storms and the number of affected regions for each storm.
SELECT T1.name , count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id;
storm_record
[ "What is the name for storms and the number of affected regions for each storm.", "Which storm affected the greatest number of regions?", "Show its max speed in addition to its name." ]
[ "SELECT T1.name , count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id;", "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1;", "SELECT T1.name , T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1;" ]
What is the storm name and max speed which affected the greatest number of regions?
SELECT T1.name , T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1;
storm_record
[ "What are the names of the storms that have affected regions in record?", "How many such storms are there in the result?", "How about the names of storms which don't have affected region in record." ]
[ "SELECT name FROM storm WHERE storm_id IN (SELECT storm_id FROM affected_region);", "SELECT count(name) FROM storm WHERE storm_id IN (SELECT storm_id FROM affected_region);", "SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region);" ]
Show the name of storms which don't have affected region in record.
SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region);
storm_record
[ "What is the name of the storm affected the most number of cities?", "How about of the storms that affected at least two regions?", "Among the result, which one affected at least 10 cities?" ]
[ "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id ORDER BY sum(T2.number_city_affected) DESC LIMIT 1;", "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2;", "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING sum(T2.number_city_affected) >= 10;" ]
Show storm name with at least two regions and 10 cities affected.
SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2 INTERSECT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING sum(T2.number_city_affected) >= 10;
storm_record
[ "Show me all the storms by name.", "List only ones with at least 2 affected regions.", "Show all names of the storms except for these." ]
[ "SELECT name FROM storm;", "SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) = 2;", "SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2;" ]
Show all storm names except for those with at least two affected regions.
SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id HAVING count(*) >= 2;
storm_record
[ "Show me the regions affected by a storm with a damage of more than 10 million dollars?", "How about those with affected by storms with no more than 10 deaths?", "List the region names affected by the storm with a number of deaths of least 10." ]
[ "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.damage_millions_USD > 10;", "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths <= 10;", "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10;" ]
What are the region names affected by the storm with a number of deaths of least 10?
SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10;
storm_record
[ "Show me all the affected regions.", "Which storm affected region Cyprus?", "How about Denmark?" ]
[ "SELECT region.region_name FROM region JOIN affected_region ON affected_region.region_id = region.region_id;", "SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Cyprus';", "SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark';" ]
Show all storm names affecting region "Denmark".
SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Denmark';
storm_record
[ "Show me the number of regions affected for each storm.", "How about the number of storms for each region?", "Show the region name with at least two storms." ]
[ "SELECT T1.name , count(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id = T2.storm_id GROUP BY T1.storm_id;", "SELECT T1.region_name , count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id;", "SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*) >= 2;" ]
Show the region name with at least two storms.
SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*) >= 2;
storm_record
[ "Show me the number of people killed for each storm.", "What's the name of the one that killed the most people?", "What's the names of the regions affected by this storm?" ]
[ "SELECT Number_Deaths FROM storm;", "SELECT name FROM storm ORDER BY Number_Deaths DESC LIMIT 1;", "SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1" ]
Find the names of the regions which were affected by the storm that killed the greatest number of people.
SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1
storm_record
[ "Show company information.", "How many are there?" ]
[ "SELECT * FROM company", "SELECT count(*) FROM company" ]
How many gas companies are there?
SELECT count(*) FROM company
gas_company
[ "Show the company names.", "Also show the rank for each.", "Show the results in decreasing order of their sales." ]
[ "SELECT company FROM company", "SELECT company , rank FROM company", "SELECT company , rank FROM company ORDER BY Sales_billion DESC" ]
List the company name and rank for all companies in the decreasing order of their sales.
SELECT company , rank FROM company ORDER BY Sales_billion DESC
gas_company
[ "Show the company name and the main industry for all companies.", "Show the results only for those whose headquarters are not from USA." ]
[ "SELECT company , main_industry FROM company", "SELECT company , main_industry FROM company WHERE headquarters != 'USA'" ]
Show the company name and the main industry for all companies whose headquarters are not from USA.
SELECT company , main_industry FROM company WHERE headquarters != 'USA'
gas_company
[ "Show all company names and headquarters.", "Show them in the descending order of market value." ]
[ "SELECT company , headquarters FROM company", "SELECT company , headquarters FROM company ORDER BY market_value DESC" ]
Show all company names and headquarters in the descending order of market value.
SELECT company , headquarters FROM company ORDER BY market_value DESC
gas_company
[ "Show the market value for all companies.", "What are the minimum, maximum, and average of them?" ]
[ "SELECT market_value FROM company", "SELECT min(market_value) , max(market_value) , avg(market_value) FROM company" ]
Show minimum, maximum, and average market value for all companies.
SELECT min(market_value) , max(market_value) , avg(market_value) FROM company
gas_company
[ "Show the company info.", "Show the main industry for them.", "Remove duplicates." ]
[ "select * from company", "SELECT main_industry FROM company", "SELECT DISTINCT main_industry FROM company" ]
Show all main industry for all companies.
SELECT DISTINCT main_industry FROM company
gas_company
[ "Show all headquarters for companies.", "For each of them, show the number of companies." ]
[ "SELECT headquarters FROM company", "SELECT headquarters , count(*) FROM company GROUP BY headquarters" ]
List all headquarters and the number of companies in each headquarter.
SELECT headquarters , count(*) FROM company GROUP BY headquarters
gas_company
[ "Show all main industries for companies.", "For each of them, also show the total market value." ]
[ "SELECT main_industry FROM company", "SELECT main_industry , sum(market_value) FROM company GROUP BY main_industry" ]
Show all main industry and total market value in each industry.
SELECT main_industry , sum(market_value) FROM company GROUP BY main_industry
gas_company
[ "Show all the main industries for companies.", "Order them in descending order by total market value.", "What one has the highest?", "Also show its number of companies." ]
[ "SELECT main_industry FROM company", "SELECT main_industry FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC", "SELECT main_industry FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1", "SELECT main_industry , count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1" ]
List the main industry with highest total market value and its number of companies.
SELECT main_industry , count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1
gas_company
[ "Show all headquarters.", "For each of them, also show the number of companies in the banking industry.", "Which have at least two?" ]
[ "SELECT headquarters FROM company", "SELECT headquarters, count(*) FROM company WHERE main_industry = 'Banking' GROUP BY headquarters", "SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING count(*) >= 2" ]
Show headquarters with at least two companies in the banking industry.
SELECT headquarters FROM company WHERE main_industry = 'Banking' GROUP BY headquarters HAVING count(*) >= 2
gas_company
[ "Show the station id for all stations.", "Also show the location and the manager name for each of them.", "Order the results by their opening year." ]
[ "SELECT station_id FROM gas_station", "SELECT station_id , LOCATION , manager_name FROM gas_station", "SELECT station_id , LOCATION , manager_name FROM gas_station ORDER BY open_year" ]
Show gas station id, location, and manager_name for all gas stations ordered by open year.
SELECT station_id , LOCATION , manager_name FROM gas_station ORDER BY open_year
gas_company
[ "Show the information for all gas stations.", "How about those that opened between 2000 and 2005?", "Show the count." ]
[ "SELECT * FROM gas_station", "SELECT * FROM gas_station WHERE open_year BETWEEN 2000 AND 2005", "SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005" ]
How many gas station are opened between 2000 and 2005?
SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005
gas_company
[ "Show locations for all gas stations.", "For each of them, show the number of gas stations.", "Order the results by the count." ]
[ "SELECT LOCATION FROM gas_station", "SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION", "SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*)" ]
Show all locations and the number of gas stations in each location ordered by the count.
SELECT LOCATION , count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*)
gas_company
[ "Show all headquarters.", "Show headquarters with a company in the banking industry.", "How about headquarters with a company in oil and gas?", "Show headquarters with both." ]
[ "SELECT headquarters FROM company", "SELECT headquarters FROM company WHERE main_industry = 'Banking'", "SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'", "SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'" ]
Show all headquarters with both a company in banking industry and a company in Oil and gas.
SELECT headquarters FROM company WHERE main_industry = 'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry = 'Oil and gas'
gas_company
[ "Show the headquarters with a company in banking industry.", "How about those without any such company?" ]
[ "SELECT headquarters FROM company WHERE main_industry = 'Banking'", "SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'" ]
Show all headquarters without a company in banking industry.
SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry = 'Banking'
gas_company
[ "Show the company name.", "For each of them, also show the number of gas station." ]
[ "select company from company", "SELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id" ]
Show the company name with the number of gas station.
SELECT T2.company , count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id
gas_company
[ "What are company ids with a gas station.", "Show the company name without a gas station.", "Show also their main industry." ]
[ "SELECT company_id FROM station_company", "SELECT company FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)", "SELECT company , main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)" ]
Show company name and main industry without a gas station.
SELECT company , main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)
gas_company
[ "Show the manager name for all gas stations.", "Show those for gas stations belonging to the ExxonMobil company." ]
[ "SELECT manager_name FROM gas_station", "SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil'" ]
Show the manager name for gas stations belonging to the ExxonMobil company.
SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil'
gas_company
[ "Show locations for all gas stations.", "Show locations whose company has a market value greater than 100." ]
[ "SELECT location FROM gas_station", "SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100" ]
Show all locations where a gas station for company with market value greater than 100 is located.
SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.market_value > 100
gas_company
[ "Show the manager name for all gas stations.", "For each of them, also count the number of gas stations opened after 2000.", "Show the results in the descending order of their count.", "Which manager name has the most?" ]
[ "SELECT manager_name FROM gas_station", "SELECT manager_name, count(*) FROM gas_station WHERE open_year > 2000 GROUP BY manager_name", "SELECT manager_name, count(*) FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count(*) DESC", "SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1" ]
Show the manager name with most number of gas stations opened after 2000.
SELECT manager_name FROM gas_station WHERE open_year > 2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1
gas_company
[ "Show the location for all gas stations.", "Order them by their opening year." ]
[ "SELECT LOCATION FROM gas_station", "SELECT LOCATION FROM gas_station ORDER BY open_year" ]
order all gas station locations by the opening year.
SELECT LOCATION FROM gas_station ORDER BY open_year
gas_company
[ "Show the rank, company names, market values of all the companies.", "What about the results for those in the banking industry?", "Order the results by their sales and profits in billion." ]
[ "SELECT rank , company , market_value FROM company", "SELECT rank , company , market_value FROM company WHERE main_industry = 'Banking'", "SELECT rank , company , market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion , profits_billion" ]
find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.
SELECT rank , company , market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion , profits_billion
gas_company
[ "What are the prices of products called \"Trading Policy\"?", "How bout \"Dining\"?", "Show those together, please." ]
[ "SELECT Product_Price FROM Products WHERE Product_Name = \"Trading Policy\"", "SELECT Product_Price FROM Products WHERE Product_Name = \"Dining\"", "SELECT Product_Price FROM Products WHERE Product_Name = \"Dining\" OR Product_Name = \"Trading Policy\"" ]
Show the prices of the products named "Dining" or "Trading Policy".
SELECT Product_Price FROM Products WHERE Product_Name = "Dining" OR Product_Name = "Trading Policy"
solvency_ii
[ "What are the prices of the products?", "Can you sort that by descending product price?", "Just show the product name with the highest price" ]
[ "SELECT Product_Name, Product_Price FROM Products", "SELECT Product_Name, Product_Price FROM Products ORDER BY Product_Price DESC", "SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1" ]
What is the name of the product with the highest price?
SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1
solvency_ii
[ "What are the type codes for products?", "Can you count the products for each type code?", "Which is most common?", "Show the ones with at least two products.", "Show those ones that have products with price higher than 4500 and products with price lower than 3000." ]
[ "SELECT Product_Name, Product_Type_Code FROM Products", "SELECT Product_Type_Code, COUNT(*) FROM Products group by product_type_code", "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1", "SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*) >= 2", "SELECT Product_Type_Code FROM Products WHERE Product_Price > 4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price < 3000" ]
Show the most common type code across products.
SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1
solvency_ii
[ "Show the locations for all cinemas.", "What are the locations for the cinemas that have a capacity over 800?", "Show all locations except for those." ]
[ "SELECT LOCATION FROM cinema", "SELECT LOCATION FROM cinema WHERE capacity > 800", "SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800" ]
Show all the locations where no cinema has capacity over 800.
SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity > 800
cinema
[ "List the locations where a cinema was opened in 2010.", "How about the locations where of cinema was opened in 2011?", "Show the locations that belong to both groups." ]
[ "SELECT LOCATION FROM cinema WHERE openning_year = 2010", "SELECT LOCATION FROM cinema WHERE openning_year = 2011", "SELECT LOCATION FROM cinema WHERE openning_year = 2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year = 2011" ]
Show all the locations where some cinemas were opened in both year 2010 and year 2011.
SELECT LOCATION FROM cinema WHERE openning_year = 2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year = 2011
cinema
[ "Show all cinemas.", "How many are there?" ]
[ "SELECT * FROM cinema", "SELECT count(*) FROM cinema" ]
How many cinema do we have?
SELECT count(*) FROM cinema
cinema
[ "Show all information for cinemas.", "Only list name, opening year, and capacity for them." ]
[ "SELECT * FROM cinema", "SELECT name , openning_year , capacity FROM cinema" ]
Show name, opening year, and capacity for each cinema.
SELECT name , openning_year , capacity FROM cinema
cinema
[ "What is are the capacities for cinemas?", "What is the average?", "Show the name and location for any cinemas with a capacity above this." ]
[ "SELECT capacity FROM cinema", "SELECT avg(capacity) FROM cinema", "SELECT name , LOCATION FROM cinema WHERE capacity > (SELECT avg(capacity) FROM cinema)" ]
Show the cinema name and location for cinemas with capacity above average.
SELECT name , LOCATION FROM cinema WHERE capacity > (SELECT avg(capacity) FROM cinema)
cinema
[ "Show all information for cinemas.", "Show all distinct locations containing cinemas." ]
[ "SELECT * FROM cinema", "SELECT DISTINCT LOCATION FROM cinema" ]
What are all the locations with a cinema?
SELECT DISTINCT LOCATION FROM cinema
cinema
[ "Show name and opening year for each cinema.", "Sort them in descending order by opening year." ]
[ "SELECT name , openning_year FROM cinema", "SELECT name , openning_year FROM cinema ORDER BY openning_year DESC" ]
Show all the cinema names and opening years in descending order of opening year.
SELECT name , openning_year FROM cinema ORDER BY openning_year DESC
cinema
[ "Show name and location for all cinemas.", "Order by them their capacity in descending order.", "What is the top cinema in the list?" ]
[ "SELECT name , LOCATION FROM cinema", "SELECT name , LOCATION FROM cinema ORDER BY capacity DESC", "SELECT name , LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1" ]
What are the name and location of the cinema with the largest capacity?
SELECT name , LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1
cinema
[ "Show the capacities for all cinemas.", "How about the capacities for those that opened in 2011 or later?", "What is the average, minimum, and maximum among these?" ]
[ "Select capacity from cinema", "Select capacity from cinema WHERE openning_year >= 2011", "SELECT avg(capacity) , min(capacity) , max(capacity) FROM cinema WHERE openning_year >= 2011" ]
Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.
SELECT avg(capacity) , min(capacity) , max(capacity) FROM cinema WHERE openning_year >= 2011
cinema
[ "Show all locations for cinemas.", "Also show the number of cinemas in each location." ]
[ "select location from cinema", "SELECT LOCATION , count(*) FROM cinema GROUP BY LOCATION" ]
Show each location and the number of cinemas there.
SELECT LOCATION , count(*) FROM cinema GROUP BY LOCATION
cinema
[ "Show all locations with cinemas.", "How about locations for those that opened in year 2010 or later?", "What is the location with the most such cinemas?" ]
[ "SELECT LOCATION FROM cinema", "SELECT LOCATION FROM cinema WHERE openning_year >= 2010", "SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1" ]
What is the location with the most cinemas opened in year 2010 or later?
SELECT LOCATION FROM cinema WHERE openning_year >= 2010 GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1
cinema
[ "Show all locations of cinemas.", "What are locations for the cinemas with a capacity above 300?", "What are locations with at least two such cinemas?" ]
[ "SELECT LOCATION FROM cinema", "SELECT LOCATION FROM cinema WHERE capacity > 300", "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) >= 2" ]
Show all the locations with at least two cinemas with capacity above 300.
SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) >= 2
cinema
[ "Show all information of films.", "How about the title and director for those?" ]
[ "SELECT * FROM film", "SELECT title , directed_by FROM film" ]
Show the title and director for all films.
SELECT title , directed_by FROM film
cinema
[ "Show the information for all films.", "Who are the directors for those?" ]
[ "SELECT * FROM film", "SELECT DISTINCT directed_by FROM film" ]
Show all directors.
SELECT DISTINCT directed_by FROM film
cinema
[ "Show directors for all films.", "Also show the number of films made by each director." ]
[ "SELECT directed_by FROM film", "SELECT directed_by , count(*) FROM film GROUP BY directed_by" ]
List all directors along with the number of films directed by each director.
SELECT directed_by , count(*) FROM film GROUP BY directed_by
cinema
[ "Show the names for all cinemas.", "Also show the showtimes per day for those cinemas.", "For each cinema, also show the total number of showtimes per day." ]
[ "select name from cinema", "SELECT T2.name , T1.show_times_per_day FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id", "SELECT T2.name , sum(T1.show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id" ]
What is total number of show times per day for each cinema?
SELECT T2.name , sum(T1.show_times_per_day) FROM schedule AS T1 JOIN cinema AS T2 ON T1.cinema_id = T2.cinema_id GROUP BY T1.cinema_id
cinema
[ "Show the title for each film.", "Also show the prices for each of them.", "What is the maximum price for each?" ]
[ "select title from film", "SELECT T2.title , T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id", "SELECT T2.title , max(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id" ]
What are the title and maximum price of each film?
SELECT T2.title , max(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T1.film_id
cinema
[ "Show the title for films.", "Show the name for cinemas.", "Show all the schedule record.", "How about the date and the price for each of those records along with the film title and cinema name." ]
[ "select title from film", "select name from cinema", "select * from schedule", "SELECT T3.name , T2.title , T1.date , T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id JOIN cinema AS T3 ON T1.cinema_id = T3.cinema_id" ]
Show cinema name, film title, date, and price for each record in schedule.
SELECT T3.name , T2.title , T1.date , T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id JOIN cinema AS T3 ON T1.cinema_id = T3.cinema_id
cinema
[ "Show all film ids in the schedule.", "Show the title and director for all films.", "Only show the title and director for films not in the schedule." ]
[ "SELECT film_id FROM schedule", "SELECT title , directed_by FROM film", "SELECT title , directed_by FROM film WHERE film_id NOT IN (SELECT film_id FROM schedule)" ]
What are the title and director of the films without any schedule?
SELECT title , directed_by FROM film WHERE film_id NOT IN (SELECT film_id FROM schedule)
cinema
[ "Show all the directors.", "List those directors in descending order by the total number of showtimes.", "Who has the most?" ]
[ "select directed_by from film", "SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY sum(T1.show_times_per_day) DESC", "SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY sum(T1.show_times_per_day) DESC LIMIT 1" ]
Show director with the largest number of show times in total.
SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id = T2.film_id GROUP BY T2.directed_by ORDER BY sum(T1.show_times_per_day) DESC LIMIT 1
cinema
[ "Show all locations for the cinemas.", "Only show locations of cinemas with a capacity above 300.", "How about locations with more than one such cinema?" ]
[ "SELECT LOCATION FROM cinema", "SELECT LOCATION FROM cinema WHERE capacity > 300", "SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) > 1" ]
Find the locations that have more than one movie theater with capacity above 300.
SELECT LOCATION FROM cinema WHERE capacity > 300 GROUP BY LOCATION HAVING count(*) > 1
cinema
[ "What are all the bookings?", "How many are there?" ]
[ "SELECT * FROM BOOKINGS", "SELECT count(*) FROM BOOKINGS" ]
How many bookings do we have?
SELECT count(*) FROM BOOKINGS
cre_Drama_Workshop_Groups
[ "What are all the bookings?", "What are their order dates?" ]
[ "SELECT * FROM BOOKINGS", "SELECT Order_Date FROM BOOKINGS" ]
List the order dates of all the bookings.
SELECT Order_Date FROM BOOKINGS
cre_Drama_Workshop_Groups
[ "What are all the bookings?", "What are their planned delivery dates and actual delivery dates?" ]
[ "SELECT * FROM BOOKINGS", "SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS" ]
Show all the planned delivery dates and actual delivery dates of bookings.
SELECT Planned_Delivery_Date , Actual_Delivery_Date FROM BOOKINGS
cre_Drama_Workshop_Groups
[ "What are all the customers?", "How many are there?" ]
[ "SELECT * FROM CUSTOMERS", "SELECT count(*) FROM CUSTOMERS" ]
How many customers do we have?
SELECT count(*) FROM CUSTOMERS
cre_Drama_Workshop_Groups
[ "What are all the customers?", "Who is Harold?", "Show Harold's phone and email." ]
[ "SELECT * FROM CUSTOMERS", "SELECT * FROM CUSTOMERS WHERE Customer_Name = \"Harold\"", "SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = \"Harold\"" ]
What are the phone and email for customer Harold?
SELECT Customer_Phone , Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name = "Harold"
cre_Drama_Workshop_Groups
[ "What are all the drama workshop groups?", "What are their names?" ]
[ "SELECT * FROM Drama_Workshop_Groups", "SELECT Store_Name FROM Drama_Workshop_Groups" ]
Show all the Store_Name of drama workshop groups.
SELECT Store_Name FROM Drama_Workshop_Groups
cre_Drama_Workshop_Groups
[ "What are all the invoices?", "What are their order quantities?", "Show the minimum, average, maximum of them." ]
[ "SELECT * FROM INVOICES", "SELECT Order_Quantity FROM INVOICES", "SELECT min(Order_Quantity) , avg(Order_Quantity) , max(Order_Quantity) FROM INVOICES" ]
Show the minimum, average, maximum order quantity of all invoices.
SELECT min(Order_Quantity) , avg(Order_Quantity) , max(Order_Quantity) FROM INVOICES
cre_Drama_Workshop_Groups
[ "What are all the invoices?", "What are their payment method codes?", "Only show the distinct ones." ]
[ "SELECT * FROM INVOICES", "SELECT payment_method_code FROM INVOICES", "SELECT DISTINCT payment_method_code FROM INVOICES" ]
What are the distinct payment method codes in all the invoices?
SELECT DISTINCT payment_method_code FROM INVOICES
cre_Drama_Workshop_Groups
[ "What are all the marketing regions?", "Show me the region named China.", "Show the description of it." ]
[ "SELECT * FROM Marketing_Regions", "SELECT * FROM Marketing_Regions WHERE Marketing_Region_Name = \"China\"", "SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = \"China\"" ]
What is the description of the marketing region China?
SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name = "China"
cre_Drama_Workshop_Groups
[ "What are all the products?", "What about those with price higher than average?", "Show their distinct names." ]
[ "SELECT * FROM PRODUCTS", "SELECT * FROM PRODUCTS WHERE Product_Price > (SELECT avg(Product_Price) FROM PRODUCTS)", "SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT avg(Product_Price) FROM PRODUCTS)" ]
Show all the distinct product names with price higher than the average.
SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price > (SELECT avg(Product_Price) FROM PRODUCTS)
cre_Drama_Workshop_Groups
[ "What are all the products?", "which is the one with the highest price?", "Only show its name." ]
[ "SELECT * FROM PRODUCTS", "SELECT * FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1", "SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1" ]
What is the name of the most expensive product?
SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1
cre_Drama_Workshop_Groups
[ "What are all the performers?", "Show the phone number of the performer whose name is Ashley." ]
[ "SELECT * FROM PERFORMERS", "SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = \"Ashley\"" ]
What is the phone number of the performer Ashley?
SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name = "Ashley"
cre_Drama_Workshop_Groups
[ "What are all the invoices?", "Show all kinds of payment method codes among them.", "How many orders are there for each of them?" ]
[ "SELECT * FROM INVOICES", "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code", "SELECT payment_method_code , count(*) FROM INVOICES GROUP BY payment_method_code" ]
Show all payment method codes and the number of orders for each code.
SELECT payment_method_code , count(*) FROM INVOICES GROUP BY payment_method_code
cre_Drama_Workshop_Groups
[ "What are all the invoices?", "Show all kinds of payment method codes among them.", "Which one is used by most orders?" ]
[ "SELECT * FROM INVOICES", "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code", "SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count(*) DESC LIMIT 1" ]
What is the payment method code used by the most orders?
SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count(*) DESC LIMIT 1
cre_Drama_Workshop_Groups
[ "Show me information about the store named \"FJA Filming\".", "Which city is that store located in?" ]
[ "SELECT * FROM Stores WHERE Store_Name = \"FJA Filming\"", "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\"" ]
Which city is the address of the store named "FJA Filming" located in?
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"
cre_Drama_Workshop_Groups
[ "What are the stores with marketing region code \"CA\"?", "What are their addresses?", "What are the states or counties those addresses belong to?" ]
[ "SELECT * FROM Stores where Marketing_Region_Code = \"CA\"", "SELECT line_1, line_2 FROM Stores AS T1 JOIN addresses AS T2 on T1.address_ID = T2.address_ID where Marketing_Region_Code = \"CA\"", "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\"" ]
What are the states or counties of the address of the stores with marketing region code "CA"?
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"
cre_Drama_Workshop_Groups
[ "Show me information about the store named Rob Dinning?", "What is the name of its marketing region?" ]
[ "SELECT * FROM Stores WHERE Store_Name = \"Rob Dinning\"", "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\"" ]
What is the name of the marketing region that the store Rob Dinning belongs to?
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"
cre_Drama_Workshop_Groups
[ "What are the services with product price above 100?", "What are the descriptions of the service types of them?" ]
[ "SELECT * FROM Services WHERE Product_Price > 100", "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" ]
What are the descriptions of the service types with product price above 100?
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
cre_Drama_Workshop_Groups
[ "What are all the service types?", "For each of them, what is the description, code and the corresponding count of service?" ]
[ "SELECT * FROM Ref_Service_Types", "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" ]
What is the description, code and the corresponding count of each service type?
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
cre_Drama_Workshop_Groups
[ "What are all the service types?", "How many times has each of them being performed?", "Show the description and code of the one that is performed the most often." ]
[ "SELECT * FROM Ref_Service_Types", "SELECT T1.Service_Type_Description , T1.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 T1.Service_Type_Code", "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" ]
What is the description and code of the type of service that is performed the most often?
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
cre_Drama_Workshop_Groups
[ "What are all the workshop groups?", "What about those that services are performed?", "Show their phones and emails." ]
[ "SELECT * FROM Drama_Workshop_Groups", "SELECT * FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID", "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" ]
What are the phones and emails of workshop groups in which services are performed?
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
cre_Drama_Workshop_Groups
[ "What are all the services with product name \"film\"?", "What are the names of workshop groups in which they are performed?" ]
[ "SELECT * FROM Services WHERE Product_Name = \"film\"", "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\"" ]
What are the names of workshop groups in which services with product name "film" are performed?
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"
cre_Drama_Workshop_Groups
[ "What are all the products?", "Show all product names.", "Show the average price for each name." ]
[ "SELECT * FROM PRODUCTS", "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name", "SELECT Product_Name , avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name" ]
What are the different product names? What is the average product price for each of them?
SELECT Product_Name , avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name
cre_Drama_Workshop_Groups
[ "What are the names for all products?", "Show the one that has average price smaller than 1000000." ]
[ "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name", "SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING avg(Product_Price) < 1000000" ]
What are the product names with average product price smaller than 1000000?
SELECT Product_Name FROM PRODUCTS GROUP BY Product_Name HAVING avg(Product_Price) < 1000000
cre_Drama_Workshop_Groups
[ "What are all the photo products?", "What are the total order quantities of them?" ]
[ "SELECT * FROM Products where Product_Name = \"photo\"", "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\"" ]
What are the total order quantities of photo products?
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"
cre_Drama_Workshop_Groups
[ "What are all the products with price higher than 2000?", "What are the order details of them?" ]
[ "SELECT * FROM Products where Product_price > 2000", "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" ]
What are the order details of the products with price higher than 2000?
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
cre_Drama_Workshop_Groups
[ "What are the orders with quantity 1?", "Show the actual delivery dates of them." ]
[ "SELECT * FROM ORDER_ITEMS WHERE Order_Quantity = 1", "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" ]
What are the actual delivery dates of orders with quantity 1?
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
cre_Drama_Workshop_Groups
[ "What are the products with price higher than 1000?", "What are their order dates?" ]
[ "SELECT * FROM Products where Product_price > 1000", "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" ]
What are the order dates of orders with price higher than 1000?
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
cre_Drama_Workshop_Groups
[ "What are the currency codes for all drama workshop groups?", "Only show the distinct ones.", "How many are there?" ]
[ "SELECT Currency_Code FROM Drama_Workshop_Groups", "SELECT DISTINCT Currency_Code FROM Drama_Workshop_Groups", "SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups" ]
How many distinct currency codes are there for all drama workshop groups?
SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups
cre_Drama_Workshop_Groups
[ "What are the addresses in Feliciaberg city?", "Show the drama workshop groups that are in those addresses." ]
[ "SELECT * FROM Addresses where City_Town = \"Feliciaberg\"", "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\"" ]
What are the names of the drama workshop groups with address in Feliciaberg city?
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"
cre_Drama_Workshop_Groups
[ "What are the addresses in Alaska state?", "Show the names of drama workshop groups that are using those addresses?" ]
[ "SELECT * FROM Addresses where State_County = \"Alaska\"", "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\"" ]
What are the email addresses of the drama workshop groups with address in Alaska state?
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"
cre_Drama_Workshop_Groups
[ "What are all the cities?", "How many drama workshop groups are in each of them?" ]
[ "SELECT City_Town FROM Addresses GROUP BY City_Town", "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" ]
Show all cities along with the number of drama workshop groups in each city.
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
cre_Drama_Workshop_Groups
[ "What are the market region codes of all the drama workshop groups?", "Which one of them has the most drama workshop groups?" ]
[ "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code", "SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1" ]
What is the marketing region code that has the most drama workshop groups?
SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1
cre_Drama_Workshop_Groups
[ "Show me all the cities.", "Which ones of them has at least one customer?", "Among those cities, show ones that has no performer." ]
[ "SELECT City_Town FROM Addresses", "SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID = T2.Address_ID", "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" ]
Show all cities where at least one customer lives in but no performer lives in.
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
cre_Drama_Workshop_Groups
[ "What are the status of all the bookings?", "Which one of them is the most frequent one?" ]
[ "SELECT distinct Status_Code FROM BOOKINGS", "SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY count(*) DESC LIMIT 1" ]
What is the most frequent status of bookings?
SELECT Status_Code FROM BOOKINGS GROUP BY Status_Code ORDER BY count(*) DESC LIMIT 1
cre_Drama_Workshop_Groups
[ "Which bookings have status code \"stop\"?", "Show the names of the workshop groups that have those bookings." ]
[ "SELECT * FROM BOOKINGS WHERE Status_Code = \"stop\"", "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\"" ]
What are the names of the workshop groups that have bookings with status code "stop"?
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"
cre_Drama_Workshop_Groups
[ "What are the names of all the clients?", "How about those who have no booking?" ]
[ "SELECT Customer_Name FROM Clients", "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" ]
Show the names of all the clients with no booking.
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
cre_Drama_Workshop_Groups
[ "What are all the invoices using \"MasterCard\"?", "Show the average quantities of them." ]
[ "SELECT * FROM Invoices WHERE payment_method_code = \"MasterCard\"", "SELECT avg(Order_Quantity) FROM Invoices WHERE payment_method_code = \"MasterCard\"" ]
What is the average quantities ordered with payment method code "MasterCard" on invoices?
SELECT avg(Order_Quantity) FROM Invoices WHERE payment_method_code = "MasterCard"
cre_Drama_Workshop_Groups
[ "What are the product IDs of all the invoices?", "Show the one that has been ordered the most." ]
[ "SELECT Product_ID FROM INVOICES", "SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1" ]
What is the product ID of the most frequently ordered item on invoices?
SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1
cre_Drama_Workshop_Groups
[ "How many hotels have 5 star ratings?", "Among the results, how many are hotels that allow pets?", "What one has the highest price range?", "Please show the average price range of these hotels." ]
[ "SELECT COUNT(*) FROM HOTELS WHERE star_rating_code = \"5\"", "SELECT COUNT(*) FROM HOTELS WHERE star_rating_code = \"5\" AND pets_allowed_yn = 1", "SELECT hotel_id FROM HOTELS WHERE star_rating_code = \"5\" AND pets_allowed_yn = 1 ORDER BY price_range DESC LIMIT 1", "SELECT avg(price_range) FROM HOTELS WHERE star_rating_code = \"5\" AND pets_allowed_yn = 1" ]
Show the average price range of hotels that have 5 star ratings and allow pets.
SELECT avg(price_range) FROM HOTELS WHERE star_rating_code = "5" AND pets_allowed_yn = 1
cre_Theme_park
[ "Please show the location names.", "Which one contains the word \"UK\"?", "Then, which one contains the word \"film\"?" ]
[ "SELECT Location_Name FROM LOCATIONS", "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE \"%UK%\"", "SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE \"%film%\"" ]
Which location names contain the word "film"?
SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%"
cre_Theme_park
[ "How many tourist attractions are there?", "How many of them could be accessed by bus or walking?", "Please show their names and opening hours." ]
[ "SELECT COUNT(*) FROM TOURIST_ATTRACTIONS", "SELECT COUNT(*) FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\" OR How_to_Get_There = \"walk\"", "SELECT Name , Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = \"bus\" OR How_to_Get_There = \"walk\"" ]
What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?
SELECT Name , Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There = "bus" OR How_to_Get_There = "walk"
cre_Theme_park
[ "How many hotels are there?", "What is the average price range of these hotels?", "How many of hotels have a price above 10000?", "Please show the star rating descriptions of these hotels." ]
[ "SELECT COUNT(*) FROM HOTELS", "SELECT AVG(price_range) FROM HOTELS", "SELECT COUNT(*) FROM HOTELS WHERE price_range > 10000", "SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000" ]
What are the star rating descriptions of the hotels with price above 10000?
SELECT T2.star_rating_description FROM HOTELS AS T1 JOIN Ref_Hotel_Star_Ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000
cre_Theme_park