answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(*) FROM Posts WHERE LastEditorUserId = 635608 AND OwnerUserId != 635608 AND LastEditDate > '2013-05-03 12:00:00 AM' | How many questions & answers last edited by Mat(635608) in a time range. | CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
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 PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
) |
SELECT COUNT(lmp1_winning_team) FROM table_24865763_2 WHERE rnd = 4 AND lmp2_winning_team = "No. 42 Strakka Racing" | How many won the LMP1 on round 4 if No. 42 Strakka Racing was the LMP2 Winning Team? | CREATE TABLE table_24865763_2 (lmp1_winning_team VARCHAR, rnd VARCHAR, lmp2_winning_team VARCHAR) |
SELECT score FROM table_27756014_1 WHERE game = 4 | What is the score of game 4? | CREATE TABLE table_27756014_1 (score VARCHAR, game VARCHAR) |
SELECT COUNT("Position") FROM table_14062 WHERE "Losses" = '1' AND "Conceded" > '9' | What is the total number of positions having 1 loss and more than 9 conceded? | CREATE TABLE table_14062 (
"Position" real,
"Team" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Scored" real,
"Conceded" real,
"Points" real
) |
SELECT rnd FROM table_24865763_2 WHERE lmp2_winning_team = "Mike Newton Thomas Erdos Ben Collins" | In what round did Mike Newton Thomas Erdos Ben Collins won the LMP2? | CREATE TABLE table_24865763_2 (rnd VARCHAR, lmp2_winning_team VARCHAR) |
SELECT score FROM table_27756014_1 WHERE date = "October 16" | What is the score of the game played on october 16? | CREATE TABLE table_27756014_1 (score VARCHAR, date VARCHAR) |
SELECT "Chairman" FROM table_3594 WHERE "Manager" = 'Mark Robins' | Who is the chairman of Mark Robins team? | CREATE TABLE table_3594 (
"Team" text,
"Manager" text,
"Chairman" text,
"Team captain" text,
"Kit maker" text,
"Sponsor" text
) |
SELECT MIN(blocks) FROM table_24856332_4 WHERE player = "Tye'sha Fluker" | How many blocks did tye'sha fluker have? | CREATE TABLE table_24856332_4 (blocks INTEGER, player VARCHAR) |
SELECT team FROM table_27756014_1 WHERE date = "October 5" | What is the team played on october 5? | CREATE TABLE table_27756014_1 (team VARCHAR, date VARCHAR) |
SELECT MAX("Land area (km\u00b2)") FROM table_62794 WHERE "Population density (per km\u00b2)" > '112.6' AND "Population (2006)" > '785' AND "Name" = 'pinehouse' | Which Land area (km ) has a Population density (per km ) larger than 112.6, and a Population (2006) larger than 785, and a Name of pinehouse? | CREATE TABLE table_62794 (
"Name" text,
"Population (2011)" real,
"Population (2006)" real,
"Change (%)" real,
"Land area (km\u00b2)" real,
"Population density (per km\u00b2)" real
) |
SELECT MAX(steals) FROM table_24856332_4 WHERE minutes = 324 | What is the highest number of steals for a player with 324 minutes? | CREATE TABLE table_24856332_4 (steals INTEGER, minutes VARCHAR) |
SELECT high_assists FROM table_27756314_6 WHERE date = "November 12" | who had high assists on november 12? | CREATE TABLE table_27756314_6 (high_assists VARCHAR, date VARCHAR) |
SELECT DISTINCT t1.c1 FROM (SELECT labevents.valuenum, PERCENT_RANK() OVER (ORDER BY labevents.valuenum) AS c1 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'red blood cells') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age = (SELECT admissions.age FROM admissions WHERE admissions.subject_id = 15209 AND admissions.dischtime IS NULL))) AS t1 WHERE t1.valuenum = 3.61 | what percentile is red blood cells 3.61 among patients of the same age as patient 15209 during their current hospital visit? | CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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 TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
) |
SELECT MIN(minutes) FROM table_24856332_4 WHERE steals = 47 | What is the lowest number of minutes for a player with 47 steals? | CREATE TABLE table_24856332_4 (minutes INTEGER, steals VARCHAR) |
SELECT date FROM table_27756314_10 WHERE high_points = "Michael Beasley , Martell Webster (16)" | What is the date when the high points is michael beasley , martell webster (16)? | CREATE TABLE table_27756314_10 (date VARCHAR, high_points VARCHAR) |
SELECT COUNT(*) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-46456')) AND treatment.treatmentname = 'surgery consultation' AND STRFTIME('%y', treatment.treatmenttime) = '2104' | how many times did patient 005-46456 receive surgery consultation in 2104? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
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 cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
) |
SELECT mixed_doubles FROM table_2486023_1 WHERE year = 1991 | Who played Mixed Doubles in 1991? | CREATE TABLE table_2486023_1 (mixed_doubles VARCHAR, year VARCHAR) |
SELECT game FROM table_27756314_10 WHERE team = "Indiana" | What is the game with the team indiana? | CREATE TABLE table_27756314_10 (game VARCHAR, team VARCHAR) |
SELECT record FROM table_name_14 WHERE location = "montreal, qc" AND visitor = "boston bruins" | What record has montreal, qc as the location, with boston bruins as the visitor? | CREATE TABLE table_name_14 (
record VARCHAR,
location VARCHAR,
visitor VARCHAR
) |
SELECT home_team FROM table_24887326_8 WHERE away_team = "Plymouth Argyle" | Who was the home team who played plymouth argyle? | CREATE TABLE table_24887326_8 (home_team VARCHAR, away_team VARCHAR) |
SELECT high_rebounds FROM table_27756314_10 WHERE date = "March 25" | Who had high rebounds when the date was march 25? | CREATE TABLE table_27756314_10 (high_rebounds VARCHAR, date VARCHAR) |
WITH Interesting(UserId) AS (SELECT 342852 UNION ALL SELECT 57611) SELECT PostId = p.Id, QuestionId = COALESCE(a.Id, p.Id), AnswerId = CASE WHEN p.PostTypeId = 2 THEN p.Id ELSE NULL END FROM Posts AS p LEFT JOIN Posts AS a ON p.PostTypeId = 2 AND p.ParentId = a.Id WHERE EXISTS(SELECT * FROM Interesting AS i WHERE p.OwnerUserId = i.UserId) OR EXISTS(SELECT * FROM Interesting AS i WHERE a.OwnerUserId = i.UserId) | Find coincident activity between two users. | CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
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 SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
) |
SELECT score_1 FROM table_24887326_8 WHERE away_team = "Norwich City" | What was the score when the away team was norwich city? | CREATE TABLE table_24887326_8 (score_1 VARCHAR, away_team VARCHAR) |
SELECT MAX(game) FROM table_27756314_10 WHERE score = "L 96–103 (OT)" | What is the highest game with the score l 96–103 (ot)? | CREATE TABLE table_27756314_10 (game INTEGER, score VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BOWEL OBSTRUCTION" AND demographic.dod_year <= "2174.0" | how many patients with primary disease bowel obstruction died in or before 2174? | 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) |
SELECT away_team FROM table_24887326_8 WHERE home_team = "Coventry City" | Who played as the away team when coventry city was the home team? | CREATE TABLE table_24887326_8 (away_team VARCHAR, home_team VARCHAR) |
SELECT team FROM table_27756314_10 WHERE high_points = "Wesley Johnson (20)" | What is the team when the high points were by wesley johnson (20)? | CREATE TABLE table_27756314_10 (team VARCHAR, high_points VARCHAR) |
SELECT "Memory" FROM table_21020 WHERE "Model number" = 'Atom E640T' | Name the memory for meodel number for atom e640t | CREATE TABLE table_21020 (
"Model number" text,
"sSpec number" text,
"Frequency" text,
"GPU frequency" text,
"L2 cache" text,
"I/O bus" text,
"Memory" text,
"Voltage" text,
"TDP" text,
"Socket" text,
"Release date" text,
"Part number(s)" text,
"Release price ( USD )" text
) |
SELECT final_score FROM table_24882796_2 WHERE opponent = "Frankfurt Galaxy" | What is the final score when they played Frankfurt Galaxy? | CREATE TABLE table_24882796_2 (final_score VARCHAR, opponent VARCHAR) |
SELECT record FROM table_27756314_7 WHERE date = "December 11" | what is the record for date december 11? | CREATE TABLE table_27756314_7 (record VARCHAR, date VARCHAR) |
SELECT SportName, COUNT(*) FROM SportsInfo GROUP BY SportName ORDER BY COUNT(*) | Visualize a bar chart for how many students play each sport?, and show total number from low to high order. | CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Plays_Games (
StuID INTEGER,
GameID INTEGER,
Hours_Played INTEGER
)
CREATE TABLE Video_Games (
GameID INTEGER,
GName VARCHAR(40),
GType VARCHAR(40)
)
CREATE TABLE SportsInfo (
StuID INTEGER,
SportName VARCHAR(32),
HoursPerWeek INTEGER,
GamesPlayed INTEGER,
OnScholarship VARCHAR(1)
) |
SELECT away_team FROM table_24887326_6 WHERE tie_no = 11 | Who is the away team for tie no 11? | CREATE TABLE table_24887326_6 (away_team VARCHAR, tie_no VARCHAR) |
SELECT high_assists FROM table_27756314_7 WHERE date = "December 3" | who had high assists on december 3? | CREATE TABLE table_27756314_7 (high_assists VARCHAR, date VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Anemia in chronic kidney disease" | how many patients have anemia in chronic kidney disease as their diagnosis long title? | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) |
SELECT away_team FROM table_24887326_6 WHERE tie_no = 15 | Who is the away team for tie no 15? | CREATE TABLE table_24887326_6 (away_team VARCHAR, tie_no VARCHAR) |
SELECT location_attendance FROM table_27756314_7 WHERE game = 19 | where was the location that had game 19? | CREATE TABLE table_27756314_7 (location_attendance VARCHAR, game VARCHAR) |
SELECT "Game site" FROM table_77441 WHERE "Week" = '1' | What is the Game site week 1? | CREATE TABLE table_77441 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game site" text
) |
SELECT MAX(tie_no) FROM table_24887326_6 WHERE attendance = 19129 | What is the highest tie that had 19129 attendance? | CREATE TABLE table_24887326_6 (tie_no INTEGER, attendance VARCHAR) |
SELECT location_attendance FROM table_27756474_13 WHERE date = "May 13" | Where was the game played and what was the attendance on May 13? | CREATE TABLE table_27756474_13 (location_attendance VARCHAR, date VARCHAR) |
SELECT AVG(rank) FROM table_name_70 WHERE gold < 0 | What is the rank where the gold is 0? | CREATE TABLE table_name_70 (
rank INTEGER,
gold INTEGER
) |
SELECT tie_no FROM table_24887326_6 WHERE home_team = "Stoke City" | What is the tie when the home team is Stoke City? | CREATE TABLE table_24887326_6 (tie_no VARCHAR, home_team VARCHAR) |
SELECT location_attendance FROM table_27756572_2 WHERE date = "October 12" | What was the location and the attendance for the game on October 12? | CREATE TABLE table_27756572_2 (location_attendance VARCHAR, date VARCHAR) |
SELECT MAX(sample_size) FROM table_name_72 WHERE date = "nov 9-11, 2007" AND margin_of_error < 4.3 | What was the sample size for the poll from Nov 9-11, 2007 with a margin of error less than 4.3? | CREATE TABLE table_name_72 (
sample_size INTEGER,
date VARCHAR,
margin_of_error VARCHAR
) |
SELECT tie_no FROM table_24887326_6 WHERE home_team = "Orient" | What tie has Orient as the home team? | CREATE TABLE table_24887326_6 (tie_no VARCHAR, home_team VARCHAR) |
SELECT no_of_processors FROM table_27765443_2 WHERE cpu_type = "NEC SX-4 vector processor" | Name the number of processors for nec sx-4 vector processor | CREATE TABLE table_27765443_2 (no_of_processors VARCHAR, cpu_type VARCHAR) |
SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22295) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'glucose') GROUP BY STRFTIME('%y', labevents.charttime) | what is patient 22295's yearly maximum level of glucose? | CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
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 icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
) |
SELECT COUNT(date) FROM table_24887326_6 WHERE tie_no = 12 | How many dates are there for tie number 12? | CREATE TABLE table_24887326_6 (date VARCHAR, tie_no VARCHAR) |
SELECT maximum_peak_performance___teraflops__ FROM table_27765443_2 WHERE period_of_operation = "October 2006 - January 2010" | Name the most peak performance for october 2006 - january 2010 | CREATE TABLE table_27765443_2 (maximum_peak_performance___teraflops__ VARCHAR, period_of_operation VARCHAR) |
SELECT score FROM table_name_73 WHERE player = "billy andrade" | What is the score for Billy Andrade? | CREATE TABLE table_name_73 (
score VARCHAR,
player VARCHAR
) |
SELECT COUNT(equipment) FROM table_24898185_4 WHERE points = 556 | When 556 is the amount of points how much equipment is there? | CREATE TABLE table_24898185_4 (equipment VARCHAR, points VARCHAR) |
SELECT cpu_type FROM table_27765443_2 WHERE period_of_operation = "June 2005 - April 2009" | Name the cpu type for june 2005 - april 2009 | CREATE TABLE table_27765443_2 (cpu_type VARCHAR, period_of_operation VARCHAR) |
SELECT "IHSAA Class" FROM table_64419 WHERE "Mascot" = 'raiders' | Which IHSAA class has a mascot of the Raiders? | CREATE TABLE table_64419 (
"School" text,
"Location" text,
"Mascot" text,
"Size" real,
"IHSAA Class" text,
"IHSAA Football Class" text,
"County" text
) |
SELECT championship FROM table_24901152_4 WHERE score = "6–4, 5–7, 6–2" | Which championship was the score 6–4, 5–7, 6–2? | CREATE TABLE table_24901152_4 (championship VARCHAR, score VARCHAR) |
SELECT COUNT(model___computer_name) FROM table_27765443_2 WHERE cpu_type = "AMD Opteron dual-core 2.6GHz" | Name the total number of model for amd opteron dual-core 2.6ghz | CREATE TABLE table_27765443_2 (model___computer_name VARCHAR, cpu_type VARCHAR) |
SELECT COUNT("Against") FROM table_20032 WHERE "Difference" = '11' | How many under the category of Against have a Difference of 11 | CREATE TABLE table_20032 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Won" real,
"Drawn" real,
"Lost" real,
"For" real,
"Against" real,
"Difference" real
) |
SELECT opponents FROM table_24901152_4 WHERE championship = "Rome" | Who were the opponents in the Rome championship? | CREATE TABLE table_24901152_4 (opponents VARCHAR, championship VARCHAR) |
SELECT no_of_processors FROM table_27765443_2 WHERE period_of_operation = "October 2006 - January 2010" | Name the number of processors for october 2006 - january 2010 | CREATE TABLE table_27765443_2 (no_of_processors VARCHAR, period_of_operation VARCHAR) |
SELECT * FROM Users ORDER BY DownVotes DESC LIMIT 100 | Users by Downvotes (top 100). | CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
) |
SELECT MAX(minutes) FROM table_24908692_5 WHERE field_goals = 70 | What is the maximum number of minutes associated with exactly 70 field goals? | CREATE TABLE table_24908692_5 (minutes INTEGER, field_goals VARCHAR) |
SELECT results FROM table_27758427_2 WHERE lmpc_winning_team = "#89 Intersport Racing" | What was the result for the cirtcuit where the LMPC winning team was #89 Intersport Racing? | CREATE TABLE table_27758427_2 (results VARCHAR, lmpc_winning_team VARCHAR) |
SELECT "Game" FROM table_18820 WHERE "Date" = 'March 7' | what's the game with date being march 7 | CREATE TABLE table_18820 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT MIN(field_goals) FROM table_24908692_5 WHERE assists = 84 | What is the minimum number of field goals associated with exactly 84 assists? | CREATE TABLE table_24908692_5 (field_goals INTEGER, assists VARCHAR) |
SELECT winnings FROM table_27781212_1 WHERE driver = "Jeff Gordon" | how many winnings does jeff gordon have? | CREATE TABLE table_27781212_1 (winnings VARCHAR, driver VARCHAR) |
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 20 AND 29) GROUP BY labevents.itemid) AS t1 WHERE t1.c1 <= 4) | what are the four most frequently ordered laboratory tests for patients of age 20s? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
) |
SELECT steals FROM table_24908692_5 WHERE player = "Tamika Williams" | How many steals did Tamika Williams have? | CREATE TABLE table_24908692_5 (steals VARCHAR, player VARCHAR) |
SELECT MIN(points) FROM table_27781212_1 WHERE driver = "Tommy Kendall" | what are the minimum points for tommy kendall? | CREATE TABLE table_27781212_1 (points INTEGER, driver VARCHAR) |
SELECT MAX("1949/50 ($ millions)") FROM table_2155 WHERE "1948/49 ($ millions)" = '232' | What's the 1949/50 expenditure (in $ millions) in the country where the 1948/49 expenditure was 232$ millions? | CREATE TABLE table_2155 (
"Country" text,
"1948/49 ($ millions)" real,
"1949/50 ($ millions)" real,
"1950/51 ($ millions)" real,
"Cumulative ($ millions)" real
) |
SELECT COUNT(steals) FROM table_24906653_5 WHERE blocks = 1 | List the number of takeaways with 1 rejection. | CREATE TABLE table_24906653_5 (steals VARCHAR, blocks VARCHAR) |
SELECT MIN(position) FROM table_27781212_1 WHERE points = 31 | what is the minimum position with 31 points? | CREATE TABLE table_27781212_1 (position INTEGER, points VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COMPLETE HEART BLOCK" AND demographic.dod_year <= "2148.0" | What is the number of patients who died on or before 2148 that had complete heart block as their primary disease? | 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 text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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
) |
SELECT COUNT(field_goals) FROM table_24906653_5 WHERE player = "Tonya Edwards" | How many long range shots did tonya edwards make. | CREATE TABLE table_24906653_5 (field_goals VARCHAR, player VARCHAR) |
SELECT driver FROM table_27781212_1 WHERE winnings = "$225,000" | who is the driver that had winnings of $225,000? | CREATE TABLE table_27781212_1 (driver VARCHAR, winnings VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypotension / pressor dependent' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE patient.gender = 'female' AND patient.age BETWEEN 30 AND 39 AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.drugstarttime AND DATETIME(t2.drugstarttime) BETWEEN DATETIME(t1.diagnosistime) AND DATETIME(t1.diagnosistime, '+2 month') GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 5 | what were the five most frequent drugs that were prescribed within 2 months to the hypotension / pressor dependent female patients with age 30s after they have been diagnosed with hypotension / pressor dependent, this year? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
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 microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) |
SELECT COUNT(field_goals) FROM table_24906653_5 WHERE points = 171 | List the number of long range shors where the score is 171. | CREATE TABLE table_24906653_5 (field_goals VARCHAR, points VARCHAR) |
SELECT COUNT(standard) FROM table_2780146_6 WHERE pm__g_kwh_ = "0.02" | How many different standards have a PM of 0.02 g/kWh? | CREATE TABLE table_2780146_6 (standard VARCHAR, pm__g_kwh_ VARCHAR) |
SELECT second_member FROM table_name_10 WHERE year > 1790 AND first_member = "john williams" | Who is the second member more recently than 1790 when John Williams is the first member? | CREATE TABLE table_name_10 (
second_member VARCHAR,
year VARCHAR,
first_member VARCHAR
) |
SELECT amiga_demo FROM table_2490289_1 WHERE pc_demo = "Tribes ( Pulse & Melon Dezign)" | Who won best amiga demo when tribes ( pulse & melon dezign) won best pc demo? | CREATE TABLE table_2490289_1 (amiga_demo VARCHAR, pc_demo VARCHAR) |
SELECT hc__g_kwh_ FROM table_2780146_6 WHERE standard = "Euro I" | What's the HC for the Euro I standard? | CREATE TABLE table_2780146_6 (hc__g_kwh_ VARCHAR, standard VARCHAR) |
SELECT miles__km_ FROM table_16493961_1 WHERE date = "June 7" | Name the miles for june 7 | CREATE TABLE table_16493961_1 (
miles__km_ VARCHAR,
date VARCHAR
) |
SELECT amiga_demo FROM table_2490289_1 WHERE pc_demo = "Alto Knallo (Free Electric Band)" | What won best amiga demo when alto knallo (free electric band) won best pc demo? | CREATE TABLE table_2490289_1 (amiga_demo VARCHAR, pc_demo VARCHAR) |
SELECT hc__g_kwh_ FROM table_2780146_6 WHERE no_x__g_kwh_ = "7.0" | What's the HC for the standard with NO x of 7.0 g/kWh? | CREATE TABLE table_2780146_6 (hc__g_kwh_ VARCHAR, no_x__g_kwh_ VARCHAR) |
SELECT "Motorcycle" FROM table_67166 WHERE "Rider" = 'anthony west' | Anthony West ride which Motorcyle? | CREATE TABLE table_67166 (
"Team" text,
"Constructor" text,
"Motorcycle" text,
"Tyre" text,
"Rider" text,
"Rounds" text
) |
SELECT pc_intro FROM table_2490289_1 WHERE amiga_demo = "My Kingdom (Haujobb & Scoopex)" | What won best pc intro when my kingdom (haujobb & scoopex) won best amiga demo? | CREATE TABLE table_2490289_1 (pc_intro VARCHAR, amiga_demo VARCHAR) |
SELECT pm__g_kwh_ FROM table_2780146_6 WHERE co__g_kwh_ = "12.3" | What's the PM for the standard with 12.3 g/kWh CO? | CREATE TABLE table_2780146_6 (pm__g_kwh_ VARCHAR, co__g_kwh_ VARCHAR) |
SELECT COUNT(top_10) FROM table_1507423_5 WHERE position = "78th" | How many entries arr there for the top 10 for the 78th position? | CREATE TABLE table_1507423_5 (
top_10 VARCHAR,
position VARCHAR
) |
SELECT pc_intro FROM table_2490289_1 WHERE amiga_intro = "4k0 (Polka Brothers)" | What won est pc intro when 4k0 (polka brothers) won best amiga intro? | CREATE TABLE table_2490289_1 (pc_intro VARCHAR, amiga_intro VARCHAR) |
SELECT no_x__g_kwh_ FROM table_2780146_6 WHERE hc__g_kwh_ = "1.23" | What's the NO of the standard with HC of 1.23 g/kWh? | CREATE TABLE table_2780146_6 (no_x__g_kwh_ VARCHAR, hc__g_kwh_ VARCHAR) |
SELECT AVG("Year") FROM table_74984 WHERE "Wins" > '0' AND "Class" = '250cc' AND "Points" = '95' | What is the mean year number where there are more than 0 wins, the class is 250cc, and the points are 95? | CREATE TABLE table_74984 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Wins" real
) |
SELECT pc_demo FROM table_2490289_1 WHERE c64_demo = "Tower Power (Camelot)" | What won best pc demo when tower power (camelot) won best c64 demo? | CREATE TABLE table_2490289_1 (pc_demo VARCHAR, c64_demo VARCHAR) |
SELECT original_air_date FROM table_27790959_1 WHERE us_viewers__million_ = "5.42" | What was the original air date of the episode that had 5.42 million viewers? | CREATE TABLE table_27790959_1 (original_air_date VARCHAR, us_viewers__million_ VARCHAR) |
SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID DESC | For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of job_id and the sum of manager_id , and group by attribute job_id, could you sort X from high to low order please? | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
) |
SELECT year FROM table_2490289_1 WHERE pc_intro = "FR-08: The Product ( Farbrausch )" | What year did fr-08: the product ( farbrausch ) win best pc intro? | CREATE TABLE table_2490289_1 (year VARCHAR, pc_intro VARCHAR) |
SELECT MIN(attendance) FROM table_27862483_3 WHERE win = "G. Claypool (4-1)" | How many people saw the game won by G. Claypool (4-1)? | CREATE TABLE table_27862483_3 (attendance INTEGER, win VARCHAR) |
SELECT student_id FROM student_course_registrations GROUP BY student_id ORDER BY COUNT(*) LIMIT 1 | what is id of students who registered some courses but the least number of courses in these students? | CREATE TABLE candidates (
candidate_id number,
candidate_details text
)
CREATE TABLE people_addresses (
person_address_id number,
person_id number,
address_id number,
date_from time,
date_to time
)
CREATE TABLE candidate_assessments (
candidate_id number,
qualification text,
assessment_date time,
asessment_outcome_code text
)
CREATE TABLE courses (
course_id text,
course_name text,
course_description text,
other_details text
)
CREATE TABLE student_course_registrations (
student_id number,
course_id number,
registration_date time
)
CREATE TABLE people (
person_id number,
first_name text,
middle_name text,
last_name text,
cell_mobile_number text,
email_address text,
login_name text,
password text
)
CREATE TABLE addresses (
address_id number,
line_1 text,
line_2 text,
city text,
zip_postcode text,
state_province_county text,
country text
)
CREATE TABLE students (
student_id number,
student_details text
)
CREATE TABLE student_course_attendance (
student_id number,
course_id number,
date_of_attendance time
) |
SELECT title FROM table_24910737_1 WHERE us_viewers__millions_ = "8.16" | What is the episode title that had a US viewership of 8.16? | CREATE TABLE table_24910737_1 (title VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT overall_record FROM table_27862483_3 WHERE win = "D. Klein (2-0)" | What was the overall record in the game won by D. Klein (2-0)? | CREATE TABLE table_27862483_3 (overall_record VARCHAR, win VARCHAR) |
SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 66015 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'hypertension nos') AND DATETIME(diagnoses_icd.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month')) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 66015 AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND t1.hadm_id = t2.hadm_id | what is the name of the drug prescribed to patient 66015 in the same hospital encounter after having been diagnosed with hypertension nos during the last month? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
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 TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
) |
SELECT written_by FROM table_24910737_1 WHERE us_viewers__millions_ = "7.14" | Who wrote the episodes that had a viewership of 7.14? | CREATE TABLE table_24910737_1 (written_by VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT overall_record FROM table_27862483_3 WHERE loss = "A. Pracher (4-1)" | What was the overall record of the game lost by A. Pracher (4-1)? | CREATE TABLE table_27862483_3 (overall_record VARCHAR, loss VARCHAR) |
SELECT COUNT("Position") FROM table_72574 WHERE "Height" = '6''1' AND "Hometown" = 'Columbia, South Carolina' | How many players were 6'1' and from Columbia, South Carolina? | CREATE TABLE table_72574 (
"Position" text,
"Number" real,
"Name" text,
"Height" text,
"Weight" text,
"Class" text,
"Hometown" text,
"Games\u2191" real
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.