answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(captain) FROM table_29398373_2 WHERE team = "Barcelona" | Name the number of captains for barcelona | CREATE TABLE table_29398373_2 (
captain VARCHAR,
team VARCHAR
) |
SELECT AVG(rank) FROM table_name_15 WHERE bronze < 13 AND total = 11 AND gold > 4 | What is the average rank of a country with less than 13 bronze medals, a total of 11 medals, and more than 4 gold? | CREATE TABLE table_name_15 (rank INTEGER, gold VARCHAR, bronze VARCHAR, total VARCHAR) |
SELECT date FROM table_16388478_4 WHERE home_team = "Adelaide" | What date was Adelaide the home team? | CREATE TABLE table_16388478_4 (date VARCHAR, home_team VARCHAR) |
SELECT Status, AVG(Population) FROM city GROUP BY Status | Give me a histogram for what are the statuses and average populations of each city? | CREATE TABLE farm_competition (
Competition_ID int,
Year int,
Theme text,
Host_city_ID int,
Hosts text
)
CREATE TABLE competition_record (
Competition_ID int,
Farm_ID int,
Rank int
)
CREATE TABLE farm (
Farm_ID int,
Year int,
Total_Horses real,
Working_Horses real,
... |
SELECT MIN(bronze) FROM table_name_58 WHERE silver = 9 AND total > 13 AND gold > 13 | What is the lowest bronze a team with 9 silvers, a total larger than 13, and more than 13 gold medals has? | CREATE TABLE table_name_58 (bronze INTEGER, gold VARCHAR, silver VARCHAR, total VARCHAR) |
SELECT COUNT(location) FROM table_16403890_1 WHERE institution = "Elon University" | How many locations does Elon University have? | CREATE TABLE table_16403890_1 (location VARCHAR, institution VARCHAR) |
SELECT MAX(laps) FROM table_17693171_1 WHERE time_retired = "+1 lap" | If the time/retired is +1 lap, what is the amount of maximum laps? | CREATE TABLE table_17693171_1 (
laps INTEGER,
time_retired VARCHAR
) |
SELECT MAX(silver) FROM table_name_6 WHERE total > 95 | What is the highest number of silvers a team with more than 95 total medals has? | CREATE TABLE table_name_6 (silver INTEGER, total INTEGER) |
SELECT MIN(enrollment) FROM table_16403890_1 WHERE affiliation = "Private/Catholic" | Private/Catholic school's minimum enrollment is? | CREATE TABLE table_16403890_1 (enrollment INTEGER, affiliation VARCHAR) |
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'ards' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-3 year')) AS t1) - (SELECT... | how many patients were diagnosed with ards and didn't return back to the hospital within 2 months until 3 years ago? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperio... |
SELECT MAX(total) FROM table_name_96 WHERE gold < 15 AND bronze < 5 AND rank > 10 | What is the highest total medals a team with less than 15 gold, less than 5 bronze, and a rank larger than 10 has? | CREATE TABLE table_name_96 (total INTEGER, rank VARCHAR, gold VARCHAR, bronze VARCHAR) |
SELECT institution FROM table_16403890_1 WHERE team_nickname = "Colonials" | Which school has the mascot of the Colonials? | CREATE TABLE table_16403890_1 (institution VARCHAR, team_nickname VARCHAR) |
SELECT "Score" FROM table_38880 WHERE "Game" = '31' | What is the score at game 31? | CREATE TABLE table_38880 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
) |
SELECT home_team FROM table_name_95 WHERE venue = "glenferrie oval" | Who is the home team who plays at Glenferrie Oval? | CREATE TABLE table_name_95 (home_team VARCHAR, venue VARCHAR) |
SELECT socket FROM table_16400024_1 WHERE sspec_number = "SL3F7(kC0)SL3FJ(kC0)" | What is the socket location for sSPEC number sl3f7(kc0)sl3fj(kc0)? | CREATE TABLE table_16400024_1 (socket VARCHAR, sspec_number VARCHAR) |
SELECT MAX(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-16479')) AND intakeoutput.celllabel = 'outpu... | what is the yearly maximum output (ml)-nephrostomy right 10 fr. output that patient 015-16479 has had since 32 months ago? | CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergy... |
SELECT away_team AS score FROM table_name_29 WHERE away_team = "carlton" | What did the away team Carlton score? | CREATE TABLE table_name_29 (away_team VARCHAR) |
SELECT release_date FROM table_16400024_1 WHERE part_number_s_ = "80525PY500512BX80525U500512BX80525U500512E" | What is the release date of part 80525py500512bx80525u500512bx80525u500512e? | CREATE TABLE table_16400024_1 (release_date VARCHAR, part_number_s_ VARCHAR) |
SELECT * FROM table_train_82 WHERE mini_mental_state_examination_mmse < 27 | mini mental state examination ( mmse ) total score < 27 | CREATE TABLE table_train_82 (
"id" int,
"mini_mental_state_examination_mmse" int,
"systolic_blood_pressure_sbp" int,
"diastolic_blood_pressure_dbp" int,
"body_mass_index_bmi" float,
"hypertension" bool,
"age" float,
"NOUSE" float
) |
SELECT position FROM table_name_58 WHERE tries > 4 AND points = 20 AND player = "lee gilmour" | What position did Lee Gilmour play while having more than 4 Tries and 20 points? | CREATE TABLE table_name_58 (position VARCHAR, player VARCHAR, tries VARCHAR, points VARCHAR) |
SELECT COUNT(release_price___usd__) FROM table_16400024_1 WHERE model_number = "Pentium III 550" | How many release prices are there for the Pentium iii 550? | CREATE TABLE table_16400024_1 (release_price___usd__ VARCHAR, model_number VARCHAR) |
SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment GROUP BY date_of_completion | List the number of completion students in each day and group by date of completion in a line chart. | CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Student... |
SELECT host FROM table_name_29 WHERE ratings = "9.4/27" | Who was the host that garnered ratings of 9.4/27? | CREATE TABLE table_name_29 (host VARCHAR, ratings VARCHAR) |
SELECT model_number FROM table_16400024_1 WHERE release_price___usd__ = "$496" | What is the model number with a release price of $496? | CREATE TABLE table_16400024_1 (model_number VARCHAR, release_price___usd__ VARCHAR) |
SELECT Id AS "comment_link", Text FROM Comments WHERE LOWER(Text) LIKE '%i.stack.imgur.com%' LIMIT 100 | Comments that have imgur images. | CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
... |
SELECT lap_by_lap FROM table_name_29 WHERE year < 1994 AND ratings = "8.0/21" | Who was the lap-by-lap broadcaster before 1994 who garnered ratings of 8.0/21? | CREATE TABLE table_name_29 (lap_by_lap VARCHAR, year VARCHAR, ratings VARCHAR) |
SELECT l2_cache FROM table_16400024_1 WHERE release_price___usd__ = "$669" | What is the l2 cache for the model with a release price of $669? | CREATE TABLE table_16400024_1 (l2_cache VARCHAR, release_price___usd__ VARCHAR) |
SELECT model FROM table_name_94 WHERE gcm__kg__technical_capacity = "35000" AND gvm__kg__technical_capacity = "16000" AND engine_make_capacity = "cummins interact 6.0-euro iii (turbo intercooler)" | Which Model has a GCM (kg) Technical Capacity of 35000, a GVM (kg) Technical Capacity of 16000, and Cummins Interact 6.0-euro III (turbo intercooler) for the Engine? | CREATE TABLE table_name_94 (
model VARCHAR,
engine_make_capacity VARCHAR,
gcm__kg__technical_capacity VARCHAR,
gvm__kg__technical_capacity VARCHAR
) |
SELECT host FROM table_name_30 WHERE ratings = "9.6/26" | Who was the host that garnered ratings of 9.6/26? | CREATE TABLE table_name_30 (host VARCHAR, ratings VARCHAR) |
SELECT date FROM table_1639689_2 WHERE week = 2 | What day(s) did they play on week 2? | CREATE TABLE table_1639689_2 (date VARCHAR, week VARCHAR) |
SELECT AVG("Game") FROM table_9892 WHERE "Record" = '20-12' | What is the average number of games with a record of 20-12? | CREATE TABLE table_9892 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
) |
SELECT ratings FROM table_name_83 WHERE host = "chris economaki" AND viewers = "12.3 million" | What were the ratings for host Chris Economaki who had 12.3 million viewers? | CREATE TABLE table_name_83 (ratings VARCHAR, host VARCHAR, viewers VARCHAR) |
SELECT kickoff FROM table_1639689_2 WHERE date = "Monday, May 13" | What was the kickoff time on monday, may 13? | CREATE TABLE table_1639689_2 (kickoff VARCHAR, date VARCHAR) |
SELECT "Team" FROM table_33762 WHERE "Driver(s)" = 'tom sneva' AND "Rounds" = '1-9' | What team was Tom Sneva on in rounds 1-9? | CREATE TABLE table_33762 (
"Team" text,
"Chassis" text,
"Engine" text,
"Driver(s)" text,
"Sponsor(s)" text,
"Rounds" text
) |
SELECT network FROM table_name_74 WHERE host = "ken squier" AND viewers = "13.9 million" | Who was the network who had Ken Squier as a host and 13.9 million viewers? | CREATE TABLE table_name_74 (network VARCHAR, host VARCHAR, viewers VARCHAR) |
SELECT MAX(no_in_season) FROM table_16390576_3 WHERE directed_by = "Jamie Babbit" | what is the latest episode in season 2 directed by jamie babbit? | CREATE TABLE table_16390576_3 (no_in_season INTEGER, directed_by VARCHAR) |
SELECT "The Mole" FROM table_17948 WHERE "Airdate" = '8 January 2009' | what's the mole with airdate being 8 january 2009 | CREATE TABLE table_17948 (
"Season" text,
"Airdate" text,
"The Mole" text,
"Winner" text,
"Runner-up" text,
"Prize money" text,
"International destination" text
) |
SELECT MIN(attendance) FROM table_name_1 WHERE date = "february 5" | What was the lowest Attendance for Games played on the Date of February 5? | CREATE TABLE table_name_1 (attendance INTEGER, date VARCHAR) |
SELECT original_air_date FROM table_16390576_3 WHERE production_code = "08-02-214" | what are the air dates for episodes with the production code 08-02-214 | CREATE TABLE table_16390576_3 (original_air_date VARCHAR, production_code VARCHAR) |
SELECT order_date, COUNT(order_date) FROM Customers AS t1 JOIN Customer_Orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered" | How many orders in each weekday? Return a bar chart to show. | CREATE TABLE Customer_Addresses (
customer_id INTEGER,
address_id INTEGER,
date_address_from DATETIME,
address_type VARCHAR(15),
date_address_to DATETIME
)
CREATE TABLE Customer_Contact_Channels (
customer_id INTEGER,
channel_code VARCHAR(15),
active_from_date DATETIME,
active_to_da... |
SELECT SUM(attendance) FROM table_name_61 WHERE visitor = "chicago" | What was the total Attendance for Games while Chicago was the visiting Team? | CREATE TABLE table_name_61 (attendance INTEGER, visitor VARCHAR) |
SELECT title FROM table_16390576_3 WHERE no_in_series = 28 | what is the title of episode 28 | CREATE TABLE table_16390576_3 (title VARCHAR, no_in_series VARCHAR) |
SELECT MIN("Gold") FROM table_51380 WHERE "Rank" > '1' AND "Nation" = 'italy' AND "Silver" > '0' | What is the lowest number of Gold the Nation of Italy had when it ranked other than 1, and had more than 0 Silver? | CREATE TABLE table_51380 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT pole_position FROM table_name_30 WHERE fastest_lap = "rubens barrichello" AND round > 11 | What pole position was Rubens Barrichello when he had the fastest lap and a round larger than 11? | CREATE TABLE table_name_30 (pole_position VARCHAR, fastest_lap VARCHAR, round VARCHAR) |
SELECT dpi FROM table_16409745_1 WHERE dimensions__mm_ = "280 x 95 x 40" | What is the dpi of a scanner with the mm dimensions 280 x 95 x 40? | CREATE TABLE table_16409745_1 (dpi VARCHAR, dimensions__mm_ VARCHAR) |
SELECT DISTINCT position FROM match_season | What are the different positions for match season? | CREATE TABLE team (
team_id number,
name text
)
CREATE TABLE country (
country_id number,
country_name text,
capital text,
official_native_language text
)
CREATE TABLE match_season (
season number,
player text,
position text,
country number,
team number,
draft_pick_numb... |
SELECT grand_prix FROM table_name_58 WHERE winning_driver = "david coulthard" AND pole_position = "michael schumacher" AND round < 9 | Which Grand Prix did David Coulthard win with Michael Schumacher in the pole position before round 9? | CREATE TABLE table_name_58 (grand_prix VARCHAR, round VARCHAR, winning_driver VARCHAR, pole_position VARCHAR) |
SELECT MAX(pages_per_minute__color_) FROM table_16409745_1 WHERE product = "Xerox Travel Scanner 100" | What is the maximum pages per minute for the Xerox Travel Scanner 100? | CREATE TABLE table_16409745_1 (pages_per_minute__color_ INTEGER, product VARCHAR) |
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 70645 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.admittime LIMIT 1 | when was the first time that patient 70645 was admitted to the hospital during the last year? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (... |
SELECT fastest_lap FROM table_name_32 WHERE pole_position = "david coulthard" AND winning_driver = "michael schumacher" | Who had the fastest lap when David Coulthard had pole position and Michael Schumacher as a winning driver. | CREATE TABLE table_name_32 (fastest_lap VARCHAR, pole_position VARCHAR, winning_driver VARCHAR) |
SELECT interface FROM table_16409745_1 WHERE pages_per_minute__color_ = 36 | What interface is used on the scanner that has a 36 pages per minute? | CREATE TABLE table_16409745_1 (interface VARCHAR, pages_per_minute__color_ VARCHAR) |
SELECT completed FROM table_name_31 WHERE laid_down = "23 march 1926" | when was the ship completed that was laid down on 23 march 1926? | CREATE TABLE table_name_31 (
completed VARCHAR,
laid_down VARCHAR
) |
SELECT fastest_lap FROM table_name_36 WHERE grand_prix = "australian grand prix" | Who had the fastest lap at the Australian Grand Prix? | CREATE TABLE table_name_36 (fastest_lap VARCHAR, grand_prix VARCHAR) |
SELECT dimensions__mm_ FROM table_16409745_1 WHERE product = "Plustek MobileOffice D28 Corporate" | What are the mm dimensions of the Plustek Mobileoffice D28 Corporate? | CREATE TABLE table_16409745_1 (dimensions__mm_ VARCHAR, product VARCHAR) |
SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "PNEUMONIA;HUMAN IMMUNODEFIENCY VIRUS;RULE OUT TUBERCULOSIS" | what is minimum age of patients whose admission type is emergency and primary disease is pneumonia;human immunodefiency virus;rule out tuberculosis? | CREATE TABLE procedures (
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 diagnoses (
... |
SELECT team_2 FROM table_name_46 WHERE team_1 = "la nuova piovese (veneto a)" | Tell me the team 2 for team 1 being la nuova piovese (veneto a) | CREATE TABLE table_name_46 (team_2 VARCHAR, team_1 VARCHAR) |
SELECT dimensions__mm_ FROM table_16409745_1 WHERE product = "Fujitsu fi-6130 A4 Series Scanner" | What are the mm dimensions for the Fujitsu fi-6130 a4 Series Scanner? | CREATE TABLE table_16409745_1 (dimensions__mm_ VARCHAR, product VARCHAR) |
SELECT "Pac-10 Record" FROM table_3914 WHERE "Date" = 'April 20' | What was the PAC-10 record of the game played on April 20? | CREATE TABLE table_3914 (
"#" real,
"Date" text,
"Opponent" text,
"Site/Stadium" text,
"Score" text,
"Win" text,
"Loss" text,
"Save" text,
"Attendance" real,
"Overall Record" text,
"Pac-10 Record" text
) |
SELECT team_1 FROM table_name_8 WHERE team_2 = "civitavecchiese (latium a)" | Tell me the team 1 for team 2 being civitavecchiese (latium a) | CREATE TABLE table_name_8 (team_1 VARCHAR, team_2 VARCHAR) |
SELECT dpi FROM table_16409745_1 WHERE max_page_size = "216mm x 355mm" | What is the dpi for the scanner with a max page size of 216mm x 355mm? | CREATE TABLE table_16409745_1 (dpi VARCHAR, max_page_size VARCHAR) |
SELECT COUNT(candidates) FROM table_1342359_17 WHERE first_elected = 1929 | How many people were elected in 1929 | CREATE TABLE table_1342359_17 (
candidates VARCHAR,
first_elected VARCHAR
) |
SELECT 1 AS st_leg FROM table_name_55 WHERE team_1 = "budoni (sardinia)" | Tell me the 1st leg for team being budoni (Sardinia) | CREATE TABLE table_name_55 (team_1 VARCHAR) |
SELECT track_ & _field FROM table_16423070_4 WHERE swimming = "Lexington" AND volleyball = "Madison" | which country won swimming track & field when lexington won swimming and madison won volleyball | CREATE TABLE table_16423070_4 (track_ VARCHAR, _field VARCHAR, swimming VARCHAR, volleyball VARCHAR) |
SELECT "Netflix" FROM table_19903 WHERE "Segment D" = 'High-Performance Engines' | What is the netflix episode number where Segment D is high-performance engines? | CREATE TABLE table_19903 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
) |
SELECT attendance FROM table_name_88 WHERE location = "busch stadium (ii)" AND time = "3:54" | How many attended the game at Busch Stadium (ii) when the time was 3:54? | CREATE TABLE table_name_88 (attendance VARCHAR, location VARCHAR, time VARCHAR) |
SELECT COUNT(golf) FROM table_16423070_4 WHERE soccer = "Wooster" | how many teams won at golf when wooster won soccer | CREATE TABLE table_16423070_4 (golf VARCHAR, soccer VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.long_title = "Percutaneous abdominal drainage" | how many married patients had the procedure long title percutaneous abdominal drainage? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... |
SELECT date FROM table_name_56 WHERE game > 6 | What dates were the games after game 6 played? | CREATE TABLE table_name_56 (date VARCHAR, game INTEGER) |
SELECT soccer FROM table_16423070_4 WHERE volleyball = "Madison" AND cross_country = "Lexington" AND softball = "Orrville" | Who won soccer when madison won volleyball, lexington won cross country and orrville won softball | CREATE TABLE table_16423070_4 (soccer VARCHAR, softball VARCHAR, volleyball VARCHAR, cross_country VARCHAR) |
SELECT "Country" FROM table_34914 WHERE "Lead" = 'sarah wazney' | Which country has a Lead of sarah wazney? | CREATE TABLE table_34914 (
"Country" text,
"Skip" text,
"Third" text,
"Second" text,
"Lead" text
) |
SELECT 1977 FROM table_name_9 WHERE 1972 = "grand slam tournaments" | What is the 1977 value that had Grand Slam Tournaments in 1972? | CREATE TABLE table_name_9 (Id VARCHAR) |
SELECT volleyball FROM table_16423070_4 WHERE basketball = "West Holmes" AND swimming = "Wooster" AND school_year = "2011-12" | Who won volleyball when west holmes won basketball and wooster won swimming in 2011-12 | CREATE TABLE table_16423070_4 (volleyball VARCHAR, school_year VARCHAR, basketball VARCHAR, swimming VARCHAR) |
SELECT "Score" FROM table_42784 WHERE "Attendance" = 'arsenal win 4-2 on penalties' | What is the Score of the game with arsenal win 4-2 on penalties in the attendance field? | CREATE TABLE table_42784 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
) |
SELECT tournament FROM table_name_13 WHERE 1976 = "grand slam tournaments" | What is the tournament that had Grand Slam Tournaments in 1976? | CREATE TABLE table_name_13 (tournament VARCHAR) |
SELECT tennis FROM table_16423070_4 WHERE softball = "Ashland" AND volleyball = "Wooster" | who won tennis when ashland won softball and wooster won volleybal | CREATE TABLE table_16423070_4 (tennis VARCHAR, softball VARCHAR, volleyball 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, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_i... | what are the three most frequently ordered procedures for patients that have previously been diagnosed with tracheostomy status in the same hospital encounter during the previous year? | CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_... |
SELECT 1976 FROM table_name_35 WHERE tournament = "australian open" | What is the 1976 value of the Australian Open? | CREATE TABLE table_name_35 (tournament VARCHAR) |
SELECT basketball FROM table_16423070_4 WHERE track_ & _field = "Ashland" AND cross_country = "Ashland" | who won basketball when ashland won track & field and cross country | CREATE TABLE table_16423070_4 (basketball VARCHAR, cross_country VARCHAR, track_ VARCHAR, _field VARCHAR) |
SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4987' AND NOT patient.hospitaldischargetime IS NULL ORDER BY ... | when the last time patient 031-4987 received a microbiology test on the last hospital visit? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime... |
SELECT 1977 FROM table_name_65 WHERE 1974 = "a" | What is the 1977 value that has a 1974 a value? | CREATE TABLE table_name_65 (Id VARCHAR) |
SELECT location FROM table_16432543_1 WHERE established = 1923 | What is the location of the school established in 1923 | CREATE TABLE table_16432543_1 (location VARCHAR, established VARCHAR) |
SELECT "Opponents in the final" FROM table_40762 WHERE "Date" = 'june 10, 1996' | Who's the Opponents in the final with a Date of june 10, 1996? | CREATE TABLE table_40762 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partnering" text,
"Opponents in the final" text,
"Score" text
) |
SELECT week FROM table_name_87 WHERE record = "4-10" | Which week led to a record of 4-10? | CREATE TABLE table_name_87 (week VARCHAR, record VARCHAR) |
SELECT COUNT(enrollment) FROM table_16432543_1 WHERE nickname = "Blue Hens" | Total enrollment at the school with the nickname Blue Hens | CREATE TABLE table_16432543_1 (enrollment VARCHAR, nickname VARCHAR) |
SELECT building, AVG(capacity) FROM classroom GROUP BY building ORDER BY AVG(capacity) | Find the average capacity among rooms in each building with a bar chart, and order in ascending by the y axis please. | CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE takes (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade... |
SELECT week FROM table_name_91 WHERE opponent = "san diego chargers" | Which week was the game against the San Diego Chargers? | CREATE TABLE table_name_91 (week VARCHAR, opponent VARCHAR) |
SELECT nickname FROM table_16432543_1 WHERE established = 1773 | Nickname of the school established in 1773 | CREATE TABLE table_16432543_1 (nickname VARCHAR, established VARCHAR) |
SELECT "Result" FROM table_79321 WHERE "Date" = 'february 27, 2000' | What was the result of the game that was played on february 27, 2000? | CREATE TABLE table_79321 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) |
SELECT height FROM table_name_93 WHERE hometown = "huntington, wv" | What is the height of the player who is from Huntington, WV? | CREATE TABLE table_name_93 (height VARCHAR, hometown VARCHAR) |
SELECT established FROM table_16432543_1 WHERE institution = "Rowan University" | What is the year Rowan University was established | CREATE TABLE table_16432543_1 (established VARCHAR, institution VARCHAR) |
SELECT COUNT(played) FROM table_name_24 WHERE ga = "22" | What is the total played games of a 22 G.A.? | CREATE TABLE table_name_24 (
played VARCHAR,
ga VARCHAR
) |
SELECT school FROM table_name_45 WHERE hometown = "chicago, il" | What school is the player who has a hometown of Chicago, IL from? | CREATE TABLE table_name_45 (school VARCHAR, hometown VARCHAR) |
SELECT COUNT(nickname) FROM table_16432543_1 WHERE location = "Newark, DE" | How many nicknames does the school in Newark, DE have | CREATE TABLE table_16432543_1 (nickname VARCHAR, location VARCHAR) |
SELECT * FROM PostTypes | unique posttypes for software languages. | CREATE TABLE VoteTypes (
Id number,
Name text
)
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 ReviewT... |
SELECT college FROM table_name_67 WHERE school = "south medford high school" | Which college is the player from South Medford High School headed to? | CREATE TABLE table_name_67 (college VARCHAR, school VARCHAR) |
SELECT location FROM table_16432543_1 WHERE nickname = "Mountaineers" | Location of the school with the nickname Mountaineers | CREATE TABLE table_16432543_1 (location VARCHAR, nickname VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "6" AND prescriptions.drug = "Collagenase Ointment" | give me the number of patients whose days of hospital stay is greater than 6 and drug name is collagenase ointment? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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
)
C... |
SELECT school FROM table_name_68 WHERE college = "duke" | Which school is the player who is headed to Duke from? | CREATE TABLE table_name_68 (school VARCHAR, college VARCHAR) |
SELECT written_by FROM table_16432167_1 WHERE production_code = "942A" | Who wrote the episode with the production code of 942A? | CREATE TABLE table_16432167_1 (written_by VARCHAR, production_code VARCHAR) |
SELECT DISTINCT COUNT(paper.paperid) FROM paper, venue WHERE paper.year = 2015 AND venue.venueid = paper.venueid AND venue.venuename = 'nature communications' | How many papers was published in nature communications in 2015 | CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperdataset (
paperid ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.