aherntech/sparc huggingface dataset:
Database: architecture
Question sequence:
Which architects have nationality 'American' or 'Canadian'?
Find all mills that are built by these architects.
What are the distinct types of these mills?
SQL query sequence:
SELECT * FROM architect  WHERE nationality  =  'American' OR nationality  =  'Canadian'
SELECT * FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id  =  T2.id WHERE T2.nationality  =  'American' OR T2.nationality  =  'Canadian'
SELECT DISTINCT T1.type FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id  =  T2.id WHERE T2.nationality  =  'American' OR T2.nationality  =  'Canadian'
Final question: What are the distinct types of mills that are built by American or Canadian architects?
Final SQL: SELECT DISTINCT T1.type FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id  =  T2.id WHERE T2.nationality  =  'American' OR T2.nationality  =  'Canadian'
Database: architecture
Question sequence:
Find the id of the architect who built each bridge.
How many bridges did each one build?
What are the ids and names of those who built at least 3 bridges ?
SQL query sequence:
SELECT architect_id FROM bridge
SELECT count(*) FROM bridge GROUP BY architect_id
SELECT T1.id ,  T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  >=  3
Final question: What are the ids and names of the architects who built at least 3 bridges ?
Final SQL: SELECT T1.id ,  T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  >=  3
Database: architecture
Question sequence:
How many mills did each architect build?
Which architect built the most?
What are the id, name and nationality of this architect?
SQL query sequence:
SELECT count(*) FROM mill GROUP BY architect_id
SELECT * FROM architect AS T1 JOIN mill AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
SELECT T1.id ,  T1.name ,  T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
Final question: What is the id, name and nationality of the architect who built most mills?
Final SQL: SELECT T1.id ,  T1.name ,  T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1
Database: architecture
Question sequence:
How many bridges did each architect build?
What are the ids, names and genders of the architects who built two bridges?
How about for the architects who built two bridges or one mill?
SQL query sequence:
SELECT count(*) FROM bridge GROUP BY architect_id
SELECT T1.id ,  T1.name ,  T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  =  2
SELECT T1.id ,  T1.name ,  T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  =  2 UNION SELECT T1.id ,  T1.name ,  T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  =  1
Final question: What are the ids, names and genders of the architects who built two bridges or one mill?
Final SQL: SELECT T1.id ,  T1.name ,  T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  =  2 UNION SELECT T1.id ,  T1.name ,  T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  =  1
Database: architecture
Question sequence:
Show the location of each bridge.
What is it for the bridge named 'Kolob Arch'?
How about for the bridges named either 'Kolob Arch' or 'Rainbow Bridge'?
SQL query sequence:
SELECT LOCATION FROM bridge
SELECT LOCATION FROM bridge WHERE name  =  'Kolob Arch'
SELECT LOCATION FROM bridge WHERE name  =  'Kolob Arch' OR name  =  'Rainbow Bridge'
Final question: What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?
Final SQL: SELECT LOCATION FROM bridge WHERE name  =  'Kolob Arch' OR name  =  'Rainbow Bridge'
Database: architecture
Question sequence:
What are the names of mills?
Which ones contain the french word 'Moulin'?
SQL query sequence:
SELECT name FROM mill
SELECT name FROM mill WHERE name LIKE '%Moulin%'
Final question: Which of the mill names contains the french word 'Moulin'?
Final SQL: SELECT name FROM mill WHERE name LIKE '%Moulin%'
Database: architecture
Question sequence:
Which bridges have a length above 80 meters?
Show all the architects that have built each of these bridges.
What are the distinct name of the mills built by these architects?
SQL query sequence:
SELECT * FROM bridge WHERE length_meters  >  80
SELECT * FROM architect AS t2 JOIN bridge AS T3 ON T3.architect_id  =  T2.id WHERE T3.length_meters  >  80
SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id  =  T2.id JOIN bridge AS T3 ON T3.architect_id  =  T2.id WHERE T3.length_meters  >  80
Final question: What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?
Final SQL: SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id  =  T2.id JOIN bridge AS T3 ON T3.architect_id  =  T2.id WHERE T3.length_meters  >  80
Database: architecture
Question sequence:
Count the number of mill types.
What is the most common mill type?
Also provide the number of mills of this type.
SQL query sequence:
SELECT count(*) FROM mill GROUP BY TYPE
SELECT TYPE FROM mill GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
SELECT TYPE ,  count(*) FROM mill GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
Final question: What is the most common mill type, and how many are there?
Final SQL: SELECT TYPE ,  count(*) FROM mill GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
Database: architecture
Question sequence:
Find all mills that were built before year 1850.
What are the ids of the architects who built a mill before year 1850?
How many other architects are there?
SQL query sequence:
SELECT * FROM mill WHERE built_year  <  1850
SELECT architect_id FROM mill WHERE built_year  <  1850
SELECT count(*) FROM architect WHERE id NOT IN ( SELECT architect_id FROM mill WHERE built_year  <  1850 )
Final question: How many architects haven't built a mill before year 1850?
Final SQL: SELECT count(*) FROM architect WHERE id NOT IN ( SELECT architect_id FROM mill WHERE built_year  <  1850 );
Database: school_finance
Question sequence:
What is the maximum enrollment of all schools?
What is the total enrollment of these schools?
Please also show the average enrollment.
SQL query sequence:
SELECT max(enrollment) FROM school
SELECT sum(enrollment) FROM school
SELECT sum(enrollment) ,  avg(enrollment) FROM school
Final question: What are the total and average enrollment of all schools?
Final SQL: SELECT sum(enrollment) ,  avg(enrollment) FROM school
Database: school_finance
Question sequence:
How many different mascots are there?
What are they?
Which of them are from schools with enrollments above the average?
SQL query sequence:
SELECT COUNT(DISTINCT mascot) FROM school
SELECT DISTINCT mascot FROM school
SELECT mascot FROM school WHERE enrollment  >  (SELECT avg(enrollment) FROM school)
Final question: What are the mascots for schools with enrollments above the average?
Final SQL: SELECT mascot FROM school WHERE enrollment  >  (SELECT avg(enrollment) FROM school)
Database: school_finance
Question sequence:
What school has the largest enrollment?
What is its mascot?
What school has the smallest enrollment?
SQL query sequence:
SELECT school_name FROM school ORDER BY enrollment DESC LIMIT 1
SELECT mascot FROM school ORDER BY enrollment DESC LIMIT 1
SELECT school_name FROM school ORDER BY enrollment LIMIT 1
Final question: List the name of the school with the smallest enrollment.
Final SQL: SELECT school_name FROM school ORDER BY enrollment LIMIT 1
Database: school_finance
Question sequence:
What are the 3 largest enrollments of all schools?
What is the largest enrollment?
Please also show the average and minimum enrollment
SQL query sequence:
SELECT enrollment FROM school ORDER BY enrollment DESC LIMIT 3
SELECT max(enrollment) FROM school
SELECT avg(enrollment) ,  max(enrollment) ,  min(enrollment) FROM school
Final question: Show the average, maximum, minimum enrollment of all schools.
Final SQL: SELECT avg(enrollment) ,  max(enrollment) ,  min(enrollment) FROM school
Database: school_finance
Question sequence:
How many different counties are there?
How many schools are there in each county?
Please also show the total enrollment in each county.
SQL query sequence:
SELECT count(DISTINCT county) FROM school
SELECT county ,  count(*) FROM school GROUP BY county
SELECT county ,  count(*) ,  sum(enrollment) FROM school GROUP BY county
Final question: Show each county along with the number of schools and total enrollment in each county.
Final SQL: SELECT county ,  count(*) ,  sum(enrollment) FROM school GROUP BY county
Database: school_finance
Question sequence:
What is the location of the school named "Glenn"?
What is the largest endowment amount for this school?
How many donors have contributed to the endowment for this school?
SQL query sequence:
SELECT location FROM School WHERE school_name  =  "Glenn"
SELECT MAX(Amount) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  "Glenn"
SELECT count(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  "Glenn"
Final question: How many donors have endowment for school named "Glenn"?
Final SQL: SELECT count(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  "Glenn"
Database: school_finance
Question sequence:
How many donators are there?
What is the amount of endowment given by each donoator?
Please order them by the amount of endowment.
SQL query sequence:
SELECT COUNT(DISTINCT donator_name) FROM endowment
SELECT donator_name ,  sum(amount) FROM endowment GROUP BY donator_name
SELECT donator_name ,  sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC
Final question: List each donator name and the amount of endowment in descending order of the amount of endowment.
Final SQL: SELECT donator_name ,  sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC
Database: school_finance
Question sequence:
How many schools have an endowment?
How many schools do not have an endowment?
List the names of these schools.
SQL query sequence:
SELECT COUNT(*) FROM school WHERE school_id IN (SELECT school_id FROM endowment)
SELECT COUNT(*) FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment)
SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment)
Final question: List the names of the schools without any endowment.
Final SQL: SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment)
Database: school_finance
Question sequence:
What is the average endowment amount?
What is the minimum endowment amount?
How many endowments are there that have an amount smaller than or equal to 10?
List all the names of schools with this kind of endowment.
SQL query sequence:
SELECT AVG(amount) FROM endowment
SELECT MIN(amount) FROM endowment
SELECT COUNT(*) FROM endowment WHERE amount <= 10
SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T1.school_id HAVING sum(T1.amount)  <=  10
Final question: List all the names of schools with an endowment amount smaller than or equal to 10.
Final SQL: SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T1.school_id HAVING sum(T1.amount)  <=  10
Database: school_finance
Question sequence:
Who has donated to "Glenn"?
Who has donated to "Triton"?
Who has donated to both schools?
SQL query sequence:
SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  'Glenn'
SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  'Triton'
SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  'Triton'
Final question: Show the names of donors who donated to both school "Glenn" and "Triton"
Final SQL: SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  'Triton'
Database: school_finance
Question sequence:
How many donors are there?
How many donors are there that gave a donation amount less than 9?
Show the names of all the donors except these donors.
SQL query sequence:
SELECT COUNT(DISTINCT donator_name) FROM endowment
SELECT COUNT(DISTINCT donator_name) FROM endowment WHERE amount  <  9
SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount  <  9
Final question: Show the names of all the donors except those whose donation amount less than 9.
Final SQL: SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount  <  9
Database: school_finance
Question sequence:
How many endowments are there?
What is the largest endowment amount?
Please also show the donor name.
SQL query sequence:
SELECT COUNT(*) FROM endowment
SELECT amount FROM endowment ORDER BY amount DESC LIMIT 1
SELECT amount ,  donator_name FROM endowment ORDER BY amount DESC LIMIT 1
Final question: List the amount and donor name for the largest amount of donation.
Final SQL: SELECT amount ,  donator_name FROM endowment ORDER BY amount DESC LIMIT 1
Database: school_finance
Question sequence:
What is the average budget?
How many budgets are above 2000?
How about the number of budgets that are above 3000?
Which of them are in year 2001 or before?
SQL query sequence:
SELECT AVG(Budgeted) FROM budget
SELECT count(*) FROM budget WHERE budgeted  >  2000
SELECT count(*) FROM budget WHERE budgeted  >  3000
SELECT count(*) FROM budget WHERE budgeted  >  3000 AND YEAR  <=  2001
Final question: How many budgets are above 3000 in year 2001 or before?
Final SQL: SELECT count(*) FROM budget WHERE budgeted  >  3000 AND YEAR  <=  2001
Database: school_finance
Question sequence:
How many schools have a budget?
How about the number in year 2002 or after?
Please show school name, its budgeted amount, and invested amount
SQL query sequence:
SELECT COUNT(DISTINCT T1.School_id) FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id
SELECT COUNT(DISTINCT T1.School_id) FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T1.year  >=  2002
SELECT T2.school_name ,  T1.budgeted ,  T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T1.year  >=  2002
Final question: Show each school name, its budgeted amount, and invested amount in year 2002 or after.
Final SQL: SELECT T2.school_name ,  T1.budgeted ,  T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T1.year  >=  2002
Database: school_finance
Question sequence:
What is the mascot of the school 'Glenn'?
Please show the budget record of school 'Glenn'.
What is total budget amount for this school?
SQL query sequence:
SELECT mascot FROM school WHERE school_name  =  'Glenn'
SELECT * FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  'Glenn'
SELECT sum(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  'Glenn'
Final question: What is the total budget amount for school "Glenn" in all years?
Final SQL: SELECT sum(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  'Glenn'
Database: school_finance
Question sequence:
How many schools are there？
How many schools are there that have a total budget amount greater than 100?
How many schools are there have a total budget amount greater than 100 or a total endowment greater than 10?
Show the names of these schools.
SQL query sequence:
SELECT COUNT(*) FROM school
Select Count(*) From (SELECT COUNT(DISTINCT T2.school_name) FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T2.school_name HAVING sum(T1.budgeted)  >  100)
SELECT COUNT(*) FROM (SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id JOIN endowment AS T3 ON T2.school_id  =  T3.school_id GROUP BY T2.school_name HAVING sum(T1.budgeted)  >  100 OR sum(T3.amount)  >  10)
SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id JOIN endowment AS T3 ON T2.school_id  =  T3.school_id GROUP BY T2.school_name HAVING sum(T1.budgeted)  >  100 OR sum(T3.amount)  >  10
Final question: Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.
Final SQL: SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id JOIN endowment AS T3 ON T2.school_id  =  T3.school_id GROUP BY T2.school_name HAVING sum(T1.budgeted)  >  100 OR sum(T3.amount)  >  10
Database: school_finance
Question sequence:
What is the average donation amount?
How many donators does each school have?
Which schools have more than one donator?
Among these schools, which schools have one donator with a donation amount above 8.5?
SQL query sequence:
SELECT AVG(amount) FROM endowment
SELECT T2.School_name, COUNT(*) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T1.school_id
SELECT T2.School_name, COUNT(*) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id GROUP BY T1.school_id HAVING count(*)  >  1
SELECT T2.School_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T1.amount  >  8.5 GROUP BY T1.school_id HAVING count(*)  >  1
Final question: Find the names of schools that have more than one donator with donation amount above 8.5.
Final SQL: SELECT T2.School_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T1.amount  >  8.5 GROUP BY T1.school_id HAVING count(*)  >  1
Database: school_finance
Question sequence:
How many schools are there?
How many donations are there that are less than 8.5?
How many schools have more than one donator?
Among these schools, how many of them have more than one donator whose donation amount is less than 8.5?
SQL query sequence:
SELECT COUNT(*) FROM school
SELECT COUNT(*) FROM endowment WHERE amount  <  8.5
SELECT count(*) FROM (SELECT * FROM endowment GROUP BY school_id HAVING count(*)  >  1)
SELECT count(*) FROM (SELECT * FROM endowment WHERE amount  <  8.5 GROUP BY school_id HAVING count(*)  >  1)
Final question: Find the number of schools that have more than one donator whose donation amount is less than 8.5.
Final SQL: SELECT count(*) FROM (SELECT * FROM endowment WHERE amount  <  8.5 GROUP BY school_id HAVING count(*)  >  1)
Database: film_rank
Question sequence:
What countries are there in the market?
What about their number of cities?
Among those, show me the maximum and minimum.
SQL query sequence:
SELECT Country FROM Market
SELECT country, Number_cities FROM market
SELECT max(Number_cities) ,  min(Number_cities) FROM market
Final question: What are the maximum and minimum number of cities in all markets.
Final SQL: SELECT max(Number_cities) ,  min(Number_cities) FROM market
Database: film_rank
Question sequence:
How many film market estimations are there in record?
Show me the ones in the year of 1995.
Give me the distinct directors of films in those estimations.
SQL query sequence:
SELECT count(*) FROM film_market_estimation
SELECT * FROM film_market_estimation WHERE year = 1995
SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID  =  T2.Film_ID WHERE T2.Year  =  1995
Final question: Show the distinct director of films with market estimation in the year of 1995.
Final SQL: SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID  =  T2.Film_ID WHERE T2.Year  =  1995
Database: film_rank
Question sequence:
Show me all different market ids in any film market estimation.
Show me those with a low estimate above 10000.
What is the average number of cities of them?
SQL query sequence:
SELECT DISTINCT market_id FROM film_market_estimation
SELECT market_id FROM film_market_estimation GROUP BY market_id HAVING max(Low_Estimate) > 10000
SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID WHERE T1.Low_Estimate  >  10000
Final question: What is the average number of cities of markets with low film market estimate bigger than 10000?
Final SQL: SELECT avg(T2.Number_cities) FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID WHERE T1.Low_Estimate  >  10000
Database: film_rank
Question sequence:
How many film market estimations are there?
Show me the year eash estimation was made.
What about those in the market Japan?
List them in descending order.
SQL query sequence:
SELECT count(*) FROM film_market_estimation
SELECT Year From film_market_estimation
SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID WHERE T2.Country  =  "Japan"
SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID WHERE T2.Country  =  "Japan" ORDER BY T1.Year DESC
Final question: Please list the years of film market estimations when the market is in country "Japan" in descending order.
Final SQL: SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID WHERE T2.Country  =  "Japan" ORDER BY T1.Year DESC
Database: film_rank
Question sequence:
How many films are there?
Show me all film studios in record.
How many films does each of them have?
Show me the name of the studio that have the most.
SQL query sequence:
SELECT COUNT(*) FROM FILM
SELECT distinct Studio FROM FILM
SELECT Studio, COUNT(*) FROM film GROUP BY Studio
SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1
Final question: List the name of film studio that have the most number of films.
Final SQL: SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1
Database: film_rank
Question sequence:
How many films are there?
Show me all film studios in record.
How many films does each of them have?
Show me the name of the studios that have at least two.
SQL query sequence:
SELECT COUNT(*) FROM FILM
SELECT distinct Studio FROM FILM
SELECT Studio, COUNT(*) FROM film GROUP BY Studio
SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*)  >=  2
Final question: List the names of studios that have at least two films.
Final SQL: SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*)  >=  2
Database: film_rank
Question sequence:
How many film market estimations are there?
Show me the id of films that are in one of those estimations.
Show me the title of films that are not one of those.
SQL query sequence:
SELECT count(*) FROM film_market_estimation
SELECT distinct film_id FROM film_market_estimation
SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)
Final question: List the title of films that do not have any market estimation.
Final SQL: SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)
Database: film_rank
Question sequence:
Show me all film studios in record.
Show me all the directors in record.
Which studios have produced films with Nicholas Mayer?
Among those studios, which of them also have films with Walter Hill?
SQL query sequence:
SELECT distinct Studio FROM FILM
SELECT DISTINCT Director FROM film
SELECT Studio FROM film WHERE Director  =  "Nicholas Meyer"
SELECT Studio FROM film WHERE Director  =  "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director  =  "Walter Hill"
Final question: Show the studios that have produced films with director "Nicholas Meyer" and "Walter Hill".
Final SQL: SELECT Studio FROM film WHERE Director  =  "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director  =  "Walter Hill"