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 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?"
] | [
"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\""
] | How many donors have endowment for school named "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" | school_finance |
[
"How many donators are there?",
"What is the amount of endowment given by each donoator?",
"Please order them by the amount of endowment."
] | [
"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"
] | List each donator name and the amount of endowment in descending order of the amount of endowment. | SELECT donator_name , sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC | school_finance |
[
"How many schools have an endowment?",
"How many schools do not have an endowment?",
"List the names of these schools."
] | [
"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)"
] | List the names of the schools without any endowment. | SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment) | school_finance |
[
"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."
] | [
"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"
] | List all the names of schools with an endowment amount smaller than or equal to 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 | school_finance |
[
"Who has donated to \"Glenn\"?",
"Who has donated to \"Triton\"?",
"Who has donated to both schools?"
] | [
"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'"
] | Show the names of donors who donated to both school "Glenn" and "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' | school_finance |
[
"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."
] | [
"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"
] | Show the names of all the donors except those whose donation amount less than 9. | SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount < 9 | school_finance |
[
"How many endowments are there?",
"What is the largest endowment amount?",
"Please also show the donor name."
] | [
"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"
] | List the amount and donor name for the largest amount of donation. | SELECT amount , donator_name FROM endowment ORDER BY amount DESC LIMIT 1 | school_finance |
[
"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?"
] | [
"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"
] | How many budgets are above 3000 in year 2001 or before? | SELECT count(*) FROM budget WHERE budgeted > 3000 AND YEAR <= 2001 | school_finance |
[
"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"
] | [
"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"
] | Show each school name, its budgeted amount, and invested amount in year 2002 or after. | 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 | school_finance |
[
"What is the mascot of the school 'Glenn'?",
"Please show the budget record of school 'Glenn'.",
"What is total budget amount for this school?"
] | [
"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'"
] | What is the total budget amount for school "Glenn" in all years? | SELECT sum(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' | school_finance |
[
"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."
] | [
"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"
] | Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 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 | school_finance |
[
"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?"
] | [
"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"
] | Find the names of schools that have more than one donator with donation amount above 8.5. | 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 | school_finance |
[
"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?"
] | [
"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)"
] | Find the number of schools that have more than one donator whose donation amount is less than 8.5. | SELECT count(*) FROM (SELECT * FROM endowment WHERE amount < 8.5 GROUP BY school_id HAVING count(*) > 1) | school_finance |
[
"What countries are there in the market?",
"What about their number of cities?",
"Among those, show me the maximum and minimum."
] | [
"SELECT Country FROM Market",
"SELECT country, Number_cities FROM market",
"SELECT max(Number_cities) , min(Number_cities) FROM market"
] | What are the maximum and minimum number of cities in all markets. | SELECT max(Number_cities) , min(Number_cities) FROM market | film_rank |
[
"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."
] | [
"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"
] | Show the distinct director of films with market estimation in the year of 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 | film_rank |
[
"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?"
] | [
"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"
] | What is the average number of cities of markets with low film market estimate bigger than 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 | film_rank |
[
"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."
] | [
"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"
] | Please list the years of film market estimations when the market is in country "Japan" in descending order. | 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 | film_rank |
[
"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."
] | [
"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"
] | List the name of film studio that have the most number of films. | SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1 | film_rank |
[
"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."
] | [
"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"
] | List the names of studios that have at least two films. | SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*) >= 2 | film_rank |
[
"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."
] | [
"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)"
] | List the title of films that do not have any market estimation. | SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation) | film_rank |
[
"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?"
] | [
"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\""
] | Show the studios that have produced films with director "Nicholas Meyer" and "Walter Hill". | SELECT Studio FROM film WHERE Director = "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director = "Walter Hill" | film_rank |
[
"Show me all film studios in record.",
"Which ones contain the word \"Universal\"?",
"Show me the titles of their films along with their name."
] | [
"SELECT distinct Studio FROM FILM",
"SELECT distinct Studio FROM FILM WHERE Studio LIKE \"%Universal%\"",
"SELECT title , Studio FROM film WHERE Studio LIKE \"%Universal%\""
] | Find the titles and studios of the films that are produced by some film studios that contained the word "Universal". | SELECT title , Studio FROM film WHERE Studio LIKE "%Universal%" | film_rank |
[
"Show me the name of all directors.",
"Which studios did Walter Hill work with?",
"Show me studios that are not among them."
] | [
"SELECT Director FROM film",
"SELECT Studio FROM film WHERE Director = \"Walter Hill\"",
"SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = \"Walter Hill\""
] | Show the studios that have not produced films with director "Walter Hill". | SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director = "Walter Hill" | film_rank |
[
"Show me all film studios in record.",
"What are the maximum gross for their films?",
"What about the average?",
"Show me the name of studios that have average above 4500000."
] | [
"SELECT distinct Studio FROM FILM",
"SELECT Studio, max(Gross_in_dollar) FROM FILM GROUP BY studio",
"SELECT Studio, min(Gross_in_dollar) FROM FILM GROUP BY studio",
"SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000"
] | List the studios which average gross is above 4500000. | SELECT Studio FROM film GROUP BY Studio HAVING avg(Gross_in_dollar) >= 4500000 | film_rank |
[
"Show me the title of all films that have market estimation.",
"What are their high market estimations?",
"Show me the film that is the highest of them."
] | [
"SELECT distinct T1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID",
"SELECT t1.title, t2.high_estimate FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID",
"SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1"
] | What is the title of the film that has the highest high market estimation. | SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID ORDER BY high_estimate DESC LIMIT 1 | film_rank |
[
"What are all the parties?",
"How many are there?"
] | [
"SELECT * FROM party",
"SELECT count(*) FROM party"
] | How many parties are there? | SELECT count(*) FROM party | party_host |
[
"What are all the parties?",
"Order them by the number of hosts.",
"Only show the Party_Theme in that order."
] | [
"SELECT * FROM party",
"SELECT * FROM party ORDER BY Number_of_hosts ASC",
"SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC"
] | List the themes of parties in ascending order of number of hosts. | SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC | party_host |
[
"What are all the parties?",
"what are their themes and locations?"
] | [
"SELECT * FROM party",
"SELECT Party_Theme , LOCATION FROM party"
] | What are the themes and locations of parties? | SELECT Party_Theme , LOCATION FROM party | party_host |
[
"What are all the parties?",
"What about those with theme \"Spring\" or \"Teqnology\"?",
"Show their first year and last year."
] | [
"SELECT * FROM party",
"SELECT * FROM party WHERE Party_Theme = \"Spring\" OR Party_Theme = \"Teqnology\"",
"SELECT First_year , Last_year FROM party WHERE Party_Theme = \"Spring\" OR Party_Theme = \"Teqnology\""
] | Show the first year and last year of parties with theme "Spring" or "Teqnology". | SELECT First_year , Last_year FROM party WHERE Party_Theme = "Spring" OR Party_Theme = "Teqnology" | party_host |
[
"What are all the parties?",
"What are their number of hosts?",
"Show the average of them."
] | [
"SELECT * FROM party",
"SELECT Number_of_hosts FROM party",
"SELECT avg(Number_of_hosts) FROM party"
] | What is the average number of hosts for parties? | SELECT avg(Number_of_hosts) FROM party | party_host |
[
"What are all the parties?",
"Order them by the number of hosts.",
"Show the location of the top one."
] | [
"SELECT * FROM party",
"SELECT * FROM party ORDER BY Number_of_hosts",
"SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1"
] | What is the location of the party with the most hosts? | SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1 | party_host |
[
"Who are all the hosts?",
"What are the different nationalities among them?",
"Please also show the number of hosts along with each nationality."
] | [
"SELECT * FROM HOST",
"SELECT Nationality FROM HOST GROUP BY Nationality",
"SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality"
] | Show different nationalities along with the number of hosts of each nationality. | SELECT Nationality , COUNT(*) FROM HOST GROUP BY Nationality | party_host |
[
"Who are all the hosts?",
"What are the different nationalities among them?",
"Order them by the number of host in each nationality.",
"Show the top one."
] | [
"SELECT * FROM HOST",
"SELECT Nationality FROM HOST GROUP BY Nationality",
"SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*)",
"SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1"
] | Show the most common nationality of hosts. | SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 | party_host |
[
"Who are all the hosts?",
"Show hosts who are older than 45.",
"Show hosts who are younger than 35.",
"Show the nations that have hosts from above two results at the same time."
] | [
"SELECT * FROM HOST",
"SELECT * FROM HOST WHERE Age > 45",
"SELECT * FROM HOST WHERE Age < 35",
"SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35"
] | Show the nations that have both hosts older than 45 and hosts younger than 35. | SELECT Nationality FROM HOST WHERE Age > 45 INTERSECT SELECT Nationality FROM HOST WHERE Age < 35 | party_host |
[
"Who are all the party hosts?",
"What are their names?",
"Show the themes of parties they host along with their name."
] | [
"SELECT * FROM party_host",
"SELECT T2.NAME FROM party_host as T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID",
"SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID"
] | Show the themes of parties and the names of the party hosts. | SELECT T3.Party_Theme , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID | party_host |
[
"Who are all the party hosts?",
"What are their names?",
"Show the locations of parties they host along with their names.",
"Order them by the age of the host."
] | [
"SELECT * FROM party_host",
"SELECT T2.NAME FROM party_host as T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID",
"SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID",
"SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age"
] | Show the locations of parties and the names of the party hosts in ascending order of the age of the host. | SELECT T3.Location , T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID ORDER BY T2.Age | party_host |
[
"Who are all the party hosts?",
"Show the name of those who are order than 50.",
"What about the locations of parties they host?"
] | [
"SELECT * FROM party_host",
"SELECT T2.name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID WHERE T2.Age > 50",
"SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50"
] | Show the locations of parties with hosts older than 50. | SELECT T3.Location FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T2.Age > 50 | party_host |
[
"Show me all parties.",
"Show those with more than 20 hosts.",
"What are the host names for those parties?"
] | [
"SELECT * FROM party",
"SELECT * FROM party where Number_of_hosts > 20",
"SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20"
] | Show the host names for parties with number of hosts greater than 20. | SELECT T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID = T2.Host_ID JOIN party AS T3 ON T1.Party_ID = T3.Party_ID WHERE T3.Number_of_hosts > 20 | party_host |
[
"Who are all the hosts?",
"Who is the oldest one?",
"Show the name and the nationality of that host."
] | [
"SELECT * FROM HOST",
"SELECT * FROM HOST ORDER BY Age DESC LIMIT 1",
"SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1"
] | Show the name and the nationality of the oldest host. | SELECT Name , Nationality FROM HOST ORDER BY Age DESC LIMIT 1 | party_host |
[
"Show me the name of all the ships.",
"Which of them belong to United states?",
"Include those that belong to United Kingdom."
] | [
"SELECT name FROM ship",
"SELECT Name FROM ship WHERE Nationality = \"United States\"",
"SELECT Name FROM ship WHERE Nationality = \"United States\" OR Nationality = \"United Kingdom\""
] | Show the name of ships whose nationality is either United States or United Kingdom. | SELECT Name FROM ship WHERE Nationality = "United States" OR Nationality = "United Kingdom" | ship_mission |
[
"Show me the name of all the ships.",
"Which one has the largest tonnage?"
] | [
"SELECT name FROM ship",
"SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1"
] | What is the name of the ship with the largest tonnage? | SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1 | ship_mission |
[
"What are the types of ships?",
"Which type is the most common?"
] | [
"SELECT TYPE FROM ship",
"SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1"
] | Please show the most common type of ships. | SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | ship_mission |
[
"What nations are there?",
"How many ships are there?",
"How many ships does each nation have?",
"Show me nations that have more than two ships."
] | [
"SELECT Nationality FROM ship",
"SELECT count(*) FROM ship",
"SELECT Nationality, count(*) FROM ship group by Nationality",
"SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2"
] | List the nations that have more than two ships. | SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*) > 2 | ship_mission |
[
"What are the name of all the ships?",
"Give me missions that were launched after 1928.",
"Which ships were involved in any of those?"
] | [
"SELECT NAME FROM ship",
"SELECT * FROM Mission where Launched_Year > 1928",
"SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928"
] | Show names of ships involved in a mission launched after 1928. | SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T1.Launched_Year > 1928 | ship_mission |
[
"How many ships are there?",
"Which of them are from United States?",
"Show me the distinct fate of missions that involve any of those."
] | [
"SELECT COUNT(*) FROM ship",
"SELECT * FROM ship WHERE Nationality = \"United States\"",
"SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = \"United States\""
] | Show the distinct fate of missions that involve ships with nationality "United States" | SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID = T2.Ship_ID WHERE T2.Nationality = "United States" | ship_mission |
[
"What are all the missions?",
"Which ship is involved in any of them?",
"Give me the name of ships which are not among those."
] | [
"SELECT * FROM MISSION",
"SELECT Ship_ID FROM mission",
"SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)"
] | List the name of ships that are not involved in any mission | SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission) | ship_mission |
[
"Tell me the industry of JPMorgan Chase.",
"How about its market value?",
"Tell me the names of companies in the banking or retailing industry."
] | [
"SELECT Industry FROM company WHERE Name = \"JPMorgan Chase\"",
"SELECT Market_Value_in_Billion FROM company WHERE Name = \"JPMorgan Chase\"",
"SELECT Name FROM company WHERE Industry = \"Banking\" OR Industry = \"Retailing\""
] | Show the names of companies in the banking or retailing industry? | SELECT Name FROM company WHERE Industry = "Banking" OR Industry = "Retailing" | company_employee |
[
"Tell me the headquarters of the company HSBC.",
"What is its market value?",
"What is the maximum and minimum market value of companies."
] | [
"SELECT Headquarters FROM company WHERE Name = \"HSBC\"",
"SELECT Market_Value_in_Billion FROM company WHERE Name = \"HSBC\"",
"SELECT max(Market_Value_in_Billion) , min(Market_Value_in_Billion) FROM company"
] | What is the maximum and minimum market value of companies? | SELECT max(Market_Value_in_Billion) , min(Market_Value_in_Billion) FROM company | company_employee |
[
"Tell me the sales of HSBC.",
"How about that of PetroChina?",
"What is the headquarters of the company with the largest sales?"
] | [
"SELECT Sales_in_Billion FROM company WHERE Name = \"HSBC\"",
"SELECT Sales_in_Billion FROM company WHERE Name = \"PetroChina\"",
"SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1"
] | What is the headquarter of the company with the largest sales? | SELECT Headquarters FROM company ORDER BY Sales_in_Billion DESC LIMIT 1 | company_employee |
[
"Tell me the profits of the company BP.",
"How about its headquarters?",
"What is the most common headquarters for companies?"
] | [
"SELECT Profits_in_Billion FROM company WHERE Name = \"BP\"",
"SELECT Headquarters FROM company WHERE Name = \"BP\"",
"SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1"
] | Show the most common headquarter for companies. | SELECT Headquarters FROM company GROUP BY Headquarters ORDER BY COUNT(*) DESC LIMIT 1 | company_employee |
[
"Tell me ExxonMobil's industry.",
"What is its headquarters?",
"Tell me the headquarters that have at least two companies."
] | [
"SELECT Industry FROM company WHERE Name = \"ExxonMobil\"",
"SELECT Headquarters FROM company WHERE Name = \"ExxonMobil\"",
"SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2"
] | Show the headquarters that have at least two companies. | SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*) >= 2 | company_employee |
[
"Tell me the companies in the banking industry.",
"Where are their headquarters?",
"Tell me the headquarters that have both companies in the banking industry and companies in the oil and gas industry."
] | [
"SELECT Name FROM company WHERE Industry = \"Banking\"",
"SELECT Headquarters FROM company WHERE Industry = \"Banking\"",
"SELECT Headquarters FROM company WHERE Industry = \"Banking\" INTERSECT SELECT Headquarters FROM company WHERE Industry = \"Oil and gas\""
] | Show the headquarters that have both companies in banking industry and companies in oil and gas industry. | SELECT Headquarters FROM company WHERE Industry = "Banking" INTERSECT SELECT Headquarters FROM company WHERE Industry = "Oil and gas" | company_employee |
[
"Tell me Brad Lohaus's age.",
"Where does he work?",
"How about all the names of the companies and of the employees?"
] | [
"SELECT Age FROM people WHERE Name = \"Brad Lohaus\"",
"SELECT T3.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T2.Name = \"Brad Lohaus\"",
"SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID"
] | Show the names of companies and of employees. | SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID | company_employee |
[
"Tell me the people working in HSBC.",
"How many are there?",
"What are the names of the companies and that of the employees in descending order of number of years working for that employee?"
] | [
"SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Name = \"HSBC\"",
"SELECT COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Name = \"HSBC\"",
"SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working"
] | Show names of companies and that of employees in descending order of number of years working for that employee. | SELECT T3.Name , T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID ORDER BY T1.Year_working | company_employee |
[
"Tell me the company Tim Naegeli works in.",
"What are this company's sales numbers?",
"Tell me the names of the employees that work for the companies with sales bigger than 200."
] | [
"SELECT T3.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T2.Name = \"Tim Naegeli\"",
"SELECT T3.Sales_in_Billion FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T2.Name = \"Tim Naegeli\"",
"SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 200"
] | Show the names of employees that work for companies with sales bigger than 200. | SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Sales_in_Billion > 200 | company_employee |
[
"What are PetroChina's assets?",
"How many employees are there?",
"Tell me the names of the companies and the number of employees they have."
] | [
"SELECT Assets_in_Billion FROM company WHERE Name = \"PetroChina\"",
"SELECT COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T3.Name = \"PetroChina\"",
"SELECT T3.Name , COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name"
] | Show the names of companies and the number of employees they have | SELECT T3.Name , COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID GROUP BY T3.Name | company_employee |
[
"How old is David Butler?",
"Where does he work?",
"Tell me the names of people that are not employed by any company."
] | [
"SELECT Age FROM people WHERE Name = \"David Butler\"",
"SELECT T3.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID JOIN company AS T3 ON T1.Company_ID = T3.Company_ID WHERE T2.Name = \"Brad Lohaus\"",
"SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment)"
] | List the names of people that are not employed by any company | SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment) | company_employee |
[
"Show the amount of transactions whose type code is \"PUR\"",
"Show average amount of transactions whose type code is \"PUR\"",
"Show the minimum amount of transactions whose type code is \"PUR\" and whose share count is bigger than 50."
] | [
"SELECT amount_of_transaction FROM TRANSACTIONS WHERE transaction_type_code = \"PUR\"",
"SELECT avg(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = \"PUR\"",
"SELECT min(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = \"PUR\" AND share_count > 50"
] | Show the minimum amount of transactions whose type code is "PUR" and whose share count is bigger than 50. | SELECT min(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code = "PUR" AND share_count > 50 | tracking_share_transactions |
[
"Show the dates of transactions if the share count is bigger than 100.",
"Show the dates of transactions if the amount is bigger than 1000.",
"What are the dates of the transactions in these two groups?"
] | [
"SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100",
"SELECT date_of_transaction FROM TRANSACTIONS WHERE amount_of_transaction > 1000",
"SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000"
] | Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000. | SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000 | tracking_share_transactions |
[
"Show the transaction type description if the share count is smaller than 10.",
"Please also show their transaction dates."
] | [
"SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10",
"SELECT T1.transaction_type_description , T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10"
] | Show the transaction type descriptions and dates if the share count is smaller than 10. | SELECT T1.transaction_type_description , T2.date_of_transaction FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code WHERE T2.share_count < 10 | tracking_share_transactions |
[
"Show the average share count of all investors.",
"Count the number of investors who make any transaction with share count greater than 100.",
"Show their details."
] | [
"SELECT avg(share_count) FROM TRANSACTIONS",
"SELECT count(*) FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100",
"SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100"
] | Show details of all investors if they make any transaction with share count greater than 100. | SELECT T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.share_count > 100 | tracking_share_transactions |
[
"Show the lot details of all lots.",
"Show the ids of investors with details \"l\".",
"Return the lot details of lots that belong to investors with details \"l\"."
] | [
"SELECT lot_details FROM LOTS",
"SELECT investor_id FROM INVESTORS WHERE Investor_details = \"l\"",
"SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = \"l\""
] | Return the lot details of lots that belong to investors with details "l"? | SELECT T2.lot_details FROM INVESTORS AS T1 JOIN LOTS AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" | tracking_share_transactions |
[
"What is the average transaction amount?",
"How many transactions have an amount bigger than 10000?",
"Please show the purchase details of these transactions."
] | [
"SELECT avg(amount_of_transaction) FROM TRANSACTIONS",
"SELECT count(amount_of_transaction) FROM TRANSACTIONS WHERE amount_of_transaction > 10000",
"SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000"
] | What are the purchase details of transactions with amount bigger than 10000? | SELECT T1.purchase_details FROM PURCHASES AS T1 JOIN TRANSACTIONS AS T2 ON T1.purchase_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction > 10000 | tracking_share_transactions |
[
"What is the minimum transaction amount?",
"How many transactions have an amount smaller than 3000?",
"Please show the sale details and dates of transactions with amount smaller than 3000."
] | [
"SELECT min(amount_of_transaction) FROM TRANSACTIONS",
"SELECT count(amount_of_transaction) FROM TRANSACTIONS WHERE amount_of_transaction < 3000",
"SELECT T1.sales_details , T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000"
] | What are the sale details and dates of transactions with amount smaller than 3000? | SELECT T1.sales_details , T2.date_of_transaction FROM SALES AS T1 JOIN TRANSACTIONS AS T2 ON T1.sales_transaction_id = T2.transaction_id WHERE T2.amount_of_transaction < 3000 | tracking_share_transactions |
[
"What is the average share amount of the transactions?",
"How many transactions have a share count smaller than 50?",
"What are the lot details of lots associated with transactions with share count smaller than 50?"
] | [
"SELECT avg(share_count) FROM TRANSACTIONS",
"SELECT count(*) FROM TRANSACTIONS_LOTS AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_id = T2.transaction_id WHERE T2.share_count < 50",
"SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50"
] | What are the lot details of lots associated with transactions with share count smaller than 50? | SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count < 50 | tracking_share_transactions |
[
"Show the transaction id of transactions whose share count is bigger than 100.",
"How many transactions whose share count is bigger than 100 and whose type code is \"PUR\"?.",
"What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is \"PUR\"?"
] | [
"SELECT transaction_id FROM TRANSACTIONS WHERE share_count > 100",
"SELECT COUNT(transaction_id) FROM TRANSACTIONS WHERE share_count > 100 AND transaction_type_code = \"PUR\"",
"SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = \"PUR\""
] | What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"? | SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id = T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id = T3.transaction_id WHERE T3.share_count > 100 AND T3.transaction_type_code = "PUR" | tracking_share_transactions |
[
"How many different transaction types are there?",
"What is the average share count of different transaction types?",
"Show the maximum and minimum share count of different transaction types."
] | [
"SELECT COUNT(DISTINCT transaction_type_code) FROM TRANSACTIONS",
"SELECT transaction_type_code , avg(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code",
"SELECT transaction_type_code , max(share_count) , min(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code"
] | Show the maximum and minimum share count of different transaction types. | SELECT transaction_type_code , max(share_count) , min(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code | tracking_share_transactions |
[
"What is the maximum share count of transactions?",
"What is the average share count of transactions made by each investor?",
"Please order them by average share count."
] | [
"SELECT max(share_count) FROM TRANSACTIONS",
"SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_id",
"SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY avg(share_count)"
] | Show the average share count of transactions made by each investor, ordered by average share count. | SELECT investor_id , avg(share_count) FROM TRANSACTIONS GROUP BY investor_id ORDER BY avg(share_count) | tracking_share_transactions |
[
"Show the max amount of transactions for different lots.",
"What is the average amount of transactions for all lots?",
"What is the average amount of transactions for the lot with id 1?",
"Show the average amount of transactions for all different lots."
] | [
"SELECT max(amount_of_transaction) FROM TRANSACTIONS",
"SELECT avg(amount_of_transaction) FROM TRANSACTIONS",
"SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id WHERE T2.lot_id = 1 GROUP BY T2.lot_id",
"SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id"
] | Show the average amount of transactions for different lots. | SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id | tracking_share_transactions |
[
"What is the average amount of transactions for the lot with id 3?",
"Show the average amount of transactions for all different lots.",
"Could you please order the results by the average amount of transactions?"
] | [
"SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id WHERE T2.lot_id = 3 GROUP BY T2.lot_id",
"SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id",
"SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction)"
] | Show the average amount of transactions for different lots, ordered by average amount of transactions. | SELECT T2.lot_id , avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id = T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction) | tracking_share_transactions |
[
"How many transactions are there with transaction type code \"PUR\"?",
"Show the number of transactions with transaction type code \"SALE\".",
"For these transactions, show the number made by each investor."
] | [
"SELECT COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = \"PUR\"",
"SELECT COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = \"SALE\"",
"SELECT investor_id , COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = \"SALE\" GROUP BY investor_id"
] | Show the number of transactions with transaction type code "SALE" for different investors if it is larger than 0. | SELECT investor_id , COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code = "SALE" GROUP BY investor_id | tracking_share_transactions |
[
"Show the transaction type code that occurs the most times.",
"Show the number of occurances of each transaction type code.",
"Could you please order the transaction type codes by their number of occurances?",
"Show the first one."
] | [
"SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1",
"SELECT transaction_type_code, count(*) FROM TRANSACTIONS GROUP BY transaction_type_code",
"SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC",
"SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC LIMIT 1"
] | Show the transaction type code that occurs the fewest times. | SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC LIMIT 1 | tracking_share_transactions |
[
"Show the transaction type code that occurs the fewest times.",
"Show the number of occurances of each transaction type code.",
"Which transaction occurs the most frequently?",
"Show its transaction type code."
] | [
"SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) ASC LIMIT 1",
"SELECT transaction_type_code, count(*) FROM TRANSACTIONS GROUP BY transaction_type_code",
"SELECT * FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1",
"SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1"
] | Show the transaction type code that occurs the most frequently. | SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 | tracking_share_transactions |
[
"Please show the description of the transaction type \"SALE\".",
"How many transaction types are there?",
"Among these transactions, which one occurs most frequently?",
"Show its description."
] | [
"SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code = \"SALE\"",
"SELECT COUNT(*) FROM Ref_Transaction_Types",
"SELECT T1.transaction_type_code FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1",
"SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1"
] | Show the description of the transaction type that occurs most frequently. | SELECT T1.transaction_type_description FROM Ref_Transaction_Types AS T1 JOIN TRANSACTIONS AS T2 ON T1.transaction_type_code = T2.transaction_type_code GROUP BY T1.transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1 | tracking_share_transactions |
[
"How many investors are there?",
"How many of them have transactions?",
"Could you order these investors according to their number of transactions in decreasing order?",
"Show the id and details of the first investor."
] | [
"SELECT COUNT(*) FROM INVESTORS",
"SELECT COUNT(DISTINCT T1.investor_id) FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id",
"SELECT * FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC",
"SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1"
] | Show the id and details of the investor that has the largest number of transactions. | SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1 | tracking_share_transactions |
[
"How many transactions are there?",
"Show the id and details for the investor who has the most transactions.",
"How about investors with top 3 number of transactions?"
] | [
"SELECT COUNT(*) FROM TRANSACTIONS",
"SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1",
"SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3"
] | Show the id and details for the investors who have the top 3 number of transactions. | SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3 | tracking_share_transactions |
[
"Which investors have some transactions?",
"How many of these investors have at least three transactions?",
"Next, how many of these investors have at least two transactions?",
"Please give their ids."
] | [
"SELECT * FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id",
"SELECT COUNT(*) FROM (SELECT COUNT(*) FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 3)",
"SELECT COUNT(*) FROM (SELECT COUNT(*) FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2)",
"SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2"
] | Show the ids of the investors who have at least two transactions. | SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*) >= 2 | tracking_share_transactions |
[
"Which investors have some transactions?",
"How many of these investors are there?",
"How about those who have at least two transactions with type code \"SALE\"?",
"OK,give me their ids and details."
] | [
"SELECT * FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id",
"SELECT COUNT(DISTINCT T1.investor_id) FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id",
"SELECT COUNT(*) FROM (SELECT COUNT(*) FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = \"SALE\" GROUP BY T2.investor_id HAVING COUNT(*) >= 2)",
"SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = \"SALE\" GROUP BY T2.investor_id HAVING COUNT(*) >= 2"
] | Show the ids and details of the investors who have at least two transactions with type code "SALE". | SELECT T2.investor_id , T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" GROUP BY T2.investor_id HAVING COUNT(*) >= 2 | tracking_share_transactions |
[
"How many transactions are there?",
"Among these transactions, how many of them have a share count of at least 100 or an amount bigger than 100?",
"Can you please show their dates?"
] | [
"SELECT COUNT(date_of_transaction) FROM TRANSACTIONS",
"SELECT COUNT(date_of_transaction) FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100",
"SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100"
] | What are the dates of transactions with at least 100 share count or amount bigger than 100? | SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count >= 100 OR amount_of_transaction >= 100 | tracking_share_transactions |
[
"What are the details of all sales?",
"What are the details of all purchases?",
"Could you please combine them?"
] | [
"SELECT sales_details FROM sales",
"SELECT purchase_details FROM purchases",
"SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases"
] | What are the details of all sales and purchases? | SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases | tracking_share_transactions |
[
"Show me many how many journalists are FROM the nation England?",
"How about Wales?",
"How many are FROM England or Wales?",
"What are their names?"
] | [
"SELECT count(*) FROM journalist WHERE Nationality = \"England\"",
"SELECT count(*) FROM journalist WHERE Nationality = \"Wales\"",
"SELECT count(*) FROM journalist WHERE Nationality = \"England\" OR Nationality = \"Wales\"",
"SELECT Name FROM journalist WHERE Nationality = \"England\" OR Nationality = \"Wales\""
] | Show the names of journalists FROM "England" or "Wales". | SELECT Name FROM journalist WHERE Nationality = "England" OR Nationality = "Wales" | news_report |
[
"What is the average number of years a journalist works?",
"What is the greatest?",
"Who is the journalist that has worked this long?",
"Show me just her nationality?"
] | [
"SELECT avg(Years_working) FROM journalist",
"SELECT Years_working FROM journalist ORDER BY Years_working DESC LIMIT 1",
"SELECT name FROM journalist ORDER BY Years_working DESC LIMIT 1",
"SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1"
] | What is the nationality of the journalist with the largest number of years working? | SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1 | news_report |
[
"Show me every journalists name and nationality.",
"How many different nationalities are there?",
"What are they?",
"Of which one, are the most journalist?"
] | [
"SELECT name, nationality FROM journalist",
"SELECT count(distinct Nationality) FROM journalist",
"SELECT distinct Nationality FROM journalist",
"SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1"
] | Show the most common nationality for journalists. | SELECT Nationality FROM journalist GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 | news_report |
[
"Which journalists have been working for less than 3 years?",
"Also add those that have been working for over 10!",
"What are their names?",
"Actually, list the different nations they are FROM!"
] | [
"SELECT * FROM journalist WHERE Years_working < 3",
"SELECT * FROM journalist WHERE Years_working < 3 or Years_working > 10",
"SELECT name FROM journalist WHERE Years_working < 3 or Years_working > 10",
"SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3"
] | Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working. | SELECT Nationality FROM journalist WHERE Years_working > 10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working < 3 | news_report |
[
"What are names of all the different journalists that have reported on at least one event?",
"For each, show the names of the events they reported on.",
"And also the venues and dates.",
"Now, show just the journalist names and dates of the events!"
] | [
"SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID group by T1.journalist_ID",
"SELECT T3.Name , T2.name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID",
"SELECT T3.Name , T2.name, T2.Venue, T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID",
"SELECT T3.Name , T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID"
] | Show the names of journalists and the dates of the events they reported. | SELECT T3.Name , T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID | news_report |
[
"What are all the event names?",
"What were the event attendances for each one?",
"Include the names of the journalist working on each event!",
"Show me just the names of the journalists and the event names in ascending order!"
] | [
"SELECT name FROM event",
"SELECT Name, Event_Attendance FROM event",
"SELECT T3.Name , T2.Name, T2.event_attendance FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID",
"SELECT T3.Name , T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance ASC"
] | Show the names of journalists and the names of the events they reported in ascending order | SELECT T3.Name , T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID ORDER BY T2.Event_Attendance ASC | news_report |
[
"Shoe me the names of all the journalists.",
"Now include the names of all the events they each worked on.",
"How many did they each do?"
] | [
"SELECT name FROM journalist",
"SELECT T3.Name, T2.name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID",
"SELECT T3.Name , COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name"
] | Show the names of journalists and the number of events they reported. | SELECT T3.Name , COUNT(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name | news_report |
[
"Show me all the journalist information for each journalist!",
"What events have they each reported on.",
"Count how many each journalist has worked on.",
"Show me just the names of the journalists that have reported on more than 1!"
] | [
"SELECT * FROM journalist",
"SELECT * FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID",
"SELECT T3.name, count(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID group by T3.name",
"SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1"
] | Show the names of journalists that have reported more than one event. | SELECT T3.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID GROUP BY T3.Name HAVING COUNT(*) > 1 | news_report |
[
"How many events have each journalists reported on?",
"How many journalists have 0 events!",
"What are their names?"
] | [
"SELECT T3.name, count(*) FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID = T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID = T3.journalist_ID group by T3.name",
"SELECT count(*) FROM journalist WHERE journalist_ID NOT IN (SELECT journalist_ID FROM news_report)",
"SELECT Name FROM journalist WHERE journalist_ID NOT IN (SELECT journalist_ID FROM news_report)"
] | List the names of journalists who have not reported any event. | SELECT Name FROM journalist WHERE journalist_ID NOT IN (SELECT journalist_ID FROM news_report) | news_report |
[
"List all the names of the events!",
"Show many attended each one!",
"What is the average event _attendance?",
"Also show the max!"
] | [
"SELECT name FROM event",
"SELECT name, event_attendance FROM event",
"SELECT avg(event_attendance) FROM event",
"SELECT avg(Event_Attendance) , max(Event_Attendance) FROM event"
] | what are the average and maximum attendances of all events? | SELECT avg(Event_Attendance) , max(Event_Attendance) FROM event | news_report |
[
"What are the different work_types of news reporting?",
"How many reporters belong to each type?",
"What is the average age of the reporters for each type?",
"Also show the average number of years working for each type?"
] | [
"SELECT distinct work_type FROM news_report",
"SELECT count(*), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id group by t2.work_type",
"SELECT avg(t1.age), t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type",
"SELECT avg(t1.age) , avg(Years_working) , t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type"
] | Find the average age and experience working length of journalists working on different role type. | SELECT avg(t1.age) , avg(Years_working) , t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id = t2.journalist_id GROUP BY t2.work_type | news_report |
[
"What are the names of the regions?",
"Show all region code and region name sorted by the region name alphabetically.",
"Order the result by the codes."
] | [
"SELECT region_name FROM region;",
"SELECT region_code , region_name FROM region ORDER BY region_name ASC;",
"SELECT region_code , region_name FROM region ORDER BY region_code;"
] | Show all region code and region name sorted by the codes. | SELECT region_code , region_name FROM region ORDER BY region_code; | storm_record |
[
"How about their names of each region?",
"Order the result in alphabetical order."
] | [
"SELECT region_name FROM region;",
"SELECT region_name FROM region ORDER BY region_name;"
] | List all region names in alphabetical order. | SELECT region_name FROM region ORDER BY region_name; | storm_record |
[
"Can you list the id of region named Denmark.",
"How about the region code for all regions except for Denmark.",
"List their names."
] | [
"SELECT region_id FROM region WHERE region_name = 'Denmark';",
"SELECT region_code FROM region WHERE region_name != 'Denmark';",
"SELECT region_name FROM region WHERE region_name != 'Denmark';"
] | Show names for all regions except for Denmark. | SELECT region_name FROM region WHERE region_name != 'Denmark'; | storm_record |
[
"What's the number of deaths for each storm?",
"Show the average number of deaths.",
"How many storms had death records?"
] | [
"SELECT Number_Deaths FROM storm;",
"SELECT avg(Number_Deaths) FROM storm;",
"SELECT count(*) FROM storm WHERE Number_Deaths > 0;"
] | How many storms had death records? | SELECT count(*) FROM storm WHERE Number_Deaths > 0; | storm_record |
[
"Show me the name of the storm where no people died.",
"How about the number of deaths for the rest of the storms?",
"List their names and dates active as well."
] | [
"SELECT name FROM storm WHERE number_deaths = 0;",
"SELECT number_deaths FROM storm WHERE number_deaths > 0;",
"SELECT name , dates_active , number_deaths FROM storm WHERE number_deaths >= 1;"
] | List name, dates active, and number of deaths for all storms with at least 1 death. | SELECT name , dates_active , number_deaths FROM storm WHERE number_deaths >= 1; | storm_record |
[
"Show me in the maximum damage for storms with max speed no more than 1000.",
"How about those with max speed higher than 1000?",
"Show the average and maximum damage for all storms with max speed higher than 1000."
] | [
"SELECT max(damage_millions_USD) FROM storm WHERE max_speed <= 1000;",
"SELECT max(damage_millions_USD) FROM storm WHERE max_speed > 1000;",
"SELECT avg(damage_millions_USD) , max(damage_millions_USD) FROM storm WHERE max_speed > 1000;"
] | Show the average and maximum damage for all storms with max speed higher than 1000. | SELECT avg(damage_millions_USD) , max(damage_millions_USD) FROM storm WHERE max_speed > 1000; | storm_record |
[
"What's the average max speed for all storms?",
"What are the number of deaths and damage for all storms with a max speed greater than the average?",
"How about the total death and total damage?"
] | [
"SELECT avg(max_speed) FROM storm;",
"SELECT number_deaths , damage_millions_USD FROM storm WHERE max_speed > (SELECT avg(max_speed) FROM storm);",
"SELECT sum(number_deaths) , sum(damage_millions_USD) FROM storm WHERE max_speed > (SELECT avg(max_speed) FROM storm);"
] | What is the total number of deaths and damage for all storms with a max speed greater than the average? | SELECT sum(number_deaths) , sum(damage_millions_USD) FROM storm WHERE max_speed > (SELECT avg(max_speed) FROM storm); | storm_record |
[
"What's the date active for all storms?",
"How about the name and damage of all storms?",
"Order the result by a descending order of max speed."
] | [
"SELECT dates_active FROM storm;",
"SELECT name , damage_millions_USD FROM storm;",
"SELECT name , damage_millions_USD FROM storm ORDER BY max_speed DESC;"
] | List name and damage for all storms in a descending order of max speed. | SELECT name , damage_millions_USD FROM storm ORDER BY max_speed DESC; | storm_record |
[
"What are the names of the affected regions?",
"Show the distinct region names.",
"How many distinct affected regions are there?"
] | [
"SELECT region.region_name FROM region JOIN affected_region ON affected_region.region_id = region.region_id;",
"SELECT DISTINCT region.region_name FROM region JOIN affected_region ON affected_region.region_id = region.region_id;",
"SELECT count(DISTINCT region_id) FROM affected_region"
] | How many regions are affected? | SELECT count(DISTINCT region_id) FROM affected_region | storm_record |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.