aherntech/sparc huggingface dataset:
Database: products_gen_characteristics
Question sequence:
What are the buying prices of the products with selling price < 500?
Show their names instead.
Of those, narrow down to ones with color "red" as well.
Remove the restriction of selling price.
How many are there?
Restrict also to those with characteristic named "slow" as well.
SQL query sequence:
SELECT typical_buying_price FROM products WHERE typical_selling_price < 500
SELECT product_name FROM products WHERE typical_selling_price < 500
SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE  t1.typical_selling_price < 500 AND t2.color_description = "red"
SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "red"
SELECT count(*) FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t2.color_description = "red"
SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "red" AND t3.characteristic_name  =  "slow"
Final question: Find the number of the products that have their color described as "red" and have a characteristic named "slow".
Final SQL: SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "red" AND t3.characteristic_name  =  "slow"
Database: products_gen_characteristics
Question sequence:
Show the names of products that have buying price > 100
How many are there?
What about for those with color description "red"?
Show the ones with color description "white" instead.
They can also be having the characteristic name "hot".
SQL query sequence:
SELECT product_name FROM products WHERE typical_buying_price > 100
SELECT count(*) FROM products WHERE typical_buying_price > 100
SELECT count(*) FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE  t2.color_description = "red"
SELECT count(*) FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE  t2.color_description = "white"
SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "white" OR t3.characteristic_name  =  "hot"
Final question: Count the products that have the color description "white" or have the characteristic name "hot".
Final SQL: SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "white" OR t3.characteristic_name  =  "hot"
Database: products_gen_characteristics
Question sequence:
What is the typical selling price of the product named "catnip"?
Show its color description instead.
Give its unit of measurement instead.
SQL query sequence:
SELECT typical_selling_price FROM products WHERE product_name = "catnip"
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "catnip"
SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "cumin"
Final question: What is the unit of measurement of product named "cumin"?
Final SQL: SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "cumin"
Database: products_gen_characteristics
Question sequence:
What is the color of the product named "ginger"?
Show its unit of measurement instead.
Give the product category code as well.
Do this for the product named "chervil" instead.
SQL query sequence:
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code WHERE t1.product_name = "ginger"
SELECT t2.unit_of_measure FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "ginger"
SELECT t2.unit_of_measure ,  t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "ginger"
SELECT t2.unit_of_measure ,  t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "chervil"
Final question: Find the unit of measurement and product category code of product named "chervil".
Final SQL: SELECT t2.unit_of_measure ,  t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "chervil"
Database: products_gen_characteristics
Question sequence:
What are the product names that are not product category code "Herbs"?
Show the same, but for those with unit of measurement "Handful" instead.
What about the opposite condition?
Of these, show for the ones that are colored "white" too.
SQL query sequence:
SELECT product_name FROM products WHERE product_category_code != "Herbs"
SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t2.unit_of_measure = "Handul"
SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t2.unit_of_measure != "Handul"
SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code  =  t3.color_code WHERE t3.color_description  =  "white" AND t2.unit_of_measure != "Handful"
Final question: Find the product names that are colored 'white' but do not have unit of measurement "Handful".
Final SQL: SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code  =  t3.color_code WHERE t3.color_description  =  "white" AND t2.unit_of_measure != "Handful"
Database: products_gen_characteristics
Question sequence:
What are the product names in decreasing order of typical selling price?
Order by decreasing order of color frequency instead.
Show their respective color descriptions.
Show only for the most frequent color description.
SQL query sequence:
SELECT product_name FROM products ORDER BY typical_selling_price DESC
SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1
Final question: What is the description of the color for most products?
Final SQL: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1
Database: products_gen_characteristics
Question sequence:
What is the most frequent product category code of the products?
What about the color description instead?
Give the least frequent now.
SQL query sequence:
SELECT product_category_code FROM products GROUP BY product_category_code ORDER BY count(*) DESC LIMIT 1
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) DESC LIMIT 1
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1
Final question: What is the description of the color used by least products?
Final SQL: SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1
Database: products_gen_characteristics
Question sequence:
What are the product category codes used of the products?
What is the ones used most frequently?
What about for the characteristic name instead?
SQL query sequence:
SELECT product_category_code FROM products
SELECT product_category_code FROM products GROUP BY product_category_code ORDER BY count(*) DESC LIMIT 1
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1
Final question: What is the characteristic name used by most number of the products?
Final SQL: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1
Database: products_gen_characteristics
Question sequence:
What are the names, details and data types of the characteristics?
Show these for the ones used in products.
Show the ones that are not used.
SQL query sequence:
SELECT characteristic_name ,  other_characteristic_details ,  characteristic_data_type FROM characteristics
SELECT characteristic_name ,  other_characteristic_details ,  characteristic_data_type FROM characteristics AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id = t2.characteristic_id
SELECT characteristic_name ,  other_characteristic_details ,  characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name ,  t1.other_characteristic_details ,  t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id  =  t2.characteristic_id
Final question: What are the names, details and data types of the characteristics which are never used by any product?
Final SQL: SELECT characteristic_name ,  other_characteristic_details ,  characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name ,  t1.other_characteristic_details ,  t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id  =  t2.characteristic_id
Database: products_gen_characteristics
Question sequence:
What are the color descriptions?
Which ones are used only once across all the products?
How about for the characteristic names?
Show the ones that are used at least twice.
SQL query sequence:
SELECT color_description FROM ref_colors
SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code = t2.color_code GROUP BY t2.color_description HAVING count(*) = 1
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*)  = 1
SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*)  >= 2
Final question: What are characteristic names used at least twice across all products?
Final SQL: SELECT t3.characteristic_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id GROUP BY t3.characteristic_name HAVING count(*)  >= 2
Database: program_share
Question sequence:
List all channel names.
Order them by rating ratio from highest to lowest.
Which one has the highest rating?
Who is the owner?
SQL query sequence:
SELECT name FROM channel
SELECT name FROM channel ORDER BY rating_in_percent DESC
SELECT name FROM channel ORDER BY rating_in_percent DESC LIMIT 1
SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1
Final question: What is the owner of the channel that has the highest rating ratio?
Final SQL: SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1
Database: program_share
Question sequence:
What are the program names?
Order by launch date from most recent to least recent.
Which one was launched most recently?
SQL query sequence:
SELECT name FROM program
SELECT name FROM program ORDER BY launch DESC
SELECT name FROM program ORDER BY launch DESC LIMIT 1
Final question: find the name of the program that was launched most recently.
Final SQL: SELECT name FROM program ORDER BY launch DESC LIMIT 1
Database: program_share
Question sequence:
List all channel names.
When are they broadcasted?
Which ones are broadcasted in the morning?
SQL query sequence:
SELECT name FROM channel
SELECT t1.name, t2.time_of_day FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id  =  t2.channel_id
SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id  =  t2.channel_id WHERE t2.time_of_day  =  'Morning'
Final question: Find the names of the channels that are broadcast in the morning.
Final SQL: SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id  =  t2.channel_id WHERE t2.time_of_day  =  'Morning'
Database: program_share
Question sequence:
Please list the names of all channels.
Include the time of day that they are broadcasted.
Which ones broadcast in the morning?
Out of those channels, which ones also broadcast at night?
SQL query sequence:
SELECT name FROM channel
SELECT t1.name, t2.time_of_day FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id  =  t2.channel_id
SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id  =  t2.channel_id WHERE t2.time_of_day  =  'Morning'
SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id  =  t2.channel_id WHERE t2.time_of_day  =  'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id  =  t2.channel_id WHERE t2.time_of_day  =  'Night'
Final question: what are the names of the channels that broadcast in both morning and night?
Final SQL: SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id  =  t2.channel_id WHERE t2.time_of_day  =  'Morning' INTERSECT SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id  =  t2.channel_id WHERE t2.time_of_day  =  'Night'
Database: program_share
Question sequence:
What are the names of all programs?
When are they broadcasted?
Which ones are broadcasted in the morning?
What about the ones that are not broadcasted in the morning?
SQL query sequence:
SELECT name FROM program
SELECT t1.name, t2.time_of_day FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id
SELECT t1.name, t2.time_of_day FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Morning"
SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Morning"
Final question: Find the names of programs that are never broadcasted in the morning.
Final SQL: SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Morning"
Database: program_share
Question sequence:
List the names of all programs.
Include their broadcast times.
Which ones are broadcasted in both morning and night?
Who are the owners of these programs?
SQL query sequence:
SELECT name FROM program
SELECT t1.name, t2.time_of_day FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id
SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.time_of_day  =  'Morning' INTERSECT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.time_of_day  =  'Night'
SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Morning" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Night"
Final question: find the program owners that have some programs in both morning and night time.
Final SQL: SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Morning" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Night"
Database: program_share
Question sequence:
List the names of all channels.
Which channels are owned by CCTV?
Include those owned by HBS.
SQL query sequence:
SELECT name FROM channel
SELECT name FROM channel WHERE OWNER  =  'CCTV'
SELECT name FROM channel WHERE OWNER  =  'CCTV' OR OWNER  =  'HBS'
Final question: What are the names of the channels owned by CCTV or HBS?
Final SQL: SELECT name FROM channel WHERE OWNER  =  'CCTV' OR OWNER  =  'HBS'
Database: swimming
Question sequence:
How many events are there in the record?
Show me their names.
Which ones happened in the most recent year?
SQL query sequence:
SELECT count(*) FROM event
SELECT name FROM event
SELECT name FROM event ORDER BY YEAR DESC LIMIT 1
Final question: What is the name of the event that happened in the most recent year?
Final SQL: SELECT name FROM event ORDER BY YEAR DESC LIMIT 1
Database: swimming
Question sequence:
How many stadiums are there in the system?
What are their names?
Show me the one with maximum capacity.
SQL query sequence:
SELECT count(*) FROM stadium
SELECT name FROM stadium
SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1
Final question: Find the name of the stadium that has the maximum capacity.
Final SQL: SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1
Database: swimming
Question sequence:
How many stadiums are there in the system?
What are their names?
Give me their capacities.
What is the average capacity?
Show me the stadiums whose capacity is smaller than that.
SQL query sequence:
SELECT count(*) FROM stadium
SELECT name FROM stadium
SELECT name, capacity FROM stadium
SELECT avg(capacity) FROM stadium
SELECT name FROM stadium WHERE capacity  <  (SELECT avg(capacity) FROM stadium)
Final question: Find the names of stadiums whose capacity is smaller than the average capacity.
Final SQL: SELECT name FROM stadium WHERE capacity  <  (SELECT avg(capacity) FROM stadium)
Database: swimming
Question sequence:
How many stadiums are there in file?
What about in terms of different countries?
Show me the country with the most of them.
SQL query sequence:
SELECT count(*) FROM Stadium
SELECT Country, count(*) FROM Stadium GROUP BY country
SELECT country FROM stadium GROUP BY country ORDER BY count(*) DESC LIMIT 1
Final question: Find the country that has the most stadiums.
Final SQL: SELECT country FROM stadium GROUP BY country ORDER BY count(*) DESC LIMIT 1
Database: swimming
Question sequence:
How many stadiums are there in file?
What about in terms of different countries?
Show me the countries with at most three.
SQL query sequence:
SELECT count(*) FROM Stadium
SELECT Country, count(*) FROM Stadium GROUP BY country
SELECT country FROM stadium GROUP BY country HAVING count(*)  <=  3
Final question: Which country has at most 3 stadiums listed?
Final SQL: SELECT country FROM stadium GROUP BY country HAVING count(*)  <=  3
Database: swimming
Question sequence:
How many stadiums are there in file?
What about in terms of different countries?
Show me the countries that have stadiums with capacity greater than 60000.
Among them, which ones also have stadiums with capacity less than 50000.
SQL query sequence:
SELECT count(*) FROM Stadium
SELECT Country, count(*) FROM Stadium GROUP BY country
SELECT country FROM stadium WHERE capacity  >  60000
SELECT country FROM stadium WHERE capacity  >  60000 INTERSECT SELECT country FROM stadium WHERE capacity  <  50000
Final question: Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?
Final SQL: SELECT country FROM stadium WHERE capacity  >  60000 INTERSECT SELECT country FROM stadium WHERE capacity  <  50000
Database: swimming
Question sequence:
Show me the name of all stadiums.
What about their opening years?
Only list those opened after 2006.
Show me the countries which has any of those stadiums.
What about the countries in file that are not among them.
SQL query sequence:
SELECT Name FROM stadium
SELECT Name,opening_year FROM stadium
SELECT Name,opening_year FROM stadium WHERE opening_year > 2006
SELECT country FROM stadium WHERE opening_year  >  2006
SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year  >  2006
Final question: Which countries do not have a stadium that was opened after 2006?
Final SQL: SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year  >  2006
Database: swimming
Question sequence:
How many swimmers are there in record?
What about in terms of nationality?
Show me the countries with more than one.
SQL query sequence:
SELECT count(*) FROM swimmer
SELECT nationality ,  count(*) FROM swimmer GROUP BY nationality
SELECT nationality ,  count(*) FROM swimmer GROUP BY nationality HAVING count(*)  >  1
Final question: List countries that have more than one swimmer.
Final SQL: SELECT nationality ,  count(*) FROM swimmer GROUP BY nationality HAVING count(*)  >  1
Database: swimming
Question sequence:
How many swimming records are there?
How many of them have a result of win?
Show me the swimmer ids in those records.
What are their names?
SQL query sequence:
SELECT count(*) FROM record
SELECT count(*) FROM record WHERE result = 'Win'
SELECT swimmer_id FROM record WHERE result = 'Win'
SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win'
Final question: Find the names of swimmers who has a result of "win".
Final SQL: SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id WHERE RESULT  =  'Win'
Database: swimming
Question sequence:
How many events are there?
What about in terms of stadiums?
Give me the name of the one that held the most of them.
SQL query sequence:
SELECT count(*) FROM event
SELECT stadium_id,count(*) FROM event GROUP BY stadium_id
SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id  =  t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1
Final question: What is the name of the stadium which held the most events?
Final SQL: SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id  =  t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1
Database: swimming
Question sequence:
How many events are there?
What are their names?
Show me the name of the stadium that held World Junior event.
SQL query sequence:
SELECT count(*) FROM event
SELECT Name FROM event
SELECT t1.name ,  t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id  =  t2.stadium_id WHERE t2.name  =  'World Junior'
Final question: Find the name and capacity of the stadium where the event named "World Junior" happened.
Final SQL: SELECT t1.name ,  t1.capacity FROM stadium AS t1 JOIN event AS t2 ON t1.id  =  t2.stadium_id WHERE t2.name  =  'World Junior'
Database: swimming
Question sequence:
How many events are there?
Give me the id of stadiums that have held any of them.
What about the stadium ids in file that are not among those?
Show me their names.
SQL query sequence:
SELECT count(*) FROM event
SELECT stadium_id FROM event
SELECT id FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)
SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)
Final question: Find the names of stadiums which have never had any event.
Final SQL: SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)