1sf/bird-sql-dev-xresults huggingface dataset:
Database: superhero
Question: In superheroes with weight less than 100, list the full name of the superheroes with brown eyes.
Evidence: weight less than 100 refers to weight_kg < 100
SQL: SELECT T1.full_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.weight_kg < 100 AND T2.colour = 'Brown'
Database: superhero
Question: Provide the weight and race of the superhero with superhero ID 40.
Evidence: weight refers to weight_kg; superhero ID 40 refers to superhero.id = 40;
SQL: SELECT T1.weight_kg, T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.id = 40
Database: superhero
Question: List the hero ID of superheroes have intellegence as their power.
Evidence: hero ID refers to superhero.id; have intelligence as their power refers to power_name = 'Intelligence';
SQL: SELECT T1.hero_id FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T2.power_name = 'Intelligence'
Database: superhero
Question: Give the eye colour of Blackwulf.
Evidence: eye colour refers to colour.colour where eye_colour_id = colour.id; Blackwulf refers to superhero_name = 'Blackwulf';
SQL: SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.superhero_name = 'Blackwulf'
Database: superhero
Question: List the power of superheroes with height greater than 80% of the average height of all superheroes.
Evidence: power of superheroes refers to power_name; height greater than 80% of the average height of all superheroes = height_cm > MULTIPLY(AVG(height_cm), 0.8);
SQL: SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.height_cm * 100 > ( SELECT AVG(height_cm) FROM superhero ) * 80
Database: formula_1
Question: Please list the reference names of the drivers who are eliminated in the first period in race number 20.
Evidence: driver reference name refers to driverRef; first qualifying period refers to q1; drivers who are eliminated in the first qualifying period refers to 5 drivers with MAX(q1); race number refers to raceId;
SQL: SELECT T2.driverRef FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 20 ORDER BY T1.q1 DESC LIMIT 5
Database: formula_1
Question: What is the surname of the driver with the best lap time in race number 19 in the second qualifying period?
Evidence: race number refers to raceId; second qualifying period refers to q2; best lap time refers to MIN(q2);
SQL: SELECT T2.surname FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 19 ORDER BY T1.q2 ASC LIMIT 1
Database: formula_1
Question: Please list the year during which the race is held on circuits in Shanghai.
Evidence: Shanghai is a name of location;
SQL: SELECT T2.year FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.location = 'Shanghai'
Database: formula_1
Question: Where can the introduction of the races held on Circuit de Barcelona-Catalunya be found?
Evidence: introduction of races refers to url; Circuit de Barcelona-Catalunya is a name of circuit;
SQL: SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Circuit de Barcelona-Catalunya'
Database: financial
Question: How many accounts in North Bohemia has made a transaction with the partner's bank being AB?
Evidence: A3 contains the region names; North Bohemia is a region.
SQL: SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.bank = 'AB' AND T1.A3 = 'north Bohemia'
Database: financial
Question: Please list the name of the districts with accounts that made withdrawal transactions.
Evidence: A2 refers to district name; type = 'VYDAJ' stands for withdrawal transactions
SQL: SELECT DISTINCT T1.A2 FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.type = 'VYDAJ'
Database: financial
Question: What is the average number of crimes committed in 1995 in regions where the number exceeds 4000 and the region has accounts that are opened starting from the year 1997?
Evidence: A3 refers to region names; A15 stands for the average number of crimes commited in 1995.
SQL: SELECT AVG(T1.A15) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T2.date) >= '1997' AND T1.A15 > 4000
Database: financial
Question: How many 'classic' cards are eligible for loan?
Evidence: when the account type = 'OWNER', it's eligible for loan
SQL: SELECT COUNT(T1.card_id) FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'classic' AND T2.type = 'OWNER'
Database: financial
Question: How many male clients in 'Hl.m. Praha' district?
Evidence: District data appears in the A2; Male means that gender = 'M'
SQL: SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A2 = 'Hl.m. Praha'
Database: financial
Question: How many percent of 'Gold' cards were issued prior to 1998?
Evidence: Percent of Gold = [ count(type = 'gold' and issued date < 1998) / count(all cards)] * 100%
SQL: SELECT CAST(SUM(type = 'gold' AND STRFTIME('%Y', issued) < '1998') AS REAL) * 100 / COUNT(card_id) FROM card
Database: financial
Question: Who is the owner of the account with the largest loan amount?
SQL: SELECT T1.client_id FROM disp AS T1 INNER JOIN account AS T3 ON T1.account_id = T3.account_id INNER JOIN loan AS T2 ON T3.account_id = T2.account_id WHERE T1.type = 'OWNER' ORDER BY T2.amount DESC LIMIT 1
Database: financial
Question: What is the number of committed crimes in 1995 in the district of the account with the id 532?
Evidence: A15 contains information about number of committed crimes in 1995
SQL: SELECT T1.A15 FROM district AS T1 INNER JOIN `account` AS T2 ON T1.district_id = T2.district_id WHERE T2.account_id = 532
Database: financial
Question: What is the district Id of the account that placed the order with the id 33333?
SQL: SELECT T3.district_id FROM `order` AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.order_id = 33333
Database: financial
Question: List all the withdrawals in cash transactions that the client with the id 3356 makes.
Evidence: operation = 'VYBER' refers to withdrawal in cash
SQL: SELECT T4.trans_id FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T2.account_id = T3.account_id INNER JOIN trans AS T4 ON T3.account_id = T4.account_id WHERE T1.client_id = 3356 AND T4.operation = 'VYBER'
Database: financial
Question: Among the weekly issuance accounts, how many have a loan of under 200000?
Evidence: frequency = 'POPLATEK TYDNE' stands for weekly issuance
SQL: SELECT COUNT(T1.account_id) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T2.frequency = 'POPLATEK TYDNE' AND T1.amount < 200000
Database: financial
Question: What is the region of the client with the id 3541 from?
Evidence: A3 refers to region
SQL: SELECT T1.A3 FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.client_id = 3541
Database: financial
Question: Which district has the most accounts with loan contracts finished with no problems?
Evidence: status = 'A' refers to loan contracts finished with no problems
SQL: SELECT T1.A2 FROM District AS T1 INNER JOIN Account AS T2 ON T1.District_id = T2.District_id INNER JOIN Loan AS T3 ON T2.Account_id = T3.Account_id WHERE T3.status = 'A' GROUP BY T1.District_id ORDER BY COUNT(T2.Account_id) DESC LIMIT 1
Database: financial
Question: Please list all the transactions made by accounts from district 5.
SQL: SELECT T3.trans_id FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T1.district_id = 5
Database: financial
Question: How many of the accounts are from Jesenik district?
SQL: SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A2 = 'Jesenik'
Database: financial
Question: List all the clients' IDs whose junior credit cards were issued after 1996.
Evidence: After 1996 means date > = '1997-01-01
SQL: SELECT T2.client_id FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'junior' AND T1.issued >= '1997-01-01'
Database: financial
Question: What percentage of clients who opened their accounts in the district with an average salary of over 10000 are women?
Evidence: Female refers to gender = 'F'; Woman and female are closed; Average salary can be found in A11
SQL: SELECT CAST(SUM(T2.gender = 'F') AS REAL) * 100 / COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.A11 > 10000
Database: financial
Question: What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997?
Evidence: Growth rate = (sum of amount_1997 - sum of amount_1996) / (sum of amount_1996) * 100%; Male refers to gender = 'M'
SQL: SELECT CAST((SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1997' THEN T1.amount ELSE 0 END) - SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN disp AS T3 ON T3.account_id = T2.account_id INNER JOIN client AS T4 ON T4.client_id = T3.client_id WHERE T4.gender = 'M' AND T3.type = 'OWNER'
Database: financial
Question: How many credit card withdrawals were recorded after 1995?
Evidence: Operation = 'VYBER KARTOU' means credit card withdrawals
SQL: SELECT COUNT(account_id) FROM trans WHERE STRFTIME('%Y', date) > '1995' AND operation = 'VYBER KARTOU'
Database: financial
Question: What was the difference in the number of crimes committed in East and North Bohemia in 1996?
Evidence: Difference in no. of committed crimes between 2 regions = Total no. of committed crimes in 1996 in north Bohemia - Total no. of committed crimes in 1996 in e ast Bohemia. A3 refers to region. Data about no. of committed crimes 1996 appears in A16
SQL: SELECT SUM(IIF(A3 = 'east Bohemia', A16, 0)) - SUM(IIF(A3 = 'north Bohemia', A16, 0)) FROM district
Database: financial
Question: How often does account number 3 request an account statement to be released? What was the aim of debiting 3539 in total?
Evidence: k_symbol refers to the purpose of payments
SQL: SELECT T1.frequency, T2.k_symbol FROM account AS T1 INNER JOIN (SELECT account_id, k_symbol, SUM(amount) AS total_amount FROM `order` GROUP BY account_id, k_symbol) AS T2 ON T1.account_id = T2.account_id WHERE T1.account_id = 3 AND T2.total_amount = 3539
Database: financial
Question: How many accounts have an owner disposition and request for a statement to be generated upon a transaction?
Evidence: Frequency = 'POPLATEK PO OBRATU' stands for issuance after transaction
SQL: SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T2.type = 'OWNER' AND T1.frequency = 'POPLATEK PO OBRATU'
Database: financial
Question: What is the sum that client number 4's account has following transaction 851? Who owns this account, a man or a woman?
SQL: SELECT T4.balance, T1.gender FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 ON T2.account_id =T3.account_id INNER JOIN trans AS T4 ON T3.account_id = T4.account_id WHERE T1.client_id = 4 AND T4.trans_id = 851
Database: financial
Question: Please provide the IDs of the 3 female clients with the largest loans.
Evidence: Female refers to gender = 'F'
SQL: SELECT T1.client_id FROM client AS T1 INNER JOIN disp AS T4 on T1.client_id= T4.client_id INNER JOIN account AS T2 ON T4.account_id = T2.account_id  INNER JOIN loan AS T3 ON T2.account_id = T3.account_id and T4.account_id = T3.account_id WHERE T1.gender = 'F' ORDER BY T3.amount DESC LIMIT 3
Database: financial
Question: How many male customers who were born between 1974 and 1976 have made a payment on their home in excess of $4000?
Evidence: Man and male refers to gender = 'M'; 'SIPO' stands for household payment
SQL: SELECT COUNT(T1.account_id) FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN disp AS T4 ON T2.account_id = T4.account_id INNER JOIN client AS T3 ON T4.client_id = T3.client_id WHERE STRFTIME('%Y', T3.birth_date) BETWEEN '1974' AND '1976' AND T3.gender = 'M' AND T1.amount > 4000 AND T1.k_symbol = 'SIPO'
Database: financial
Question: How many female customers have a junior credit card?
Evidence: Female refers to gender = 'F'
SQL: SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T2.disp_id = T3.disp_id WHERE T1.gender = 'F' AND T3.type = 'junior'
Database: financial
Question: What proportion of customers who have accounts at the Prague branch are female?
Evidence: Female refers to gender = 'F'; Percentage of female clients in Prague branch = count[female clients with accounts in Prague branch / count(clients with accounts in Prague branch)] * 100%; A3 may contain information about Prague
SQL: SELECT CAST(SUM(T2.gender = 'F') AS REAL) / COUNT(T2.client_id) * 100 FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'Prague'
Database: financial
Question: What percentage of male clients request for weekly statements to be issued?
Evidence: Percentage of male clients = [count(male clients who requested weekly statements / count(clients who requested weekly statements)] * 100%; Male means gender = 'M'; 'POPLATEK TYDNE' stands for weekly issuance
SQL: SELECT CAST(SUM(T1.gender = 'M') AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T3 ON T1.district_id = T3.district_id INNER JOIN account AS T2 ON T2.district_id = T3.district_id INNER JOIN disp as T4 on T1.client_id = T4.client_id AND T2.account_id = T4.account_id WHERE T2.frequency = 'POPLATEK TYDNE'
Database: financial
Question: How many clients who choose statement of weekly issuance are Owner?
Evidence: Frequency = 'POPLATEK TYDNE' refers to weekly issuance
SQL: SELECT COUNT(T2.account_id) FROM account AS T1 INNER JOIN disp AS T2 ON T2.account_id = T1.account_id WHERE T1.frequency = 'POPLATEK TYDNE' AND T2.type = 'OWNER'
Database: financial
Question: Name the account numbers of female clients who are oldest and have lowest average salary?
Evidence: Female refers to 'F' in the gender; A11 contains information about average salary
SQL: SELECT T3.account_id FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN account AS T3 ON T2.district_id = T3.district_id INNER JOIN disp AS T4 ON T1.client_id = T4.client_id AND T4.account_id = T3.account_id  WHERE T1.gender = 'F' ORDER BY T1.birth_date ASC, T2.A11 ASC LIMIT 1
Database: financial
Question: How many clients who were born in 1920 stay in east Bohemia?
Evidence: East Bohemia appears in the column A3, which refers to the region.
SQL: SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T1.birth_date) = '1920' AND T2.A3 = 'east Bohemia'
Database: financial
Question: How many loan accounts are for pre-payment of duration of 24 months with weekly issuance of statement.
Evidence: Frequency = 'POPLATEK TYDNE' referes to weekly statement
SQL: SELECT COUNT(T2.account_id) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.duration = 24 AND T1.frequency = 'POPLATEK TYDNE'
Database: financial
Question: What is the average amount of loan which are still on running contract with statement issuance after each transaction?
Evidence: status = 'C' stands for running contract, OK so far; status = 'D' stands for running contract, client in debt. 'POPLATEK PO OBRATU' stands for issuance after transaction
SQL: SELECT AVG(T2.amount) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.status IN ('C', 'D') AND T1.frequency = 'POPLATEK PO OBRATU'
Database: financial
Question: List all ID and district for clients that can only have the right to issue permanent orders or apply for loans.
Evidence: Only the owner accounts have the right to issue permanent orders or apply for loans
SQL: SELECT T3.client_id, T2.district_id, T2.A2 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T1.account_id = T3.account_id WHERE T3.type = 'OWNER'
Database: financial
Question: Provide the IDs and age of the client with high level credit card, which is eligible for loans.
Evidence: the credit card is high-level refers to card.type = 'gold'; eligible for loans refers to disp.type = 'OWNER'
SQL: SELECT T1.client_id, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T3.birth_date) FROM disp AS T1 INNER JOIN card AS T2 ON T2.disp_id = T1.disp_id INNER JOIN client AS T3 ON T1.client_id = T3.client_id WHERE T2.type = 'gold' AND T1.type = 'OWNER'
Database: toxicology
Question: What is the most common bond type?
Evidence: most common bond type refers MAX(COUNT(bond_type))
SQL: SELECT T.bond_type FROM ( SELECT bond_type, COUNT(bond_id) FROM bond GROUP BY bond_type ORDER BY COUNT(bond_id) DESC LIMIT 1 ) AS T
Database: toxicology
Question: In the non-carcinogenic molecules, how many contain chlorine atoms?
Evidence: non-carcinogenic molecules refers to label = '-'; chlorine atoms refers to element = 'cl'
SQL: SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.element = 'cl' AND T1.label = '-'
Database: toxicology
Question: Calculate the average number of oxygen atoms in single-bonded molecules.
Evidence: single-bonded molecules refers to bond_type = '-' ; average number of oxygen atom = AVG(element = 'o')
SQL: SELECT AVG(oxygen_count) FROM (SELECT T1.molecule_id, COUNT(T1.element) AS oxygen_count FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id  WHERE T2.bond_type = '-' AND T1.element = 'o'  GROUP BY T1.molecule_id) AS oxygen_counts
Database: toxicology
Question: On average how many carcinogenic molecules are single bonded?
Evidence: carcinogenic molecules refers to label = '+'; single-bonded refers to bond_type = '-'; average = DIVIDE(SUM(bond_type = '-'), COUNT(atom_id))
SQL: SELECT AVG(single_bond_count) FROM (SELECT T3.molecule_id, COUNT(T1.bond_type) AS single_bond_count FROM bond AS T1  INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN molecule AS T3 ON T3.molecule_id = T2.molecule_id WHERE T1.bond_type = '-' AND T3.label = '+' GROUP BY T3.molecule_id) AS subquery
Database: toxicology
Question: In the molecule containing sodium atoms, how many are non-carcinogenic?
Evidence: non-carcinogenic refers to label = '-'; sodium atoms refers to element = 'na'
SQL: SELECT COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'na' AND T2.label = '-'
Database: formula_1
Question: Please give the name of the race held on the circuits in Germany.
Evidence: Germany is a name of country;
SQL: SELECT DISTINCT T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Germany'
Database: formula_1
Question: Please list the positions of the circuits built by the constructor Renault.
Evidence: Renault is a name of constructor;
SQL: SELECT DISTINCT T1.position FROM constructorStandings AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T2.name = 'Renault'
Database: formula_1
Question: How many races in the year 2010 are held on grand prixs outside Asia and Europe?
SQL: SELECT COUNT(T3.raceId) FROM circuits AS T1 INNER JOIN races AS T3 ON T3.circuitID = T1.circuitId WHERE T1.country NOT IN ( 'Bahrain', 'China', 'Singapore', 'Japan', 'Korea', 'Turkey', 'UAE', 'Malaysia', 'Spain', 'Monaco', 'Azerbaijan', 'Austria', 'Belgium', 'France', 'Germany', 'Hungary', 'Italy', 'UK' ) AND T3.year = 2010
Database: formula_1
Question: Please give the names of the races held on the circuits in Spain.
Evidence: Spain is a name of country;
SQL: SELECT DISTINCT T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'Spain'
Database: formula_1
Question: What is the coordinates location of the circuits for Australian grand prix?
Evidence: coordinate position/location refers to lat, lng; circuits for Australian grand prix refers to races.name = 'Australian Grand Prix'
SQL: SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Australian Grand Prix'
Database: formula_1
Question: Where can I find the information about the races held on Sepang International Circuit?
Evidence: information about races 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 = 'Sepang International Circuit'
Database: formula_1
Question: Give the coordinate position for Abu Dhabi Grand Prix.
Evidence: coordinate position/location refers to lat, lng; Abu Dhabi Grand Prix refers to races.name = 'Abu Dhabi Grand Prix'
SQL: SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Abu Dhabi Grand Prix'
Database: formula_1
Question: Which country is the constructor which got 1 point in the race No. 24 from?
Evidence: race number refers to raceId;
SQL: SELECT T2.nationality FROM constructorResults AS T1 INNER JOIN constructors AS T2 ON T2.constructorId = T1.constructorId WHERE T1.raceId = 24 AND T1.points = 1
Database: formula_1
Question: What's Bruno Senna's Q1 result in the qualifying race No. 354?
Evidence: race number refers to raceId; Bruno Senna refers to the full name of the driver; Full name of the driver refers to drivers.forename and drivers.surname;
SQL: SELECT T1.q1 FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 354 AND T2.forename = 'Bruno' AND T2.surname = 'Senna'
Database: formula_1
Question: For the driver who had the Q2 time as 0:01:40 in the qualifying race No. 355, what is his nationality?
Evidence: race number refers to raceId;
SQL: SELECT DISTINCT T2.nationality FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 355 AND T1.q2 LIKE '1:40%'
Database: formula_1
Question: What is his number of the driver who finished 0:01:54 in the Q3 of qualifying race No.903?
Evidence: race number refers to raceId; finished 0:0M:SS in the Q3 refers to q3 LIKE 'M:SS%'
SQL: SELECT T2.number FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 903 AND T1.q3 LIKE '1:54%'
Database: formula_1
Question: For the Bahrain Grand Prix in 2007, how many drivers not finished the game?
Evidence: Bahrain Grand Prix refers to races.name = 'Bahrain Grand Prix'; drivers who finished the race refers to time is not empty (i.e. time IS NOT NULL);
SQL: SELECT COUNT(T3.driverId) 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.year = 2007 AND T1.name = 'Bahrain Grand Prix' AND T2.time IS NULL
Database: formula_1
Question: Show me the season page of year when the race No. 901 took place.
Evidence: race number refers to raceId;
SQL: SELECT T2.url FROM races AS T1 INNER JOIN seasons AS T2 ON T2.year = T1.year WHERE T1.raceId = 901
Database: formula_1
Question: For the race happened on 2015/11/29, how many drivers finished the game?
Evidence: game and race are synonyms; drivers who finished the race should have record in time;
SQL: SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '2015-11-29' AND T2.time IS NOT NULL