1sf/bird-sql-dev-xresults huggingface dataset:
Database: card_games
Question: Among the cards with converted mana cost higher than 5 in the set Coldsnap, how many of them have unknown power?
Evidence: card set Coldsnap refers to name = 'Coldsnap'; converted mana cost higher than 5 refers to convertedManaCost > 5; unknown power refers to power = '*' or T1.power is null
SQL: SELECT SUM(CASE WHEN T1.power LIKE '*' OR T1.power IS NULL THEN 1 ELSE 0 END) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.convertedManaCost > 5
Database: card_games
Question: What is the Italian flavor text of the card "Ancestor's Chosen"?
Evidence: Italian refers to language = 'Italian'; flavor text refers to flavorText; "Ancestor''s Chosen" refers to name = 'Ancestor''s Chosen'
SQL: SELECT T2.flavorText FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'Italian'
Database: card_games
Question: Please list all the foreign languages in which the card "Ancestor's Chosen" has a flavor text.
Evidence: "Ancestor''s Chosen" refers to name = 'Ancestor''s Chosen'; has a flavor text refers to flavorText is not null
SQL: SELECT T2.language FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.flavorText IS NOT NULL
Database: card_games
Question: What's the German type of the card "Ancestor's Chosen"?
Evidence: German refers to language = 'German'; "Ancestor's Chosen" refers to name = 'Ancestor''s Chosen'
SQL: SELECT DISTINCT T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.language = 'German'
Database: card_games
Question: Please list the Italian text ruling of all the cards in the set Coldsnap.
Evidence: card set Coldsnap refers to name = 'Coldsnap'; Italian refers to language = 'Italian'
SQL: SELECT DISTINCT T1.text FROM foreign_data AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid INNER JOIN sets AS T3 ON T3.code = T2.setCode WHERE T3.name = 'Coldsnap' AND T1.language = 'Italian'
Database: card_games
Question: Please list the Italian names of the cards in the set Coldsnap with the highest converted mana cost.
Evidence: card set Coldsnap refers to name = 'Coldsnap'; Italian refers to language = 'Italian'; highest converted mana cost refers to MAX(convertedManaCost)
SQL: SELECT T2.name FROM foreign_data AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid INNER JOIN sets AS T3 ON T3.code = T2.setCode WHERE T3.name = 'Coldsnap' AND T1.language = 'Italian' ORDER BY T2.convertedManaCost DESC
Database: card_games
Question: When was the ruling for the card 'Reminisce' created?
Evidence: Reminisce refers to name = 'Reminisce'; when created is the date
SQL: SELECT T2.date FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Reminisce'
Database: card_games
Question: What is the percentage of the cards with a converted mana cost of 7 in the set Coldsnap?
Evidence: converted mana cost of 7 refers to convertedManaCost = 7; card set Coldsnap refers to name = 'Coldsnap'; percentage = DIVIDE(SUM(convertedManaCost = 7), SUM(convertedManaCost))*100
SQL: SELECT CAST(SUM(CASE WHEN T1.convertedManaCost = 7 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'
Database: card_games
Question: What is the percentage of incredibly powerful cards in the set Coldsnap?
Evidence: card set Coldsnap refers to name = 'Coldsnap'; foil is incredibly powerful refers to cardKingdomFoilId is not null AND cardKingdomId is not null; the percentage of incredibly powerful cards in the set refers to DIVIDE(SUM(incredibly powerful), SUM(name = 'Coldsnap'))*100
SQL: SELECT CAST(SUM(CASE WHEN T1.cardKingdomFoilId IS NOT NULL AND T1.cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'
Database: card_games
Question: What's the code for the set which was released on 2017/7/14?
Evidence: released on 2017/7/14 refers to releaseDate = '2017-07-14'
SQL: SELECT code FROM sets WHERE releaseDate = '2017-07-14' GROUP BY releaseDate, code
Database: card_games
Question: List the keyrune code for the set whose code is 'PKHC'.
Evidence: keyrune code refers to keyruneCode
SQL: SELECT keyruneCode FROM sets WHERE code = 'PKHC'
Database: card_games
Question: For the set which had 'SS2' as the code, what is its magic card market id?
Evidence: magic card market id refers to mcmId
SQL: SELECT mcmId FROM sets WHERE code = 'SS2'
Database: card_games
Question: What's the magic card market name for the set which was released on 2017/6/9?
Evidence: magic card market name refers to mcmName
SQL: SELECT mcmName FROM sets WHERE releaseDate = '2017-06-09'
Database: card_games
Question: For the set "From the Vault: Lore", what is its expansion type?
Evidence: set "From the Vault refers to name which contains 'From the Vault: Lore'; expansion type refers to type
SQL: SELECT type FROM sets WHERE name LIKE '%FROM the Vault: Lore%'
Database: card_games
Question: For the set "Commander 2014 Oversized" , give its parent code.
Evidence: the set "Commander 2014 Oversized" refers to name = 'Commander 2014 Oversized';
SQL: SELECT parentCode FROM sets WHERE name = 'Commander 2014 Oversized'
Database: card_games
Question: For all cards illustrated by Jim Pavelec. and describe the text of the ruling of these cards. Do these cards have missing or degraded properties and values.
Evidence: all cards illustrated by Jim Pavelec refers to artist = 'Jim Pavelec'; the text of the ruling refers to text; cards have missing or degraded properties and values if hasContentWarning = 1 else it doesn't have;
SQL: SELECT T2.text , CASE WHEN T1.hasContentWarning = 1 THEN 'YES' ELSE 'NO' END FROM cards AS T1 INNER JOIN rulings AS T2 ON T2.uuid = T1.uuid WHERE T1.artist = 'Jim Pavelec'
Database: card_games
Question: What was the release date for the set which card "Evacuation" in it?
Evidence: "Evacuation" refers to name = 'Evacuation'; release date refers to releaseDate
SQL: SELECT T2.releaseDate FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Evacuation'
Database: card_games
Question: What is the number of cards are there in the set of "Rinascita di Alara"?
Evidence: number of cards refers to baseSetSize; set of "Rinascita di Alara" refers to translation = 'Rinascita di Alara'
SQL: SELECT T1.baseSetSize FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Rinascita di Alara'
Database: card_games
Question: List the expansion type of the set "Huitième édition".
Evidence: the set "Huitième édition" refers to translation = 'Huitième édition'; expansion type refers to type
SQL: SELECT type FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE translation = 'Huitième édition' )
Database: card_games
Question: What's the French name of the set of cards with "Tendo Ice Bridge" is in?
Evidence: French refers to language = 'French'; "Tendo Ice Bridge" is a translated name of a card; translated name refers to translation
SQL: SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Tendo Ice Bridge' AND T2.language = 'French' AND T2.translation IS NOT NULL
Database: card_games
Question: How many translations of the name of the set "Tenth Edition"?
Evidence: translations of the name refers to translation; translation is not NULL; set "Salvat 2011" refers to name = 'Tenth Edition'
SQL: SELECT COUNT(DISTINCT T2.translation) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.name = 'Tenth Edition' AND T2.translation IS NOT NULL
Database: formula_1
Question: Name the races along with its circuit name and location for f1 races hosted in September 2005.
Evidence: in September 2005 refers to MONTH(date) = 9 and YEAR(date) = 2005
SQL: SELECT DISTINCT T2.name, T1.name, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2005 AND STRFTIME('%m', T2.date) = '09'
Database: formula_1
Question: Which race was Alex Yoong in when he was in track number less than 20?
Evidence: Alex Yoong refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;track number less than 10 refers to position < 20
SQL: SELECT T1.name FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Alex' AND T3.surname = 'Yoong' AND T2.position < 20
Database: formula_1
Question: How many times did Michael Schumacher won from races hosted in Sepang International Circuit?
Evidence: win from races refers to max(points)
SQL: SELECT SUM(T2.wins) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T2.driverId = T1.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId INNER JOIN circuits AS T4 ON T4.circuitId = T3.circuitId WHERE T1.forename = 'Michael' AND T1.surname = 'Schumacher' AND T4.name = 'Sepang International Circuit'
Database: formula_1
Question: State the race and year of race in which Michael Schumacher had his fastest lap.
Evidence: fastest lap refers to min(milliseconds); Alex Yoong refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;
SQL: SELECT T1.name, T1.year FROM races AS T1 INNER JOIN lapTimes AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Michael' AND T3.surname = 'Schumacher' ORDER BY T2.milliseconds ASC LIMIT 1
Database: formula_1
Question: What is Eddie Irvine's average points scored in year 2000?
Evidence: average points = AVG(points where year = 2000)
SQL: SELECT AVG(T2.points) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T2.driverId = T1.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T1.forename = 'Eddie' AND T1.surname = 'Irvine' AND T3.year = 2000
Database: formula_1
Question: Which was Lewis Hamilton first race? What was his points recorded for his first race event?
Evidence: first race refers to min(Year); Lewis Hamiltonrefers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;
SQL: SELECT T1.name, T2.points FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Lewis' AND T3.surname = 'Hamilton' ORDER BY T1.year ASC LIMIT 1
Database: formula_1
Question: Among all European Grand Prix races, what is the percentage of the races were hosted in Germany?
Evidence: European Grand Prix races refers to races.name = 'European Grand Prix';percentage = divide(COUNT(races where country = Germany and name = 'Europearn Grand Prix'),COUNT(races where name = 'Europearn Grand Prix'))*100
SQL: SELECT CAST(COUNT(CASE WHEN T1.country = 'Germany' THEN T2.circuitID END) AS REAL) * 100 / COUNT(T2.circuitId) FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'European Grand Prix'
Database: formula_1
Question: What's the location coordinates of Silverstone Circuit?
Evidence: location coordinates refers to (lat, lng); Silverstone Circuit refers to circuits.name = 'Silverstone Circuit'
SQL: SELECT lat, lng FROM circuits WHERE name = 'Silverstone Circuit'
Database: formula_1
Question: Which of these circuits is located at a higher latitude, Silverstone Circuit, Hockenheimring or Hungaroring?
Evidence: higher latitude refers to max(lat)
SQL: SELECT name FROM circuits WHERE name IN ('Silverstone Circuit', 'Hockenheimring', 'Hungaroring') ORDER BY lat DESC LIMIT 1
Database: formula_1
Question: What's the reference name of Marina Bay Street Circuit?
Evidence: reference name refers to circuitRef; Marina Bay Street Circuit refers to circuits.name = 'Marina Bay Street Circuit'
SQL: SELECT circuitRef FROM circuits WHERE name = 'Marina Bay Street Circuit'
Database: formula_1
Question: In which country can I find the circuit with the highest altitude?
Evidence: highest altitude refers to max(alt)
SQL: SELECT country FROM circuits ORDER BY alt DESC LIMIT 1
Database: formula_1
Question: How many drivers don't have a code?
Evidence: don't have a code refers to code is null
SQL: SELECT COUNT(driverId) - COUNT(CASE WHEN code IS NOT NULL THEN code END) FROM drivers
Database: formula_1
Question: Which country is the oldest driver from?
Evidence: date of birth refers to drivers.dob; The larger the birthday value, the younger the person is, and vice versa;
SQL: SELECT nationality FROM drivers WHERE dob IS NOT NULL ORDER BY dob ASC LIMIT 1
Database: formula_1
Question: Please list the surnames of all the Italian drivers.
Evidence: Italian refers to nationality = 'italian'
SQL: SELECT surname FROM drivers WHERE nationality = 'Italian'
Database: formula_1
Question: Which website should I go to if I want to know more about Anthony Davidson?
Evidence: website refers to url
SQL: SELECT url FROM drivers WHERE forename = 'Anthony' AND surname = 'Davidson'
Database: formula_1
Question: What's Lewis Hamilton's reference name?
Evidence: reference name refers to driverRef
SQL: SELECT driverRef FROM drivers WHERE forename = 'Lewis' AND surname = 'Hamilton'
Database: formula_1
Question: Please give more information about the Formula_1 races that used the Silverstone Circuit.
Evidence: more information refers to url
SQL: SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Silverstone Circuit'
Database: formula_1
Question: Please give the link of the website that shows more information about the circuits the Spanish Grand Prix used in 2009.
Evidence: link of the website refers to url
SQL: SELECT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2009 AND T2.name = 'Spanish Grand Prix'
Database: formula_1
Question: What's the fastest lap time ever in a race for Lewis Hamilton?
Evidence: fastest lap time ever refers to min(fastestLapTime)
SQL: SELECT T2.fastestLapTime FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton' AND T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapTime ASC LIMIT 1
Database: formula_1
Question: Which driver ranked the first in the Canadian Grand Prix in 2007? Please give his reference name.
Evidence: reference name refers to driverRef; Canadian Grand Prix refers to races.name = 'Canadian Grand Prix';
SQL: SELECT T3.forename, T3.surname, T3.driverRef FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T1.name = 'Canadian Grand Prix' AND T2.rank = 1 AND T1.year = 2007
Database: formula_1
Question: In which Formula_1 race did Lewis Hamilton rank the highest?
Evidence: rank the highest refers to min(rank); Lewis Hamilton refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;
SQL: SELECT name FROM races WHERE raceId IN ( SELECT raceId FROM results WHERE rank = 1 AND driverId = ( SELECT driverId FROM drivers WHERE forename = 'Lewis' AND surname = 'Hamilton' ) )
Database: formula_1
Question: What was the fastest lap speed among all drivers in the 2009 Spanish Grand Prix?
Evidence: the fastest lap speed among all refers to max(fastestLapSpeed); Spanish Grand Prix refers to races.name = 'Spanish Grand Prix';
SQL: SELECT T2.fastestLapSpeed FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.name = 'Spanish Grand Prix' AND T1.year = 2009 AND T2.fastestLapSpeed IS NOT NULL ORDER BY T2.fastestLapSpeed DESC LIMIT 1
Database: formula_1
Question: In which years did Lewis Hamilton participate in a Formula_1 race?
SQL: SELECT DISTINCT T1.year FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Lewis' AND T3.surname = 'Hamilton'
Database: formula_1
Question: What was Lewis Hamilton's final rank in the 2008 Chinese Grand Prix?
Evidence: Lewis Hamilton refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname; final rank refers to positionOrder; Chinese Grand Prix refers to races.name = 'Chinese Grand Prix';
SQL: SELECT T2.positionOrder FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Lewis' AND T3.surname = 'Hamilton' AND T1.name = 'Chinese Grand Prix' AND T1.year = 2008
Database: formula_1
Question: Which driver was in the no. 4 grid formation when starting the race in 1989's Australian Grand Prix? Please give his forename and surname.
Evidence: the no. 4 grid formation refers to grid = 4
SQL: SELECT T3.forename, T3.surname FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T2.grid = 4 AND T1.name = 'Australian Grand Prix' AND T1.year = 1989
Database: formula_1
Question: How many drivers managed to finish the race in the 2008 Australian Grand Prix?
Evidence: managed to finish the race refers to time is not null
SQL: SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.name = 'Australian Grand Prix' AND T1.year = 2008 AND T2.time IS NOT NULL
Database: formula_1
Question: What's the finish time for the driver who ranked second in 2008's AustChineseralian Grand Prix?
Evidence: finish time refers to time; Chinese Grand Prix refers to races.name = 'Chinese Grand Prix';
SQL: SELECT T1.time FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T1.rank = 2 AND T2.name = 'Chinese Grand Prix' AND T2.year = 2008
Database: formula_1
Question: Who was the champion of 2008's Australian Grand Prix and where can I know more about him?
Evidence: only champion's finished time is represented by 'HH:MM:SS.mmm'; where can I know more refers to url
SQL: SELECT T1.forename, T1.surname, T1.url FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T3.name = 'Australian Grand Prix' AND T2.time LIKE '_:%:__.___' AND T3.year = 2008
Database: formula_1
Question: How many drivers from the UN participated in the 2008 Australian Grand Prix?
Evidence: from the UN refers to nationality = 'British'
SQL: SELECT COUNT(*) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T3.name = 'Australian Grand Prix' AND T1.nationality = 'British' AND T3.year = 2008
Database: formula_1
Question: Among the drivers that finished the race in the 2008 Chinese Grand Prix, how many of them have participated in Formula_1 races?
Evidence: COUNT(raceID) > 0 reveals that this driver participated in races; drivers who finished the race refers to time has value.
SQL: SELECT COUNT(*) FROM ( SELECT T1.driverId FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.name = 'Chinese Grand Prix' AND T2.year = 2008 AND T1.time IS NOT NULL GROUP BY T1.driverId HAVING COUNT(T2.raceId) > 0 )
Database: formula_1
Question: What is the average fastest lap time in seconds for Lewis Hamilton in all the Formula_1 races?
Evidence: average fastest lap time = avg(fastestLapTime); The time is recorded on 'MM:SS.mmm'
SQL: SELECT AVG(CAST(SUBSTR(T2.fastestLapTime, 1, INSTR(T2.fastestLapTime, ':') - 1) AS INTEGER) * 60 + CAST(SUBSTR(T2.fastestLapTime, INSTR(T2.fastestLapTime, ':') + 1) AS REAL)) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId WHERE T1.surname = 'Hamilton' AND T1.forename = 'Lewis'
Database: formula_1
Question: What is the rate of drivers completing all the laps in the 2008 Australian Grand Prix?
Evidence: completing all the laps refers to time is not null; rate = divide(COUNT(raceID where time is not null), COUNT(raceID))
SQL: SELECT CAST(SUM(IIF(T1.time IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.resultId) FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.name = 'Australian Grand Prix' AND T2.year = 2008
Database: formula_1
Question: How much faster in percentage is the champion than the driver who finished the race last in the 2008 Australian Grand Prix?
Evidence: how much faster in percentage = divide(subtract(incremental time, champion time), last_driver time) * 100; last driver finished time = incremental time + champion time; only champion's finished time is represented by 'HH:MM:SS.mmm'; finished the game refers to time is not null
SQL: WITH time_in_seconds AS ( SELECT T1.positionOrder, CASE WHEN T1.positionOrder = 1 THEN (CAST(SUBSTR(T1.time, 1, 1) AS REAL) * 3600) + (CAST(SUBSTR(T1.time, 3, 2) AS REAL) * 60) + CAST(SUBSTR(T1.time, 6) AS REAL) ELSE CAST(SUBSTR(T1.time, 2) AS REAL) END AS time_seconds FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.name = 'Australian Grand Prix' AND T1.time IS NOT NULL AND T2.year = 2008 ), champion_time AS ( SELECT time_seconds FROM time_in_seconds WHERE positionOrder = 1), last_driver_incremental AS ( SELECT time_seconds FROM time_in_seconds WHERE positionOrder = (SELECT MAX(positionOrder) FROM time_in_seconds) ) SELECT (CAST((SELECT time_seconds FROM last_driver_incremental) AS REAL) * 100) / (SELECT time_seconds + (SELECT time_seconds FROM last_driver_incremental) FROM champion_time)
Database: formula_1
Question: How many circuits are there in Adelaide, Australia?
Evidence: Australia is the country; Melbourne is the location of circuit;
SQL: SELECT COUNT(circuitId) FROM circuits WHERE location = 'Adelaide' AND country = 'Australia'
Database: formula_1
Question: Please list the location coordinates of the US circuits.
Evidence: location coordinates refers to (lat, lng); the US refers to country = 'USA';
SQL: SELECT lat, lng FROM circuits WHERE country = 'USA'
Database: formula_1
Question: How many British drivers were born after 1980?
Evidence: born after 1980 refers to year (dob) >1980;
SQL: SELECT COUNT(driverId) FROM drivers WHERE nationality = 'British' AND STRFTIME('%Y', dob) > '1980'
Database: formula_1
Question: What are the maximum points of British constructors?
Evidence: maximum points = MAX(points); British is a nationality
SQL: SELECT MAX(T1.points) FROM constructorStandings AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T2.nationality = 'British'
Database: formula_1
Question: Please list the constructor names with 0 points at race 291.
Evidence: race at 291 refers to raceID = 291;
SQL: SELECT T2.name FROM constructorStandings AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.points = 0 AND T1.raceId = 291
Database: formula_1
Question: How many Japanese constructors have 0 points in 2 races?
Evidence: 2 races refers to COUNT(raceID) = 2; Japanese refers to constructors.nationality = 'Japanese';
SQL: SELECT COUNT(T1.raceId) FROM constructorStandings AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.points = 0 AND T2.nationality = 'Japanese' GROUP BY T1.constructorId HAVING COUNT(raceId) = 2
Database: formula_1
Question: How many French constructors have a lap number of over 50?
Evidence: lap numbers of over 50 refers to laps > 50;
SQL: SELECT COUNT(DISTINCT T2.constructorId) FROM results AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.laps > 50 AND T2.nationality = 'French'
Database: formula_1
Question: Please calculate the race completion percentage of Japanese drivers from 2007 to 2009.
Evidence: from 2007 to 2009 refers to year between 2007 and 2009; race completion refers to time is not null; percentage = Divide(COUNT(DriverID where time is not null and year between 2007 and 2009),Count (DriverID where year between 2007 and 2009))*100; 
SQL: SELECT CAST(SUM(IIF(T1.time IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.raceId) FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN drivers AS T3 on T1.driverId = T3.driverId WHERE T3.nationality = 'Japanese' AND T2.year BETWEEN 2007 AND 2009