id
int64 0
1.53k
| query
stringlengths 23
215
| sql
stringlengths 29
1.45k
| difficulty
stringclasses 3
values |
---|---|---|---|
314 | How many single bonds are there in the list? | SELECT COUNT(T.bond_id) FROM bond AS T WHERE T.bond_type = '-' | simple |
1,055 | When is the birthday of the football player who has the highest overall rating? | SELECT t1.birthday FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t2.overall_rating DESC LIMIT 1 | simple |
1,354 | State the major name for the Vice President of the club. | SELECT T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T1.position = 'Vice President' | simple |
434 | How many sets are available just in Japanese and not in Magic: The Gathering Online? | SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.language = 'Japanese' AND (T1.mtgoCode IS NULL OR T1.mtgoCode = '') | moderate |
886 | Which year has the most number of races? | SELECT year FROM races GROUP BY year ORDER BY COUNT(round) DESC LIMIT 1 | simple |
389 | List down the name of cards with original types of Creature - Elf and the date of rulings for these cards. | SELECT T1.id, T2.date FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.originalType = 'Creature - Elf' | simple |
848 | Please list the year during which the race is held on circuits in Shanghai. | SELECT T2.year FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.location = 'Shanghai' | simple |
1,480 | What was the gas consumption peak month for SME customers in 2013? | SELECT SUBSTR(T2.Date, 5, 2) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE SUBSTR(T2.Date, 1, 4) = '2013' AND T1.Segment = 'SME' GROUP BY SUBSTR(T2.Date, 5, 2) ORDER BY SUM(T2.Consumption) DESC LIMIT 1 | moderate |
139 | How many high-level credit cards have "OWNER" type of disposition? | SELECT COUNT(T1.card_id) FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'gold' AND T2.type = 'OWNER' | simple |
956 | Which drivers born after 1975 have been ranked 2? Please give their forenames and surnames. | SELECT T2.forename, T2.surname FROM results AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE STRFTIME('%Y', T2.dob) > '1975' AND T1.rank = 2 | simple |
1,254 | How many patients with a normal Ig A level came to the hospital after 1990/1/1? | SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.IGA BETWEEN 80 AND 500 AND strftime('%Y', T1.`First Date`) > '1990' | moderate |
92 | List out the no. of districts that have female average salary is more than 6000 but less than 10000? | SELECT COUNT(DISTINCT T2.district_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' AND T2.A11 BETWEEN 6000 AND 10000 | simple |
376 | What are the card layout of cards with keyword of flying? | SELECT layout FROM cards WHERE keywords = 'Flying' | simple |
1,378 | What is the highest amount of budget spend for an event? | SELECT MAX(spent) FROM budget | simple |
522 | Which cards are ranked 1st on EDHRec? List all of the cards name and its banned play format. | SELECT T1.name, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.edhrecRank = 1 AND T2.status = 'Banned' GROUP BY T1.name, T2.format | moderate |
130 | How many of the account holders in South Bohemia still do not own credit cards? | SELECT COUNT(T3.account_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.client_id = T3.client_id WHERE T1.A3 = 'south Bohemia' AND T3.type != 'OWNER' | moderate |
1,153 | What is the disease patient '30609' diagnosed with. List all the date of laboratory tests done for this patient. | SELECT T1.Diagnosis, T2.Date FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 30609 | simple |
1,217 | For all patient born in 1982, state if their albumin is within normal range. | SELECT CASE WHEN T2.ALB >= 3.5 AND T2.ALB <= 5.5 THEN 'normal' ELSE 'abnormal' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1982' | moderate |
1,262 | How many patients with a normal level of complement 3 have a P pattern observed in the sheet of ANA examination? | SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.C3 > 35 AND T1.`ANA Pattern` = 'P' | moderate |
1,435 | List the names of closed event as "game" that was closed from 3/15/2019 to 3/20/2020. | SELECT DISTINCT event_name FROM event WHERE type = 'Game' AND date(SUBSTR(event_date, 1, 10)) BETWEEN '2019-03-15' AND '2020-03-20' AND status = 'Closed' | moderate |
942 | What is the average fastest lap time in seconds for Lewis Hamilton in all the Formula_1 races? | 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' | moderate |
1,258 | How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation? | 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 = '+' | moderate |
Subsets and Splits