target-benchmark/spider-queries huggingface dataset:
Database: browser_web (tables: browser, accelerator_compatible_browser, web_client_accelerator)
Question: List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.
SQL: SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id  =  T1.id JOIN browser AS T3 ON T2.browser_id  =  T3.id WHERE T1.name  =  'CACHEbox' INTERSECT SELECT T3.name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id  =  T1.id JOIN browser AS T3 ON T2.browser_id  =  T3.id WHERE T1.name  =  'Fasterfox'
Database: browser_web (tables: browser, accelerator_compatible_browser, web_client_accelerator)
Question: Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.
SQL: SELECT name ,  operating_system FROM web_client_accelerator EXCEPT SELECT T1.name ,  T1.operating_system FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id  =  T1.id JOIN browser AS T3 ON T2.browser_id  =  T3.id WHERE T3.name  =  'Opera'
Database: browser_web (tables: web_client_accelerator)
Question: Which accelerator name contains substring "Opera"?
SQL: SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%"
Database: browser_web (tables: web_client_accelerator)
Question: Find the number of web accelerators used for each Operating system.
SQL: SELECT Operating_system ,  count(*) FROM web_client_accelerator GROUP BY Operating_system
Database: browser_web (tables: browser, accelerator_compatible_browser, web_client_accelerator)
Question: give me names of all compatible browsers and accelerators in the descending order of compatible year
SQL: SELECT T2.name ,  T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id  =  T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id  =  T3.id ORDER BY T1.compatible_since_year DESC
Database: wrestler (tables: wrestler)
Question: How many wrestlers are there?
SQL: SELECT count(*) FROM wrestler
Database: wrestler (tables: wrestler)
Question: Count the number of wrestlers.
SQL: SELECT count(*) FROM wrestler
Database: wrestler (tables: wrestler)
Question: List the names of wrestlers in descending order of days held.
SQL: SELECT Name FROM wrestler ORDER BY Days_held DESC
Database: wrestler (tables: wrestler)
Question: What are the names of the wrestlers, ordered descending by days held?
SQL: SELECT Name FROM wrestler ORDER BY Days_held DESC
Database: wrestler (tables: wrestler)
Question: What is the name of the wrestler with the fewest days held?
SQL: SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1
Database: wrestler (tables: wrestler)
Question: Return the name of the wrestler who had the lowest number of days held.
SQL: SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1
Database: wrestler (tables: wrestler)
Question: What are the distinct reigns of wrestlers whose location is not "Tokyo,Japan" ?
SQL: SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != "Tokyo , Japan"
Database: wrestler (tables: wrestler)
Question: Give the different reigns of wrestlers who are not located in Tokyo, Japan.
SQL: SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != "Tokyo , Japan"
Database: wrestler (tables: wrestler)
Question: What are the names and location of the wrestlers?
SQL: SELECT Name ,  LOCATION FROM wrestler
Database: wrestler (tables: wrestler)
Question: Give the names and locations of all wrestlers.
SQL: SELECT Name ,  LOCATION FROM wrestler
Database: wrestler (tables: elimination)
Question: What are the elimination moves of wrestlers whose team is "Team Orton"?
SQL: SELECT Elimination_Move FROM Elimination WHERE Team  =  "Team Orton"
Database: wrestler (tables: elimination)
Question: Return the elimination movies of wrestlers on Team Orton.
SQL: SELECT Elimination_Move FROM Elimination WHERE Team  =  "Team Orton"
Database: wrestler (tables: wrestler, elimination)
Question: What are the names of wrestlers and the elimination moves?
SQL: SELECT T2.Name ,  T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID
Database: wrestler (tables: wrestler, elimination)
Question: Give the names of wrestlers and their elimination moves.
SQL: SELECT T2.Name ,  T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID
Database: wrestler (tables: wrestler, elimination)
Question: List the names of wrestlers and the teams in elimination in descending order of days held.
SQL: SELECT T2.Name ,  T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID ORDER BY T2.Days_held DESC
Database: wrestler (tables: wrestler, elimination)
Question: What are the names of wrestlers and their teams in elimination, ordered descending by days held?
SQL: SELECT T2.Name ,  T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID ORDER BY T2.Days_held DESC
Database: wrestler (tables: wrestler, elimination)
Question: List the time of elimination of the wrestlers with largest days held.
SQL: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1
Database: wrestler (tables: wrestler, elimination)
Question: What is the time of elimination for the wrestler with the most days held?
SQL: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID ORDER BY T2.Days_held DESC LIMIT 1
Database: wrestler (tables: wrestler, elimination)
Question: Show times of elimination of wrestlers with days held more than 50.
SQL: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID WHERE T2.Days_held  >  50
Database: wrestler (tables: wrestler, elimination)
Question: What are the times of elimination for wrestlers with over 50 days held?
SQL: SELECT T1.Time FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID WHERE T2.Days_held  >  50
Database: wrestler (tables: elimination)
Question: Show different teams in eliminations and the number of eliminations from each team.
SQL: SELECT Team ,  COUNT(*) FROM elimination GROUP BY Team
Database: wrestler (tables: elimination)
Question: How many eliminations did each team have?
SQL: SELECT Team ,  COUNT(*) FROM elimination GROUP BY Team
Database: wrestler (tables: elimination)
Question: Show teams that have suffered more than three eliminations.
SQL: SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*)  >  3
Database: wrestler (tables: elimination)
Question: Which teams had more than 3 eliminations?
SQL: SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*)  >  3
Database: wrestler (tables: wrestler)
Question: Show the reign and days held of wrestlers.
SQL: SELECT Reign ,  Days_held FROM wrestler
Database: wrestler (tables: wrestler)
Question: What are the reigns and days held of all wrestlers?
SQL: SELECT Reign ,  Days_held FROM wrestler
Database: wrestler (tables: wrestler)
Question: What are the names of wrestlers days held less than 100?
SQL: SELECT Name FROM wrestler WHERE Days_held  <  100
Database: wrestler (tables: wrestler)
Question: Return the names of wrestlers with fewer than 100 days held.
SQL: SELECT Name FROM wrestler WHERE Days_held  <  100
Database: wrestler (tables: wrestler)
Question: Please show the most common reigns of wrestlers.
SQL: SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1
Database: wrestler (tables: wrestler)
Question: Which reign is the most common among wrestlers?
SQL: SELECT Reign FROM wrestler GROUP BY Reign ORDER BY COUNT(*) DESC LIMIT 1
Database: wrestler (tables: wrestler)
Question: List the locations that are shared by more than two wrestlers.
SQL: SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*)  >  2
Database: wrestler (tables: wrestler)
Question: Which locations are shared by more than two wrestlers?
SQL: SELECT LOCATION FROM wrestler GROUP BY LOCATION HAVING COUNT(*)  >  2
Database: wrestler (tables: wrestler, elimination)
Question: List the names of wrestlers that have not been eliminated.
SQL: SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)
Database: wrestler (tables: wrestler, elimination)
Question: What are the names of wrestlers who have never been eliminated?
SQL: SELECT Name FROM wrestler WHERE Wrestler_ID NOT IN (SELECT Wrestler_ID FROM elimination)
Database: wrestler (tables: elimination)
Question: Show the teams that have both wrestlers eliminated by "Orton" and wrestlers eliminated by "Benjamin".
SQL: SELECT Team FROM Elimination WHERE Eliminated_By  =  "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By  =  "Benjamin"
Database: wrestler (tables: elimination)
Question: What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?
SQL: SELECT Team FROM Elimination WHERE Eliminated_By  =  "Orton" INTERSECT SELECT Team FROM Elimination WHERE Eliminated_By  =  "Benjamin"
Database: wrestler (tables: elimination)
Question: What is the number of distinct teams that suffer elimination?
SQL: SELECT COUNT (DISTINCT team) FROM elimination
Database: wrestler (tables: elimination)
Question: How many different teams have had eliminated wrestlers?
SQL: SELECT COUNT (DISTINCT team) FROM elimination
Database: wrestler (tables: elimination)
Question: Show the times of elimination by "Punk" or "Orton".
SQL: SELECT TIME FROM elimination WHERE Eliminated_By  =  "Punk" OR Eliminated_By  =  "Orton"
Database: wrestler (tables: elimination)
Question: What are the times of elimination for any instances in which the elimination was done by Punk or Orton?
SQL: SELECT TIME FROM elimination WHERE Eliminated_By  =  "Punk" OR Eliminated_By  =  "Orton"
Database: school_finance (tables: school)
Question: How many schools are there?
SQL: SELECT count(*) FROM school
Database: school_finance (tables: school)
Question: Count the number of schools.
SQL: SELECT count(*) FROM school
Database: school_finance (tables: school)
Question: Show all school names in alphabetical order.
SQL: SELECT school_name FROM school ORDER BY school_name
Database: school_finance (tables: school)
Question: List the name, location, mascot for all schools.
SQL: SELECT school_name ,  LOCATION ,  mascot FROM school
Database: school_finance (tables: school)
Question: What are the total and average enrollment of all schools?
SQL: SELECT sum(enrollment) ,  avg(enrollment) FROM school
Database: school_finance (tables: school)
Question: What are the mascots for schools with enrollments above the average?
SQL: SELECT mascot FROM school WHERE enrollment  >  (SELECT avg(enrollment) FROM school)
Database: school_finance (tables: school)
Question: List the name of the school with the smallest enrollment.
SQL: SELECT school_name FROM school ORDER BY enrollment LIMIT 1
Database: school_finance (tables: school)
Question: Show the average, maximum, minimum enrollment of all schools.
SQL: SELECT avg(enrollment) ,  max(enrollment) ,  min(enrollment) FROM school
Database: school_finance (tables: school)
Question: Show each county along with the number of schools and total enrollment in each county.
SQL: SELECT county ,  count(*) ,  sum(enrollment) FROM school GROUP BY county
Database: school_finance (tables: endowment, school)
Question: How many donors have endowment for school named "Glenn"?
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 (tables: endowment)
Question: List each donator name and the amount of endowment in descending order of the amount of endowment.
SQL: SELECT donator_name ,  sum(amount) FROM endowment GROUP BY donator_name ORDER BY sum(amount) DESC
Database: school_finance (tables: endowment, school)
Question: List the names of the schools without any endowment.
SQL: SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment)
Database: school_finance (tables: endowment, school)
Question: List all the names of schools with an endowment amount smaller than or equal to 10.
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 (tables: endowment, school)
Question: Show the names of donors who donated to both school "Glenn" and "Triton."
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 (tables: endowment)
Question: Show the names of all the donors except those whose donation amount less than 9.
SQL: SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount  <  9
Database: school_finance (tables: endowment)
Question: List the amount and donor name for the largest amount of donation.
SQL: SELECT amount ,  donator_name FROM endowment ORDER BY amount DESC LIMIT 1
Database: school_finance (tables: budget)
Question: How many budgets are above 3000 in year 2001 or before?
SQL: SELECT count(*) FROM budget WHERE budgeted  >  3000 AND YEAR  <=  2001
Database: school_finance (tables: budget)
Question: Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000
SQL: SELECT count(*) FROM budget WHERE budgeted  >  3000 AND YEAR  <=  2001
Database: school_finance (tables: school, budget)
Question: Show each school name, its budgeted amount, and invested amount in year 2002 or after.
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 (tables: endowment)
Question: Show all donor names.
SQL: SELECT DISTINCT donator_name FROM endowment
Database: school_finance (tables: budget)
Question: How many budget record has a budget amount smaller than the invested amount?
SQL: SELECT count(*) FROM budget WHERE budgeted  <  invested
Database: school_finance (tables: school, budget)
Question: What is the total budget amount for school "Glenn" in all years?
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 (tables: school, budget, endowment)
Question: Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.
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 (tables: endowment, school)
Question: Find the names of schools that have more than one donator with donation amount above 8.5.
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 (tables: endowment)
Question: Find the number of schools that have more than one donator whose donation amount is less than 8.5.
SQL: SELECT count(*) FROM (SELECT * FROM endowment WHERE amount  >  8.5 GROUP BY school_id HAVING count(*)  >  1)
Database: school_finance (tables: school, budget)
Question: List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget.
SQL: SELECT T1.School_name ,  T1.Mascot ,  T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id  =  T2.school_id WHERE Budgeted  >  6000 OR YEAR  <  2003 ORDER BY T2.total_budget_percent_invested ,  T2.total_budget_percent_budgeted
Database: protein_institute (tables: building)
Question: How many buildings are there?
SQL: SELECT count(*) FROM building
Database: protein_institute (tables: building)
Question: Show the name, street address, and number of floors for all buildings ordered by the number of floors.
SQL: SELECT name ,  street_address ,  floors FROM building ORDER BY floors
Database: protein_institute (tables: building)
Question: What is the name of the tallest building?
SQL: SELECT name FROM building ORDER BY height_feet DESC LIMIT 1
Database: protein_institute (tables: building)
Question: What are the average, maximum, and minimum number of floors for all buildings?
SQL: SELECT avg(floors) ,  max(floors) ,  min(floors) FROM building
Database: protein_institute (tables: building)
Question: Show the number of buildings with a height above the average or a number of floors above the average.
SQL: SELECT count(*) FROM building WHERE height_feet  >  (SELECT avg(height_feet) FROM building) OR floors  >  (SELECT avg(floors) FROM building)
Database: protein_institute (tables: building)
Question: List the names of buildings with at least 200 feet of height and with at least 20 floors.
SQL: SELECT name FROM building WHERE height_feet  >=  200 AND floors  >=  20
Database: protein_institute (tables: institution)
Question: Show the names and locations of institutions that are founded after 1990 and have the type "Private".
SQL: SELECT institution ,  LOCATION FROM institution WHERE founded  >  1990 AND TYPE  =  'Private'
Database: protein_institute (tables: institution)
Question: Show institution types, along with the number of institutions and total enrollment for each type.
SQL: SELECT TYPE ,  count(*) ,  sum(enrollment) FROM institution GROUP BY TYPE
Database: protein_institute (tables: institution)
Question: Show the institution type with the largest number of institutions.
SQL: SELECT TYPE FROM institution GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1
Database: protein_institute (tables: institution)
Question: Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.
SQL: SELECT TYPE FROM institution WHERE founded  >  1990 AND enrollment  >=  1000
Database: protein_institute (tables: building, institution)
Question: Show the name of buildings that do not have any institution.
SQL: SELECT name FROM building WHERE building_id NOT IN (SELECT building_id FROM institution)
Database: protein_institute (tables: building, institution)
Question: Show the names of buildings except for those having an institution founded in 2003.
SQL: SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.building_id  =  T2.building_id WHERE T2.founded  =  2003
Database: protein_institute (tables: building, institution)
Question: For each building, show the name of the building and the number of institutions in it.
SQL: SELECT T1.name ,  count(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id  =  T2.building_id GROUP BY T1.building_id
Database: protein_institute (tables: building, institution)
Question: Show the names and heights of buildings with at least two institutions founded after 1880.
SQL: SELECT T1.name ,  T1.height_feet FROM building AS T1 JOIN institution AS T2 ON T1.building_id  =  T2.building_id WHERE T2.founded  >  1880 GROUP BY T1.building_id HAVING count(*)  >=  2
Database: protein_institute (tables: institution)
Question: Show all the distinct institution types.
SQL: SELECT DISTINCT TYPE FROM institution
Database: protein_institute (tables: protein, institution)
Question: Show institution names along with the number of proteins for each institution.
SQL: SELECT T1.institution ,  count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id  =  T2.institution_id GROUP BY T1.institution_id
Database: protein_institute (tables: protein, institution)
Question: How many proteins are associated with an institution founded after 1880 or an institution with type "Private"?
SQL: SELECT count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id  =  T2.institution_id WHERE T1.founded  >  1880 OR T1.type  =  'Private'
Database: protein_institute (tables: protein, institution)
Question: Show the protein name and the institution name.
SQL: SELECT T2.protein_name ,  T1.institution FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id  =  T2.institution_id
Database: protein_institute (tables: building, protein, institution)
Question: How many proteins are associated with an institution in a building with at least 20 floors?
SQL: SELECT count(*) FROM institution AS T1 JOIN protein AS T2 ON T1.institution_id  =  T2.institution_id JOIN building AS T3 ON T3.building_id  =  T1.building_id WHERE T3.floors  >=  20
Database: protein_institute (tables: protein, institution)
Question: How many institutions do not have an associated protein in our record?
SQL: SELECT count(*) FROM institution WHERE institution_id NOT IN (SELECT institution_id FROM protein)
Database: cinema (tables: cinema)
Question: Show all the locations where no cinema has capacity over 800.
SQL: SELECT LOCATION FROM cinema EXCEPT SELECT LOCATION FROM cinema WHERE capacity  >  800
Database: cinema (tables: cinema)
Question: Show all the locations where some cinemas were opened in both year 2010 and year 2011.
SQL: SELECT LOCATION FROM cinema WHERE openning_year  =  2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year  =  2011
Database: cinema (tables: cinema)
Question: How many cinema do we have?
SQL: SELECT count(*) FROM cinema
Database: cinema (tables: cinema)
Question: Count the number of cinemas.
SQL: SELECT count(*) FROM cinema
Database: cinema (tables: cinema)
Question: Show name, opening year, and capacity for each cinema.
SQL: SELECT name ,  openning_year ,  capacity FROM cinema
Database: cinema (tables: cinema)
Question: Show the cinema name and location for cinemas with capacity above average.
SQL: SELECT name ,  LOCATION FROM cinema WHERE capacity  >  (SELECT avg(capacity) FROM cinema)
Database: cinema (tables: cinema)
Question: What are all the locations with a cinema?
SQL: SELECT DISTINCT LOCATION FROM cinema
Database: cinema (tables: cinema)
Question: Find the distinct locations that has a cinema.
SQL: SELECT DISTINCT LOCATION FROM cinema
Database: cinema (tables: cinema)
Question: Show all the cinema names and opening years in descending order of opening year.
SQL: SELECT name ,  openning_year FROM cinema ORDER BY openning_year DESC
Database: cinema (tables: cinema)
Question: What are the name and location of the cinema with the largest capacity?
SQL: SELECT name ,  LOCATION FROM cinema ORDER BY capacity DESC LIMIT 1
Database: cinema (tables: cinema)
Question: Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.
SQL: SELECT avg(capacity) ,  min(capacity) ,  max(capacity) FROM cinema WHERE openning_year  >=  2011
Database: cinema (tables: cinema)
Question: Show each location and the number of cinemas there.
SQL: SELECT LOCATION ,  count(*) FROM cinema GROUP BY LOCATION
Database: cinema (tables: cinema)
Question: What is the location with the most cinemas opened in year 2010 or later?
SQL: SELECT LOCATION FROM cinema WHERE openning_year  >=  2010 GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1
Database: cinema (tables: cinema)
Question: Show all the locations with at least two cinemas with capacity above 300.
SQL: SELECT LOCATION FROM cinema WHERE capacity  >  300 GROUP BY LOCATION HAVING count(*)  >=  2
Database: cinema (tables: cinema)
Question: Which locations have 2 or more cinemas with capacity over 300?
SQL: SELECT LOCATION FROM cinema WHERE capacity  >  300 GROUP BY LOCATION HAVING count(*)  >=  2
Database: cinema (tables: film)
Question: Show the title and director for all films.
SQL: SELECT title ,  directed_by FROM film
Database: cinema (tables: film)
Question: What are the title and director of each film?
SQL: SELECT title ,  directed_by FROM film
Database: cinema (tables: film)
Question: Show all directors.
SQL: SELECT DISTINCT directed_by FROM film
Database: cinema (tables: film)
Question: Who are all the directors?
SQL: SELECT DISTINCT directed_by FROM film
Database: cinema (tables: film)
Question: List all directors along with the number of films directed by each director.
SQL: SELECT directed_by ,  count(*) FROM film GROUP BY directed_by