Database: financial
Question: Among the accounts who have approved loan date in 1997, list out the accounts that have the lowest approved amount and choose weekly issuance statement.
Evidence: 'POPLATEK TYDNE' stands for weekly issuance
SQL: SELECT T2.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1997' AND T2.frequency = 'POPLATEK TYDNE' ORDER BY T1.amount LIMIT 1

Database: student_club
Question: Which budget category does the expense 'Posters' fall to?
Evidence: 'Posters' refers to expense description
SQL: SELECT DISTINCT T2.category FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id WHERE T1.expense_description = 'Posters'

Database: codebase_community
Question: State the detailed content of the comment which was created on 7/19/2010 7:25:47 PM.
Evidence: detailed content of the comment refers to Text; created on 7/19/2010 7:16:14 PM refers to CreationDate = '2010-07-19 19:16:14.0'
SQL: SELECT Text FROM comments WHERE CreationDate = '2010-07-19 19:16:14.0'

Database: thrombosis_prediction
Question: What is the highest total bilirubin level recorded? List out the patient details with ID, sex and birthday with that index.
Evidence: the highest total bilirubin refers to MAX(T-BIL)
SQL: SELECT T2.`T-BIL`, T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T2.`T-BIL` DESC LIMIT 1

Database: formula_1
Question: Name the driver with the most winning. Mention his nationality and what is his maximum point scores.
Evidence: Full name of the driver refers to drivers.forename and drivers.surname; the most winning refers to MAX(COUNT(wins)); average point scores refers to MAX(points);
SQL: SELECT T1.forename, T1.surname, T1.nationality, MAX(T2.points) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T2.driverId = T1.driverId WHERE T2.wins >= 1 GROUP BY T1.forename, T1.surname, T1.nationality ORDER BY COUNT(T2.wins) DESC LIMIT 1

Database: card_games
Question: Please list the name of the cards in the set Coldsnap with the highest converted mana cost.
Evidence: card set Coldsnap refers to name = 'Coldsnap'
SQL: SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' ORDER BY T1.convertedManaCost DESC LIMIT 1

Database: formula_1
Question: Who was the player that got the lap time of 0:01:27 in the race No. 161? Show his introduction website.
Evidence: player and driver are synonyms; the lap time of 0:0M:SS refers to lapTime.time LIKE 'M:SS%';race number refers to raceId; introduction website of the drivers refers to url;
SQL: SELECT DISTINCT T2.forename, T2.surname, T2.url FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 161 AND T1.time LIKE '1:27%'

Database: student_club
Question: Tell the hometown county for "Adela O'Gallagher".
Evidence: hometown county refers to county
SQL: SELECT T2.county FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Adela' AND T1.last_name = 'O''Gallagher'

Database: codebase_community
Question: How many users from New York have a teacher and supporter badge?
Evidence: "Supporter" and "Teachers" are both Name of badge; 'New York' is the Location; user refers to UserId
SQL: SELECT COUNT(DISTINCT T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Name IN ('Supporter', 'Teacher') AND T2.Location = 'New York'

Database: card_games
Question: How many unknown power cards contain info about the triggered ability
Evidence: unknown power cards refers to power is null or power = '*';contain info about the triggered ability refers to text contains 'triggered ability'
SQL: SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE (T1.power IS NULL OR T1.power = '*') AND T2.text LIKE '%triggered ability%'

Database: thrombosis_prediction
Question: What is the disease patient '30609' diagnosed with. List all the date of laboratory tests done for this patient.
Evidence: '30609' is the Patient ID; disease means Diagnosis
SQL: SELECT T1.Diagnosis, T2.Date FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 30609

Database: card_games
Question: Please list the websites where I can purchase the cards that have the promotional type of "bundle".
Evidence: promotional type of "bundle" refers to promoTypes = 'bundle'; websites refers to purchaseUrls
SQL: SELECT DISTINCT purchaseUrls FROM cards WHERE promoTypes = 'bundle'

Database: california_schools
Question: What is the average math score of the school with the lowest average score for all subjects, and in which county is it located?
Evidence: Average score for all subjects can be computed by AvgScrMath + AvgScrRead + AvgScrWrite
SQL: SELECT T1.AvgScrMath, T2.County FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath IS NOT NULL ORDER BY T1.AvgScrMath + T1.AvgScrRead + T1.AvgScrWrite ASC LIMIT 1

Database: financial
Question: Which district has highest active loan?
Evidence: A3 refers to district names; Active loan refers to running contracts; Status = 'C' stands for running contract, OK so far; Status = 'D' stands for running contract, client in debt
SQL: SELECT T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.status IN ('C', 'D') GROUP BY T2.A3 ORDER BY SUM(T3.amount) DESC LIMIT 1

Database: thrombosis_prediction
Question: How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation?
Evidence: normal Rhuematoid Factor refers TO RA IN('-', '+-'); positive measure of degree of coagulation refers to KCT = '+'; Should compute the number of distinct ones
SQL: SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE (T2.RA = '-' OR T2.RA = '+-') AND T3.KCT = '+'

Database: california_schools
Question: List the top five schools, by descending order, from the highest to the lowest, the most number of Enrollment (Ages 5-17). Please give their NCES school identification number.
SQL: SELECT T1.NCESSchool FROM schools AS T1 INNER JOIN frpm AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T2.`Enrollment (Ages 5-17)` DESC LIMIT 5

Database: codebase_community
Question: Among the posts that were voted by user 1465, what is the id of the most valuable post?
Evidence: user 1465 refers to UserId = 1465; the most valuable post refers to MAX(FavoriteCount);
SQL: SELECT T2.Id FROM votes AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.UserId = 1465 ORDER BY T2.FavoriteCount DESC LIMIT 1

Database: toxicology
Question: In how many atoms is there no bromine?
Evidence: atoms with no bromine refers to element ! = 'br'
SQL: SELECT COUNT(DISTINCT T.atom_id) FROM atom AS T WHERE T.element <> 'br'

Database: superhero
Question: Provide the name of superhero with superhero ID 294.
Evidence: name of superhero refers to superhero_name; superhero ID 294 refers to superhero.id = 294;
SQL: SELECT superhero_name FROM superhero WHERE id = 294

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: toxicology
Question: Which bond type accounted for the majority of the bonds found in molecule TR010 and state whether or not this molecule is carcinogenic?
Evidence: TR010 is the molecule id; majority of the bond found refers to MAX(COUNT(bond_type)); 
SQL: SELECT T.bond_type FROM ( SELECT T1.bond_type, COUNT(T1.molecule_id) FROM bond AS T1  WHERE T1.molecule_id = 'TR010' GROUP BY T1.bond_type ORDER BY COUNT(T1.molecule_id) DESC LIMIT 1 ) AS T