answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT last_appearance FROM table_11240028_1 WHERE portrayed_by = "A. J. Buckley" | Which episode did actor A. J. Buckley last appear in? | CREATE TABLE table_11240028_1 (
last_appearance VARCHAR,
portrayed_by VARCHAR
) |
SELECT performance FROM table_name_49 WHERE season > 2003 AND discipline = "3000 m" | What were the performance lengths in the 3000 m events in and after 2003? | CREATE TABLE table_name_49 (performance VARCHAR, season VARCHAR, discipline VARCHAR) |
SELECT current_ratio FROM table_19166421_1 WHERE net_worth_to_fixed_assets = 621 | If the net worth of fixed assets is 621, what is the current ratio? | CREATE TABLE table_19166421_1 (current_ratio VARCHAR, net_worth_to_fixed_assets VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Non-invasive mechanical ventilation" | what is the number of patients who had non-invasive mechanical ventilation procedure? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... |
SELECT COUNT(season) FROM table_name_19 WHERE place = "santiago de chile, chile" | How many seasons took place in santiago de chile, chile? | CREATE TABLE table_name_19 (season VARCHAR, place VARCHAR) |
SELECT score FROM table_19169116_8 WHERE opponent = "Cleveland" | Name the score for opponent of cleveland | CREATE TABLE table_19169116_8 (score VARCHAR, opponent VARCHAR) |
SELECT T2.Name, AVG(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC | A bar chart about what are the average prices of products, grouped by manufacturer name?, I want to rank by the names in descending. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) |
SELECT season FROM table_name_90 WHERE date = "may 11, 2002" | During which Season did the may 11, 2002 event take place? | CREATE TABLE table_name_90 (season VARCHAR, date VARCHAR) |
SELECT COUNT(played) FROM table_19179465_1 WHERE club = "Featherstone Rovers" | Featherstone Rovers club played a total of how many games? | CREATE TABLE table_19179465_1 (played VARCHAR, club VARCHAR) |
SELECT week_8_oct_26 FROM table_name_44 WHERE week_7_oct_19 = "syarcuse (4-2)" | What is the Week 8 result of the team that lost to syarcuse (4-2) in Week 7? | CREATE TABLE table_name_44 (
week_8_oct_26 VARCHAR,
week_7_oct_19 VARCHAR
) |
SELECT AVG(round) FROM table_name_16 WHERE college = "california" | What is the average round for players from california? | CREATE TABLE table_name_16 (round INTEGER, college VARCHAR) |
SELECT MIN(lost) FROM table_19179465_1 WHERE points = 34 | How many games were lost when the club got 34 points | CREATE TABLE table_19179465_1 (lost INTEGER, points VARCHAR) |
SELECT rank FROM table_name_20 WHERE player = "tris speaker" AND bb_so = 7 | What was the rank of tris speaker when BB/SO was 7? | CREATE TABLE table_name_20 (
rank VARCHAR,
player VARCHAR,
bb_so VARCHAR
) |
SELECT nationality FROM table_name_12 WHERE nhl_team = "vancouver canucks" AND college_junior_club_team__league_ = "swift current broncos (whl)" AND round = 8 | What's the Nationality of Round 8 Vancouver Canucks NHL Team of Swift Current Broncos (WHL)? | CREATE TABLE table_name_12 (nationality VARCHAR, round VARCHAR, nhl_team VARCHAR, college_junior_club_team__league_ VARCHAR) |
SELECT bp FROM table_19179465_1 WHERE club = "Halifax" | What was the B.P. of club Halifax? | CREATE TABLE table_19179465_1 (bp VARCHAR, club VARCHAR) |
SELECT "Notes" FROM table_65987 WHERE "Country" = 'denmark' | What is the notes for the rowers from denmark? | CREATE TABLE table_65987 (
"Rank" real,
"Rowers" text,
"Country" text,
"Time" text,
"Notes" text
) |
SELECT home_team AS score FROM table_name_62 WHERE away_team = "essendon" | When the Away team of essendon was playing, what was the Home team's score? | CREATE TABLE table_name_62 (home_team VARCHAR, away_team VARCHAR) |
SELECT MIN(year) FROM table_1920271_2 WHERE championship = "French Open" | What is the first year she played in the french open? | CREATE TABLE table_1920271_2 (year INTEGER, championship VARCHAR) |
SELECT "Overall" FROM table_5161 WHERE "Pick" = '17' | What is the Overall number for pick 17? | CREATE TABLE table_5161 (
"Round" text,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"Team" text
) |
SELECT away_team FROM table_name_71 WHERE venue = "western oval" | For the Venue of western oval, what's the Away team playing? | CREATE TABLE table_name_71 (away_team VARCHAR, venue VARCHAR) |
SELECT COUNT(opponents) FROM table_1920271_2 WHERE score = "6–7(5), 6–2, 6–3" | How many times was the score 6–7(5), 6–2, 6–3? | CREATE TABLE table_1920271_2 (opponents VARCHAR, score VARCHAR) |
SELECT length FROM table_name_26 WHERE bullet = "6.5 (.257)" | Which length has a Bullet of 6.5 (.257)? | CREATE TABLE table_name_26 (
length VARCHAR,
bullet VARCHAR
) |
SELECT opponent FROM table_name_82 WHERE week = "7" | Who was the opponent on week 7? | CREATE TABLE table_name_82 (opponent VARCHAR, week VARCHAR) |
SELECT partner FROM table_1920271_3 WHERE championship = "US Open" AND outcome = "Runner-up" | Who was her partner at the US Open and they were runner-up? | CREATE TABLE table_1920271_3 (partner VARCHAR, championship VARCHAR, outcome VARCHAR) |
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'heparin flush (10 units/ml)') | tell me the price of taking heparin flush (10 units/ml)? | CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... |
SELECT opponent FROM table_name_4 WHERE week = "5" | Who was the opponent on week 5? | CREATE TABLE table_name_4 (opponent VARCHAR, week VARCHAR) |
SELECT partner FROM table_1920271_3 WHERE outcome = "Runner-up" AND championship = "US Open" | Who was her partner at the US Open and they were runner-up? | CREATE TABLE table_1920271_3 (partner VARCHAR, outcome VARCHAR, championship VARCHAR) |
SELECT "Frequency" FROM table_13614 WHERE "I/O bus" = 'dmi' AND "Voltage" = '0.725–1.4v' AND "Part number(s)" = 'cn80617004458ab' | What is the frequency for I/O bus of DMI, voltage of 0.725 1.4v and part cn80617004458ab? | CREATE TABLE table_13614 (
"Model number" text,
"sSpec number" text,
"Frequency" text,
"Turbo" text,
"GPU frequency" text,
"Cores" text,
"L2 cache" text,
"L3 cache" text,
"I/O bus" text,
"Mult." text,
"Memory" text,
"Voltage" text,
"Socket" text,
"Release date" te... |
SELECT leading_scorer FROM table_name_26 WHERE score = "107–97" | Who was the leading scorer of the game that had a score of 107–97? | CREATE TABLE table_name_26 (leading_scorer VARCHAR, score VARCHAR) |
SELECT partner FROM table_1920271_3 WHERE surface = "Clay" | Who did she play with on clay? | CREATE TABLE table_1920271_3 (partner VARCHAR, surface VARCHAR) |
SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-65662')) AND STRFTIME('%y', lab.labresulttime) >= '2103' | has patient 004-65662 gone through any lab test since 2103? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TA... |
SELECT visitor FROM table_name_39 WHERE home = "suns" | Who was the visiting team when the Suns were the home team? | CREATE TABLE table_name_39 (visitor VARCHAR, home VARCHAR) |
SELECT COUNT(surface) FROM table_1918850_2 WHERE championship = "Australian Open" AND score_in_the_final = "6–3, 4–6, 11–9" | state the number of surface where championship is australian open and score in the final is 6–3, 4–6, 11–9 | CREATE TABLE table_1918850_2 (surface VARCHAR, championship VARCHAR, score_in_the_final VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Aztreonam" | which patients have aztreonam drug prescription? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... |
SELECT AVG(ties) FROM table_name_63 WHERE losses < 3 AND wins < 5 AND win_pct = "0.800" AND team = "detroit lions" | What is the average number of ties for the Detroit Lions team when they have fewer than 5 wins, fewer than 3 losses, and a win percentage of 0.800? | CREATE TABLE table_name_63 (ties INTEGER, team VARCHAR, win_pct VARCHAR, losses VARCHAR, wins VARCHAR) |
SELECT championship FROM table_1918850_2 WHERE opponents_in_the_final = "Arantxa Sánchez Vicario Todd Woodbridge" | which championship had arantxa sánchez vicario todd woodbridge as opponents in the final | CREATE TABLE table_1918850_2 (championship VARCHAR, opponents_in_the_final VARCHAR) |
SELECT population FROM table_name_38 WHERE county = "sargent" | What is the Population of Sargent County? | CREATE TABLE table_name_38 (
population VARCHAR,
county VARCHAR
) |
SELECT MAX(year) FROM table_name_91 WHERE score = "4–6, 6–3, 7–5" | What is the most recent year in which the score was 4–6, 6–3, 7–5? | CREATE TABLE table_name_91 (year INTEGER, score VARCHAR) |
SELECT surface FROM table_1918850_2 WHERE score_in_the_final = "6-2, 6-3" | what is the surface of the final which had score 6-2, 6-3 | CREATE TABLE table_1918850_2 (surface VARCHAR, score_in_the_final VARCHAR) |
SELECT "Decision" FROM table_57987 WHERE "Date" = 'october 5' | What was the decision on october 5? | CREATE TABLE table_57987 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) |
SELECT player FROM table_name_5 WHERE height = "6-7" | Which player has a height of 6-7? | CREATE TABLE table_name_5 (player VARCHAR, height VARCHAR) |
SELECT year FROM table_1918850_2 WHERE opponents_in_the_final = "Helena Suková Todd Woodbridge" | when were helena suková todd woodbridge the opponents in the final | CREATE TABLE table_1918850_2 (year VARCHAR, opponents_in_the_final VARCHAR) |
SELECT record FROM table_name_14 WHERE event = "ufc 115" | What is his record at ufc 115? | CREATE TABLE table_name_14 (
record VARCHAR,
event VARCHAR
) |
SELECT nba_draft FROM table_name_97 WHERE hometown = "washington, dc" | What is the NBA draft result of the player from Washington, DC? | CREATE TABLE table_name_97 (nba_draft VARCHAR, hometown VARCHAR) |
SELECT championship FROM table_1918850_2 WHERE outcome = "Winner" AND surface = "Hard" AND partner = "Nicole Provis" AND opponents_in_the_final = "Helena Suková Tom Nijssen" | which championship had helena suková tom nijssen as opponents in the final and nicole provis as partner, the surface was hard and the outcome was winner | CREATE TABLE table_1918850_2 (championship VARCHAR, opponents_in_the_final VARCHAR, partner VARCHAR, outcome VARCHAR, surface VARCHAR) |
SELECT MAX(demographic.age) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.diagnosis = "STERNAL WOUND INFECTION" | what is maximum age of patients whose admission location is clinic referral/premature and primary disease is sternal wound infection? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... |
SELECT nba_draft FROM table_name_48 WHERE college = "kansas" | What is the NBA draft result of the player from the College of Kansas? | CREATE TABLE table_name_48 (nba_draft VARCHAR, college VARCHAR) |
SELECT last_performance FROM table_19189856_1 WHERE first_performance = "11/15/1909" | when was the last performance of the first performance on 11/15/1909 | CREATE TABLE table_19189856_1 (last_performance VARCHAR, first_performance VARCHAR) |
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" ORDER BY COUNT(date_of_enrolment) DESC | What are the enrollment dates of all the tests that have result 'Pass', and count them by a bar chart, sort in descending by the y-axis. | CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test_taken DATETIME,
test_result VARCHAR(255)
)
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Course_Authors_and_... |
SELECT player FROM table_name_79 WHERE school = "la costa canyon high school" | Who is the player from La Costa Canyon High School? | CREATE TABLE table_name_79 (player VARCHAR, school VARCHAR) |
SELECT COUNT(first_performance) FROM table_19189856_1 WHERE performer = "Wilfred Engelman category:Articles with hCards" | how many first performances where performer is wilfred engelman category:articles with hcards | CREATE TABLE table_19189856_1 (first_performance VARCHAR, performer VARCHAR) |
SELECT Text, LENGTH(Text) - LENGTH(REPLACE(Text, ' ', '')) + 1 FROM Comments WHERE Score = 6 AND Text LIKE '%?%' AND LENGTH(Text) - LENGTH(REPLACE(Text, ' ', '')) + 1 > 20 | SELECT * FROM Comments WHERE Score = 6. | CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE P... |
SELECT height FROM table_name_28 WHERE school = "nacogdoches high school" | How tall is the player from Nacogdoches High School? | CREATE TABLE table_name_28 (height VARCHAR, school VARCHAR) |
SELECT performer FROM table_19189856_1 WHERE last_performance = "04/08/1963" | who was the performer that did last performance on 04/08/1963 | CREATE TABLE table_19189856_1 (performer VARCHAR, last_performance VARCHAR) |
SELECT "Result" FROM table_42515 WHERE "Genre" = 'jazz' AND "Label" = 'columbia' AND "Title" = 'requiem' | Which result's genre was jazz when its label was columbia and its title was requiem? | CREATE TABLE table_42515 (
"Year" text,
"Title" text,
"Genre" text,
"Label" text,
"Result" text
) |
SELECT school FROM table_name_47 WHERE hometown = "dallas, tx" | What is the school of the player from Dallas, TX? | CREATE TABLE table_name_47 (school VARCHAR, hometown VARCHAR) |
SELECT first_performance FROM table_19189856_1 WHERE last_performance = "03/29/1957" | what is the first performance of the last performance on 03/29/1957 | CREATE TABLE table_19189856_1 (first_performance VARCHAR, last_performance VARCHAR) |
SELECT MONTH(DATE(Posts.CreationDate)), YEAR(DATE(Posts.CreationDate)), COUNT(Posts.Id) FROM Tags, PostTags, Posts WHERE Tags.TagName = 'cassandra' AND Tags.Id = PostTags.TagId AND PostTags.PostId = Posts.Id AND Posts.CreationDate > '2013-10-01' AND Posts.CreationDate < '2017-01-01' GROUP BY MONTH(DATE(Posts.CreationDa... | Cassandra question count by week. | CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAc... |
SELECT result FROM table_name_31 WHERE competition = "world group, consolation round" | What is the result for world group, consolation round? | CREATE TABLE table_name_31 (result VARCHAR, competition VARCHAR) |
SELECT last_performance FROM table_19189856_1 WHERE performer = "Leon Varkas category:Articles with hCards" | what is the last performance of leon varkas category:articles with hcards | CREATE TABLE table_19189856_1 (last_performance VARCHAR, performer VARCHAR) |
SELECT "Nationality" FROM table_16836 WHERE "Player" = 'Jim Les' | Which country is Jim Les from? | CREATE TABLE table_16836 (
"Player" text,
"No." real,
"Nationality" text,
"Position" text,
"Years for Jazz" text,
"School/Club Team" text
) |
SELECT SUM(attendance) FROM table_name_47 WHERE tie_no = "1" | How many attended tie number 1? | CREATE TABLE table_name_47 (attendance INTEGER, tie_no VARCHAR) |
SELECT COUNT(finale) FROM table_19210674_1 WHERE english_title = "Beyond the Realm of Conscience" | How many different finales had the English title "Beyond the Realm of Conscience"? | CREATE TABLE table_19210674_1 (finale VARCHAR, english_title VARCHAR) |
SELECT demographic.insurance FROM demographic WHERE demographic.subject_id = "6983" | find the insurance of subject id 6983. | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... |
SELECT MAX(attendance) FROM table_name_97 WHERE tie_no = "3" | How many attended tie number 3? | CREATE TABLE table_name_97 (attendance INTEGER, tie_no VARCHAR) |
SELECT MAX(average) FROM table_19210674_1 WHERE chinese_title = "古靈精探B" | What was the maximum average of the episode with a Chinese title 古靈精探b? | CREATE TABLE table_19210674_1 (average INTEGER, chinese_title VARCHAR) |
SELECT Party, COUNT(Party) FROM representative GROUP BY Party ORDER BY COUNT(Party) | A bar chart showing how many representatives in each party, and I want to display Y-axis from low to high order. | CREATE TABLE election (
Election_ID int,
Representative_ID int,
Date text,
Votes real,
Vote_Percent real,
Seats real,
Place real
)
CREATE TABLE representative (
Representative_ID int,
Name text,
State text,
Party text,
Lifespan text
) |
SELECT hometown FROM table_name_68 WHERE player = "tre madden" | What is the hometown for tre madden? | CREATE TABLE table_name_68 (hometown VARCHAR, player VARCHAR) |
SELECT rank FROM table_19210674_1 WHERE hk_viewers = "2.26 million" | How was the episode seen by 2.26 million HK viewers ranked? | CREATE TABLE table_19210674_1 (rank VARCHAR, hk_viewers VARCHAR) |
SELECT "Position in 2006" FROM table_10068 WHERE "Team" = 'dnepr' | What was Team Dnepr's position in 2006? | CREATE TABLE table_10068 (
"Team" text,
"Location" text,
"Venue" text,
"Capacity" real,
"Position in 2006" text
) |
SELECT hometown FROM table_name_20 WHERE position = "defensive back" AND college = "alabama" | What is the hometown for the player that is defensive back and went to alabama? | CREATE TABLE table_name_20 (hometown VARCHAR, position VARCHAR, college VARCHAR) |
SELECT finale FROM table_19210674_1 WHERE rank = 7 | What is the finale number ranked at number 7? | CREATE TABLE table_19210674_1 (finale VARCHAR, rank VARCHAR) |
SELECT MIN("Draws") FROM table_43367 WHERE "Byes" < '1' | For the teams that had fewer than 1 Byes, what was the lowest number of Draws? | CREATE TABLE table_43367 (
"Ballarat FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) |
SELECT college FROM table_name_19 WHERE position = "defensive back" AND school = "ridge community high school" | What is the college for the player that went to ridge community high school and is defensive back? | CREATE TABLE table_name_19 (college VARCHAR, position VARCHAR, school VARCHAR) |
SELECT conflict FROM table_1921_1 WHERE location = "Iraq" | What is every conflict in Iraq? | CREATE TABLE table_1921_1 (conflict VARCHAR, location VARCHAR) |
SELECT "Location Attendance" FROM table_57742 WHERE "Team" = 'golden state' | What is the location attendance when the team is Golden State? | CREATE TABLE table_57742 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT SUM(year) FROM table_name_77 WHERE type = "informal" AND location = "justus lipsius building, brussels" AND date = "23 may" | What is the sum of Year with a Type of informal, and a Location with justus lipsius building, brussels, and a Date with 23 may? | CREATE TABLE table_name_77 (year INTEGER, date VARCHAR, type VARCHAR, location VARCHAR) |
SELECT branches_involved FROM table_1921_1 WHERE location = "Afghanistan" | What is every branch involved in Afghanistan? | CREATE TABLE table_1921_1 (branches_involved VARCHAR, location VARCHAR) |
SELECT "To par" FROM table_62123 WHERE "Country" = 'england' AND "Score" < '71' | What's the to par for england when the score is less than 71? | CREATE TABLE table_62123 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) |
SELECT type FROM table_name_59 WHERE location = "justus lipsius building, brussels" AND year = 2012 AND president = "herman van rompuy (1st term)" AND date = "23 may" | What is the Type with a Location with justus lipsius building, brussels, and a Year of 2012, and a President with herman van rompuy (1st term), and a Date with 23 may? | CREATE TABLE table_name_59 (type VARCHAR, date VARCHAR, president VARCHAR, location VARCHAR, year VARCHAR) |
SELECT conflict FROM table_1921_1 WHERE location = "Yemen" | Which conflicts took place in Yemen? | CREATE TABLE table_1921_1 (conflict VARCHAR, location VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND procedures.short_title = "Opn rt hemicolectomy NEC" | tell me the number of black/haitian patients who had open and other right hemicolectomy. | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... |
SELECT president FROM table_name_22 WHERE location = "justus lipsius building, brussels" AND type = "scheduled" AND year > 2011 AND date = "18–19 october" | What is the President with a Location of justus lipsius building, brussels, and a Type with scheduled, and a Year larger than 2011, and a Date with 18–19 october? | CREATE TABLE table_name_22 (president VARCHAR, date VARCHAR, year VARCHAR, location VARCHAR, type VARCHAR) |
SELECT COUNT(start_of_conflict) FROM table_1921_1 WHERE location = "Afghanistan" | How many conflicts started in Afghanistan? | CREATE TABLE table_1921_1 (start_of_conflict VARCHAR, location VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND demographic.dod_year <= "2183.0" | How many patients with morbid obesity/sda primary disease died in or before the year 2183? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... |
SELECT location FROM table_name_63 WHERE year > 2011 AND president = "herman van rompuy (2nd term)" AND date = "28–29 june" AND type = "scheduled" | What is the Location with a Year larger than 2011, and a President with herman van rompuy (2nd term), and a Date of 28–29 june, and a Type with scheduled? | CREATE TABLE table_name_63 (location VARCHAR, type VARCHAR, date VARCHAR, year VARCHAR, president VARCHAR) |
SELECT us_viewers__million_ FROM table_19229713_6 WHERE _number = 16 | How many u.s. viewers (million) have the number 16? | CREATE TABLE table_19229713_6 (us_viewers__million_ VARCHAR, _number VARCHAR) |
SELECT most_recent_final FROM table_1463332_2 WHERE years__won_in_bold_ = "1979" | What is the most recent final result for the years (won in bold) 1979? | CREATE TABLE table_1463332_2 (
most_recent_final VARCHAR,
years__won_in_bold_ VARCHAR
) |
SELECT president FROM table_name_31 WHERE year > 2011 AND date = "23 may" | What is the President with a Year larger than 2011, and a Date with 23 may? | CREATE TABLE table_name_31 (president VARCHAR, year VARCHAR, date VARCHAR) |
SELECT us_viewers__million_ FROM table_19229713_6 WHERE production_code = "5.09" | How many u.s. viewers (million) have the production code of 5.09? | CREATE TABLE table_19229713_6 (us_viewers__million_ VARCHAR, production_code VARCHAR) |
SELECT building, room_number FROM classroom WHERE capacity BETWEEN 50 AND 100 | Find the room number of the rooms which can sit 50 to 100 students and their buildings. | CREATE TABLE classroom (
building VARCHAR,
room_number VARCHAR,
capacity INTEGER
) |
SELECT type FROM table_name_96 WHERE year > 2010 AND location = "justus lipsius building, brussels" AND president = "herman van rompuy (2nd term)" AND date = "28–29 june" | What is the Type with a Year larger than 2010, and a Location with justus lipsius building, brussels, and a President of herman van rompuy (2nd term), and a Date with 28–29 june? | CREATE TABLE table_name_96 (type VARCHAR, date VARCHAR, president VARCHAR, year VARCHAR, location VARCHAR) |
SELECT MAX(of_which_currently_forests), _km² FROM table_19242_5 WHERE land_formation = "Middle Prut Valley" | When middle prut valley is the land formation what is the highest of which currently forests, km² ? | CREATE TABLE table_19242_5 (_km² VARCHAR, of_which_currently_forests INTEGER, land_formation VARCHAR) |
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... | since 1 year ago, what were the top three most frequent procedures that patients were given within 2 months after the diagnosis of hpt c w/o hepat coma nos. | CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... |
SELECT competition FROM table_name_49 WHERE goal = 13 | What competition has a goal number of 13? | CREATE TABLE table_name_49 (competition VARCHAR, goal VARCHAR) |
SELECT MIN(series_no) FROM table_19236587_4 WHERE season_no = 2 | What's the series number of the episode with season number 2? | CREATE TABLE table_19236587_4 (series_no INTEGER, season_no VARCHAR) |
SELECT "U.S. AC" FROM table_52143 WHERE "Album" = 'the best' AND "Year" = '1965' | What was the best album in 1965? | CREATE TABLE table_52143 (
"Year" real,
"Single" text,
"U.S. Country" text,
"U.S." text,
"U.S. AC" text,
"Album" text
) |
SELECT SUM(yards) FROM table_name_60 WHERE asst = 19 AND totaltk = 60 AND sack > 0 | What is the total of yards when asst. is 19, totaltk is 60 and sack is more than 0? | CREATE TABLE table_name_60 (yards INTEGER, sack VARCHAR, asst VARCHAR, totaltk VARCHAR) |
SELECT series_no FROM table_19236587_4 WHERE uk_viewers__million_ = "2.43" | What's the series number of the episode seen by 2.43 million viewers in the UK? | CREATE TABLE table_19236587_4 (series_no VARCHAR, uk_viewers__million_ VARCHAR) |
SELECT COUNT(to_par) FROM table_name_72 WHERE country = "united states" AND year_won > 1986 AND player = "paul azinger" AND total > 145 | What is the to par for Paul Azinger from the United States after 1986 for a total bigger than 145? | CREATE TABLE table_name_72 (
to_par VARCHAR,
total VARCHAR,
player VARCHAR,
country VARCHAR,
year_won VARCHAR
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.