answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(episodes) FROM table_name_35 WHERE duration = "3" | How many episodes have a duration of 3? | CREATE TABLE table_name_35 (episodes VARCHAR, duration VARCHAR) |
SELECT season FROM table_22977424_8 WHERE promoted_from_league = "Rotherham Titans" | Name the season for rotherham titans | CREATE TABLE table_22977424_8 (season VARCHAR, promoted_from_league VARCHAR) |
SELECT COUNT("2010 Est.") FROM table_15974 WHERE "City" = 'Cremona' | How many 2010 estimations have been done in the city of Cremona? | CREATE TABLE table_15974 (
"#" real,
"City" text,
"1981 Census" real,
"1991 Census" real,
"2001 Census" real,
"2010 Est." real,
"Region" text
) |
SELECT away_team FROM table_name_7 WHERE home_team = "collingwood" | What is the name of the away team who play Collingwood? | CREATE TABLE table_name_7 (away_team VARCHAR, home_team VARCHAR) |
SELECT name FROM table_22977424_8 WHERE promoted_to_league = "Plymouth Albion Orrell" | Name the name for plymouth albion orrell | CREATE TABLE table_22977424_8 (name VARCHAR, promoted_to_league VARCHAR) |
SELECT Posts.Id AS "post_link", Posts.OwnerUserId AS "user_link", Score, ViewCount, Score * 1000 / ViewCount AS "Score per Thousand Views" FROM Posts WHERE ViewCount < 10 AND PostTypeId = 1 ORDER BY Score DESC LIMIT 1000 | Hidden gems: Highest score for questions with less than 10 views. | 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 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 ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange 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 FlagTypes (
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 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 PostTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description 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 Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
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 PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
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 SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
) |
SELECT date FROM table_name_75 WHERE home_team = "collingwood" | What date did Collingwood play as the home team? | CREATE TABLE table_name_75 (date VARCHAR, home_team VARCHAR) |
SELECT tail_number FROM table_229917_2 WHERE brief_description = "Crashed" | What's the tail number of the airplane involved in the accident described as crashed? | CREATE TABLE table_229917_2 (tail_number VARCHAR, brief_description VARCHAR) |
SELECT AVG(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-57670') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY STRFTIME('%y-%m', patient.unitadmittime) | what is the monthly average of the weight of patient 011-57670 since 3 years ago? | CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime 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 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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
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
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
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
) |
SELECT MAX(year_of_disaffiliation) FROM table_name_31 WHERE station = "chch-tv" AND year_of_affiliation > 2001 | What is the most recent year of disaffiliation of a CHCH-TV station that affiliated after 2001? | CREATE TABLE table_name_31 (year_of_disaffiliation INTEGER, station VARCHAR, year_of_affiliation VARCHAR) |
SELECT COUNT(brief_description) FROM table_229917_2 WHERE fatalities = "0/161" | How many different brief descriptions are there for crashes with 0/161 fatalities? | CREATE TABLE table_229917_2 (brief_description VARCHAR, fatalities VARCHAR) |
SELECT MAX(year) FROM table_name_11 WHERE points < 16 AND class = "500cc" | What was the last year that they had less than 16 points in class 500cc? | CREATE TABLE table_name_11 (
year INTEGER,
points VARCHAR,
class VARCHAR
) |
SELECT MIN(year_of_disaffiliation) FROM table_name_74 WHERE city_of_license_market = "hamilton, ontario" | What is the earliest year of disaffiliation of a CHCH-TV station, licensed in Hamilton, Ontario? | CREATE TABLE table_name_74 (year_of_disaffiliation INTEGER, city_of_license_market VARCHAR) |
SELECT date__ddmmyyyy_ FROM table_229917_2 WHERE tail_number = "RA-85282" | When did the airplane with tail number RA-85282 crash? | CREATE TABLE table_229917_2 (date__ddmmyyyy_ VARCHAR, tail_number VARCHAR) |
SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE GROUP BY DEPT_CODE ORDER BY DEPT_CODE | Show me a bar chart for what is the total credit does each department offer?, rank from low to high by the bars. | CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
) |
SELECT SUM(bronze) FROM table_name_29 WHERE nation = "west germany" AND silver < 2 | How many bronze medals did west germany win when they had less than 2 silver medals? | CREATE TABLE table_name_29 (bronze INTEGER, nation VARCHAR, silver VARCHAR) |
SELECT fatalities FROM table_229917_2 WHERE brief_description = "Ditched 300 m short of runway" | How many fatalities were there in the crash described as ditched 300 m short of runway? | CREATE TABLE table_229917_2 (fatalities VARCHAR, brief_description VARCHAR) |
SELECT COUNT("First elected") FROM table_18547 WHERE "Incumbent" = 'W. Arthur Winstead' | How many times was w. arthur winstead first elected? | CREATE TABLE table_18547 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) |
SELECT SUM(bronze) FROM table_name_70 WHERE total > 2 AND gold > 2 | How many bronze medals were won when the total was larger than 2 and the more than 2 gold medals were won? | CREATE TABLE table_name_70 (bronze INTEGER, total VARCHAR, gold VARCHAR) |
SELECT fatalities FROM table_229917_2 WHERE brief_description = "Crashed at take-off due to engine failure" | How many fatalities were there in the crash described as crashed at take-off due to engine failure? | CREATE TABLE table_229917_2 (fatalities VARCHAR, brief_description VARCHAR) |
SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters ORDER BY Headquarters | Bar chart x axis headquarters y axis the total number, and sort by the bars in asc. | CREATE TABLE company (
Company_ID real,
Name text,
Headquarters text,
Industry text,
Sales_in_Billion real,
Profits_in_Billion real,
Assets_in_Billion real,
Market_Value_in_Billion real
)
CREATE TABLE employment (
Company_ID int,
People_ID int,
Year_working int
)
CREATE TABLE people (
People_ID int,
Age int,
Name text,
Nationality text,
Graduation_College text
) |
SELECT SUM(gold) FROM table_name_62 WHERE bronze > 2 | How many gold medals were won when more than 2 bronze medals were won? | CREATE TABLE table_name_62 (gold INTEGER, bronze INTEGER) |
SELECT MIN(class_year) FROM table_22982552_9 WHERE player = "Vencie Glenn" | What class year was Vencie Glenn from? | CREATE TABLE table_22982552_9 (class_year INTEGER, player VARCHAR) |
SELECT score FROM table_23286158_11 WHERE high_points = "Andre Miller (31)" | What is the score when high points were Andre Miller (31)? | CREATE TABLE table_23286158_11 (
score VARCHAR,
high_points VARCHAR
) |
SELECT MIN(pl_gp) FROM table_name_18 WHERE pick__number = 235 AND rd__number > 12 | What was the PI GP fpr pick# 235 for Rd# larger than 12? | CREATE TABLE table_name_18 (pl_gp INTEGER, pick__number VARCHAR, rd__number VARCHAR) |
SELECT position FROM table_22982552_9 WHERE highlight_s_ = "5 career INTs" | What position did the player whose highlights were 5 career INTs play? | CREATE TABLE table_22982552_9 (position VARCHAR, highlight_s_ VARCHAR) |
SELECT score FROM table_name_36 WHERE place = "t4" AND player = "butch baird" | What is score of the game that was at a paace of t4, and had the player Butch Baird? | CREATE TABLE table_name_36 (
score VARCHAR,
place VARCHAR,
player VARCHAR
) |
SELECT MAX(crowd) FROM table_name_89 WHERE away_team = "south melbourne" | What was the largest crowd when South Melbourne was the away team? | CREATE TABLE table_name_89 (crowd INTEGER, away_team VARCHAR) |
SELECT MIN(class_year) FROM table_22982552_9 WHERE highlight_s_ = "35 career INTs" | What class year was the player whose highlights were 35 career INTs from? | CREATE TABLE table_22982552_9 (class_year INTEGER, highlight_s_ VARCHAR) |
SELECT TagName FROM Tags ORDER BY Count DESC LIMIT 10000 | Select Top 10000 TagName From Tags Order By Count Desc. | 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 PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress 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 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 PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
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 ReviewTaskResultTypes (
Id number,
Name text,
Description 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 PostTypes (
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 FlagTypes (
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 Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
) |
SELECT home_team AS score FROM table_name_53 WHERE home_team = "richmond" | What is richmond's scores when they are the home team? | CREATE TABLE table_name_53 (home_team VARCHAR) |
SELECT MIN(class_year) FROM table_22982552_9 WHERE teams = "Buffalo" | What class year was the player who played for Buffalo from? | CREATE TABLE table_22982552_9 (class_year INTEGER, teams VARCHAR) |
SELECT "Score" FROM table_33951 WHERE "February" > '4' AND "Game" = '61' | What was the score after february 4 in the game 61? | CREATE TABLE table_33951 (
"Game" real,
"February" real,
"Opponent" text,
"Score" text,
"Record" text
) |
SELECT away_team AS score FROM table_name_32 WHERE away_team = "south melbourne" | What is south melbourne's scores when they are the away team? | CREATE TABLE table_name_32 (away_team VARCHAR) |
SELECT MIN(gore__number) FROM table_23014476_1 WHERE others__number = "6.6%" | Name the gore number for others # 6.6% | CREATE TABLE table_23014476_1 (gore__number INTEGER, others__number VARCHAR) |
SELECT tuesday FROM table_11019212_1 WHERE location = "Millhopper" | what's the tuesday time with location being millhopper | CREATE TABLE table_11019212_1 (
tuesday VARCHAR,
location VARCHAR
) |
SELECT date FROM table_name_1 WHERE venue = "windy hill" | What dates were the matches at windy hill? | CREATE TABLE table_name_1 (date VARCHAR, venue VARCHAR) |
SELECT others__percentage FROM table_23014476_1 WHERE bush__number = 1372 | Name the others % for bush number 1372 | CREATE TABLE table_23014476_1 (others__percentage VARCHAR, bush__number VARCHAR) |
SELECT player FROM table_name_49 WHERE round = 2 AND school_club_team = "xavier" | What is Player, when Round is '2', and when School/Club Team is 'Xavier'? | CREATE TABLE table_name_49 (
player VARCHAR,
round VARCHAR,
school_club_team VARCHAR
) |
SELECT AVG(laps) FROM table_name_50 WHERE driver = "piero taruffi" | What is the average number of laps for the driver Piero Taruffi? | CREATE TABLE table_name_50 (laps INTEGER, driver VARCHAR) |
SELECT gore__number FROM table_23014476_1 WHERE others__percentage = "5.3%" | Name the gore number for others % being 5.3% | CREATE TABLE table_23014476_1 (gore__number VARCHAR, others__percentage VARCHAR) |
SELECT demographic.ethnicity, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "3623" | Specify the ethnic origin of patient id 3623 along with the primary disease | 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 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 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 driver FROM table_name_23 WHERE laps = 12 AND grid < 10 | Which driver has 12 laps and a grid of less than 10? | CREATE TABLE table_name_23 (driver VARCHAR, laps VARCHAR, grid VARCHAR) |
SELECT county FROM table_23014476_1 WHERE others__percentage = "5.8" | Name the couty for others% 5.8 | CREATE TABLE table_23014476_1 (county VARCHAR, others__percentage VARCHAR) |
SELECT allergy.allergyname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-31229')) AND DATETIME(allergy.allergytime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', allergy.allergytime) = '08' | what are the names of the allergy that patient 011-31229 has in 08/this year? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime 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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
) |
SELECT illustration FROM table_name_76 WHERE design = "tim nokes" AND first_day_cover_cancellation = "calgary, alberta" | What is the Illustration with a Design of tim nokes, and a First Day Cover Cancellation with calgary, alberta? | CREATE TABLE table_name_76 (illustration VARCHAR, design VARCHAR, first_day_cover_cancellation VARCHAR) |
SELECT COUNT(bush__percentage) FROM table_23014476_1 WHERE county = "Elko" | Name the number of bush % for elko | CREATE TABLE table_23014476_1 (bush__percentage VARCHAR, county VARCHAR) |
SELECT card_id, customer_id, card_type_code, card_number FROM customers_cards | Show ids, customer ids, card type codes, card numbers for all cards. | CREATE TABLE customers (
customer_id number,
customer_first_name text,
customer_last_name text,
customer_address text,
customer_phone text,
customer_email text,
other_customer_details text
)
CREATE TABLE accounts (
account_id number,
customer_id number,
account_name text,
other_account_details text
)
CREATE TABLE customers_cards (
card_id number,
customer_id number,
card_type_code text,
card_number text,
date_valid_from time,
date_valid_to time,
other_card_details text
)
CREATE TABLE financial_transactions (
transaction_id number,
previous_transaction_id number,
account_id number,
card_id number,
transaction_type text,
transaction_date time,
transaction_amount number,
transaction_comment text,
other_transaction_details text
) |
SELECT date_of_issue FROM table_name_3 WHERE theme = "mental health" | What is the Date of Issue with a Theme with mental health? | CREATE TABLE table_name_3 (date_of_issue VARCHAR, theme VARCHAR) |
SELECT team FROM table_22998777_1 WHERE poles = 1 AND series = "ADAC GT Masters" | If the series is ADAC GT Masters and poles is 1, what is the name of the team? | CREATE TABLE table_22998777_1 (team VARCHAR, poles VARCHAR, series VARCHAR) |
SELECT DISTINCT ground_service.ground_fare FROM city, ground_service WHERE city.city_name = 'DALLAS' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'RENTAL CAR' | what are the costs of RENTAL CAR in DALLAS | CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
) |
SELECT theme FROM table_name_55 WHERE design = "sputnik design partners" | What is the Theme with a Design with sputnik design partners? | CREATE TABLE table_name_55 (theme VARCHAR, design VARCHAR) |
SELECT COUNT(season) FROM table_22998777_1 WHERE position = "26th" | If the position of 26th what is the season total number? | CREATE TABLE table_22998777_1 (season VARCHAR, position VARCHAR) |
SELECT "Attendance" FROM table_34942 WHERE "Opponent#" = 'purdue' | What is the Attendance number when the Opponent was purdue? | CREATE TABLE table_34942 (
"Date" text,
"Opponent#" text,
"Site" text,
"Result" text,
"Attendance" text
) |
SELECT paper_type FROM table_name_11 WHERE first_day_cover_cancellation = "ottawa, on" | What is the Paper Type with a First Day Cover Cancellation with ottawa, on? | CREATE TABLE table_name_11 (paper_type VARCHAR, first_day_cover_cancellation VARCHAR) |
SELECT season FROM table_22998777_1 WHERE points = "41" | If the points is 41, what is the season? | CREATE TABLE table_22998777_1 (season VARCHAR, points VARCHAR) |
SELECT office FROM table_name_63 WHERE republican_ticket = "seymour lowman" | What is the Office when the Republican ticket shows seymour lowman? | CREATE TABLE table_name_63 (
office VARCHAR,
republican_ticket VARCHAR
) |
SELECT paper_type FROM table_name_51 WHERE illustration = "martin dee, ubc public affairs" | What is the Paper Type with an Illustration with martin dee, ubc public affairs? | CREATE TABLE table_name_51 (paper_type VARCHAR, illustration VARCHAR) |
SELECT COUNT(season) FROM table_23014923_1 WHERE primary__south__winners = "Inter The Bloomfield" | If the primary (South) winners is Inter The Bloomfield, what is the season total number? | CREATE TABLE table_23014923_1 (season VARCHAR, primary__south__winners VARCHAR) |
SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '028-66126' AND STRFTIME('%y', patient.hospitaladmittime) = '2104' ORDER BY patient.hospitaladmittime LIMIT 1 | how did patient 028-66126 come in for first time in 2104 to the hospital? | 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 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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
) |
SELECT theme FROM table_name_28 WHERE paper_type = "tullis russell coatings" AND date_of_issue = "1 october 2008" | What is the Theme with a Paper Type of tullis russell coatings, and a Date with Issue of 1 october 2008? | CREATE TABLE table_name_28 (theme VARCHAR, paper_type VARCHAR, date_of_issue VARCHAR) |
SELECT COUNT(season) FROM table_23014923_1 WHERE primary__south__winners = "Ridings High 'A'" | What is the season total number if the primary (South) winners is Ridings High 'A'? | CREATE TABLE table_23014923_1 (season VARCHAR, primary__south__winners VARCHAR) |
SELECT date FROM table_name_70 WHERE away_team = "richmond" | What is the date of the game where Richmond was the away team? | CREATE TABLE table_name_70 (
date VARCHAR,
away_team VARCHAR
) |
SELECT tie_no FROM table_name_73 WHERE away_team = "lewes" | What is the tie number when the away team is Lewes? | CREATE TABLE table_name_73 (tie_no VARCHAR, away_team VARCHAR) |
SELECT season FROM table_23014923_1 WHERE intermediate__south__winners = "Southmead Athletic" | What is the year of the season if the intermediate (South) winners is Southmead Athletic? | CREATE TABLE table_23014923_1 (season VARCHAR, intermediate__south__winners VARCHAR) |
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT icustays.hadm_id FROM icustays WHERE icustays.icustay_id IN (SELECT inputevents_cv.icustay_id FROM inputevents_cv WHERE inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'epidural-marcaine' AND d_items.linksto = 'inputevents_cv') AND DATETIME(inputevents_cv.charttime) >= DATETIME(CURRENT_TIME(), '-4 year'))) | what is the number of patients who have had a epidural-marcaine intake since 4 years ago? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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 d_icd_procedures (
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 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 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 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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value 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 chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_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 diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
) |
SELECT away_team FROM table_name_5 WHERE home_team = "cheltenham town" | What is the away team when the home team is Cheltenham Town? | CREATE TABLE table_name_5 (away_team VARCHAR, home_team VARCHAR) |
SELECT season FROM table_23014923_1 WHERE minor__south__winners = "Bristol Sanctuary XI" | What is the season date if the minor (South) winners is Bristol Sanctuary XI? | CREATE TABLE table_23014923_1 (season VARCHAR, minor__south__winners VARCHAR) |
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'coronar arteriogr-2 cath') AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) | count the number of people who have had a coronar arteriogr-2 cath procedure this year. | 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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
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 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 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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 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 d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name 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 home_team FROM table_name_76 WHERE tie_no = "34" | What is the home team of the game with tie number 34? | CREATE TABLE table_name_76 (home_team VARCHAR, tie_no VARCHAR) |
SELECT COUNT(minor__south__winners) FROM table_23014923_1 WHERE primary__south__winners = "Mendip Gate" | What isthe minor (South) winners total number is the primary (South) winners is Mendip Gate? | CREATE TABLE table_23014923_1 (minor__south__winners VARCHAR, primary__south__winners VARCHAR) |
SELECT demographic.gender, demographic.dischtime FROM demographic WHERE demographic.subject_id = "2560" | give me the gender and discharge time of subject id 2560. | 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 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 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_name_33 WHERE tie_no = "31" | What is the away team of the game with tie number 31? | CREATE TABLE table_name_33 (away_team VARCHAR, tie_no VARCHAR) |
SELECT area_damaged FROM table_23014685_1 WHERE target = "King Khalid Military City" | What area was damaged when King Khalid Military City was targeted? | CREATE TABLE table_23014685_1 (area_damaged VARCHAR, target VARCHAR) |
SELECT "Team" FROM table_25504 WHERE "Date" = 'December 11' | Who was he opponent on december 11? | CREATE TABLE table_25504 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT SUM(goals_for) FROM table_name_50 WHERE wins < 4 AND losses > 6 | How many goals for were scored for the team(s) that won fewer than 4 games and lost more than 6? | CREATE TABLE table_name_50 (goals_for INTEGER, wins VARCHAR, losses VARCHAR) |
SELECT place_ & _date FROM table_23014685_1 WHERE area_damaged = "Apartments area" | What was the place and date that the Apartments area was damaged? | CREATE TABLE table_23014685_1 (place_ VARCHAR, _date VARCHAR, area_damaged VARCHAR) |
SELECT "Gross" FROM table_7839 WHERE "Rank" > '7' AND "Director" = 'barry levinson' | WHAT IS THE GROSS DOLLARS WITH A RANK OF 7 OR MORE, AND DIRECTOR BARRY LEVINSON? | CREATE TABLE table_7839 (
"Rank" real,
"Title" text,
"Studio" text,
"Director" text,
"Gross" text
) |
SELECT AVG(losses) FROM table_name_37 WHERE games_played > 8 | What is the average losses for the team(s) that played more than 8 games? | CREATE TABLE table_name_37 (losses INTEGER, games_played INTEGER) |
SELECT intercepted_by_patriot FROM table_23014685_1 WHERE area_damaged = "Parking lot" | Was the missile intercepted by patriot when the parking lot was damaged? | CREATE TABLE table_23014685_1 (intercepted_by_patriot VARCHAR, area_damaged VARCHAR) |
SELECT "Horse" FROM table_3164 WHERE "Jockey" = 'Peter Wells' | Who was the horse when the jockey was Peter Wells? | CREATE TABLE table_3164 (
"Saddle cloth" real,
"Horse" text,
"Trainer" text,
"Jockey" text,
"Weight (kg)" text,
"Barrier [b ]" real,
"Placing" text
) |
SELECT fleet_size FROM table_name_73 WHERE class = "vanguard 0-6-0dh" | What is the fleet size of the Vanguard 0-6-0dh class? | CREATE TABLE table_name_73 (fleet_size VARCHAR, class VARCHAR) |
SELECT MIN(no) FROM table_23014685_1 WHERE area_damaged = "Islamic University campus" | What number missile led to damage to the Islamic University campus? | CREATE TABLE table_23014685_1 (no INTEGER, area_damaged VARCHAR) |
SELECT "length" FROM table_204_312 WHERE "stage" = '3' | what was the total length listed for stage 3 ? | CREATE TABLE table_204_312 (
id number,
"stage" text,
"date" text,
"route" text,
"terrain" text,
"length" text,
"winner" text
) |
SELECT introduced FROM table_name_64 WHERE type = "electro-diesel locomotive" | What is the year of introduction for the Electro-Diesel locomotive? | CREATE TABLE table_name_64 (introduced VARCHAR, type VARCHAR) |
SELECT COUNT(year) FROM table_23015396_1 WHERE driver = "Mark Martin" | Name the number of year for mark martin | CREATE TABLE table_23015396_1 (year VARCHAR, driver VARCHAR) |
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'anion gap') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 62413) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', labevents.charttime) = '02' | did patient 62413 get a anion gap laboratory test in 02/this year? | 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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime 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
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
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 d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
) |
SELECT AVG(fleet_size) FROM table_name_3 WHERE type = "shunter" AND introduced = "1959" | What is the average fleet size for the Shunter type introduced in 1959? | CREATE TABLE table_name_3 (fleet_size INTEGER, type VARCHAR, introduced VARCHAR) |
SELECT COUNT(year) FROM table_23015396_1 WHERE date = "June 30" | Name the number of year for june 30 | CREATE TABLE table_23015396_1 (year VARCHAR, date VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.diagnosis = "BOWEL OBSTRUCTION" | how many of the patients with bowel obstruction as primary disease were discharged to snf? | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid 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
) |
SELECT MIN(fleet_size) FROM table_name_87 WHERE type = "shunter" AND introduced = "1953" | What is the smallest fleet size with a type of shunter introduced in 1953? | CREATE TABLE table_name_87 (fleet_size INTEGER, type VARCHAR, introduced VARCHAR) |
SELECT model_number FROM table_23028629_2 WHERE part_number_s_ = "CM80616003177ACBX80616I5660" | What is the model number for part numbers of cm80616003177acbx80616i5660? | CREATE TABLE table_23028629_2 (model_number VARCHAR, part_number_s_ VARCHAR) |
SELECT "best 10-year period" FROM table_45646 WHERE "best 2-year period" = 'petrosian' | Which best 10-year period has a best 2-year period of petrosian? | CREATE TABLE table_45646 (
"Position" real,
"best year" text,
"best 2-year period" text,
"best 3-year period" text,
"best 5-year period" text,
"best 10-year period" text,
"best 15-year period" text
) |
SELECT MIN(viewers__m_) FROM table_name_65 WHERE air_date = "january 24, 2008" AND rating > 3.6 | What show that was aired on January 24, 2008 with a rating larger than 3.6 had the lowest viewers? How Many Viewers in the millions? | CREATE TABLE table_name_65 (viewers__m_ INTEGER, air_date VARCHAR, rating VARCHAR) |
SELECT release_price___usd__ FROM table_23028629_2 WHERE model_number = "Core i5-650" | What is every release price(USD) for model number core i5-650? | CREATE TABLE table_23028629_2 (release_price___usd__ VARCHAR, model_number VARCHAR) |
SELECT position FROM table_name_56 WHERE appearances > 167 AND nationality = "wales" AND goals > 0 AND leeds_career = "1977–1982" | What position does the Wales player who made more than 167 appearances, had more than 0 goals, and had a Leeds career from 1977 1982 play? | CREATE TABLE table_name_56 (
position VARCHAR,
leeds_career VARCHAR,
goals VARCHAR,
appearances VARCHAR,
nationality VARCHAR
) |
SELECT rounds FROM table_name_20 WHERE chassis = "sf01" | Which round has a car with a chassis of sf01? | CREATE TABLE table_name_20 (rounds VARCHAR, chassis VARCHAR) |
SELECT COUNT(frequency) FROM table_23028629_2 WHERE model_number = "Core i5-655K" | How many frequencies have a model number of core i5-655k? | CREATE TABLE table_23028629_2 (frequency VARCHAR, model_number VARCHAR) |
SELECT "contestant" FROM table_203_791 WHERE "age" = 17 | who was the only 17 year old delegate ? | CREATE TABLE table_203_791 (
id number,
"represented" text,
"contestant" text,
"age" number,
"height" text,
"hometown" text
) |
SELECT country FROM table_name_22 WHERE average < 9.6 AND interview > 9.22 AND swimsuit > 9.46 | Which country has swimsuit more than 9.46 and interview more than 9.22 with average less than 9.6? | CREATE TABLE table_name_22 (country VARCHAR, swimsuit VARCHAR, average VARCHAR, interview VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.