answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT incumbent FROM table_2668374_18 WHERE district = "Virginia 3" | Who was the incumbent in Virginia 3? | CREATE TABLE table_2668374_18 (incumbent VARCHAR, district VARCHAR) |
SELECT MIN(wins) FROM table_name_51 WHERE year > 1986 AND team = "lucky strike yamaha" AND points < 6 | After 1986, how many Wins did Lucky Strike Yamaha Team with less than 6 Points have? | CREATE TABLE table_name_51 (wins INTEGER, points VARCHAR, year VARCHAR, team VARCHAR) |
SELECT us_viewers__millions_ FROM table_25246990_5 WHERE no_in_season = 4 | How many U.S. viewers were there for the number 4 episode in season? | CREATE TABLE table_25246990_5 (
us_viewers__millions_ VARCHAR,
no_in_season VARCHAR
) |
SELECT incumbent FROM table_2668374_18 WHERE party = "Federalist" AND first_elected = "1803" | What incumbent was a federalist that was first elected in 1803? | CREATE TABLE table_2668374_18 (incumbent VARCHAR, party VARCHAR, first_elected VARCHAR) |
SELECT COUNT(year) FROM table_name_84 WHERE machine = "rg500" AND points > 17 | In what Year did the RG500 Machine have more than 17 Points? | CREATE TABLE table_name_84 (year VARCHAR, machine VARCHAR, points VARCHAR) |
SELECT "Title" FROM table_8020 WHERE "Format" = '2-cd' AND "Story #" = '026' | Available in 2-CD format, what is the title of story number 026? | CREATE TABLE table_8020 (
"Story #" text,
"Title" text,
"Doctor" text,
"Narrator" text,
"Format" text,
"release date" text
) |
SELECT COUNT(party) FROM table_2668374_18 WHERE first_elected = "1805" | How many parties were first elected in 1805? | CREATE TABLE table_2668374_18 (party VARCHAR, first_elected VARCHAR) |
SELECT MIN(wins) FROM table_name_19 WHERE year = 1988 | What were the least Wins in 1988? | CREATE TABLE table_name_19 (wins INTEGER, year VARCHAR) |
SELECT current_status FROM table_name_64 WHERE make = "gm advanced design" AND number_of_seats > 41 | What is the current status for GM Advanced Design with more than 41 seats? | CREATE TABLE table_name_64 (
current_status VARCHAR,
make VARCHAR,
number_of_seats VARCHAR
) |
SELECT district FROM table_2668374_18 WHERE incumbent = "John Dawson" | What district was John Dawson from? | CREATE TABLE table_2668374_18 (district VARCHAR, incumbent VARCHAR) |
SELECT COUNT(points) FROM table_name_79 WHERE february > 12 AND game < 60 AND opponent = "new york islanders" | How many points did the Flyers have against the New York Islanders with a February bigger than 12, and a game smaller than 60? | CREATE TABLE table_name_79 (points VARCHAR, opponent VARCHAR, february VARCHAR, game VARCHAR) |
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(DEPARTMENT_ID) DESC | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find hire_date and the average of department_id bin hire_date by time, and visualize them by a bar chart, could you rank from high to low by the total number? | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,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 job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,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)
) |
SELECT candidates FROM table_2668374_10 WHERE incumbent = "Samuel Riker" | Who were the running candidates when Samuel Riker was the incumbent? | CREATE TABLE table_2668374_10 (candidates VARCHAR, incumbent VARCHAR) |
SELECT location FROM table_name_68 WHERE date = "feb 10" | What is the location of the tournament on Feb 10? | CREATE TABLE table_name_68 (location VARCHAR, date VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "7245" AND lab.flag = "delta" | give the number of patients diagnosed under icd9 code 7245 whose lab test status is delta. | 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
)
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
) |
SELECT candidates FROM table_2668367_14 WHERE incumbent = "Nathaniel Macon" | Who were the candidates in the district where the incumbent was Nathaniel Macon? | CREATE TABLE table_2668367_14 (candidates VARCHAR, incumbent VARCHAR) |
SELECT date FROM table_name_65 WHERE location = "north carolina" AND tournament = "kmart greater greensboro open" | What is the date of the Kmart greater greensboro open in North Carolina? | CREATE TABLE table_name_65 (date VARCHAR, location VARCHAR, tournament VARCHAR) |
SELECT Id AS "user_link", Location, Reputation FROM Users WHERE AboutMe LIKE '%jesus%' OR AboutMe LIKE '%Jesus%' ORDER BY Reputation DESC | People with Jesus in their about me section. Yeah, what the name says | 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 Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount 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 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 SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostTypes (
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 FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResultTypes (
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 PostTags (
PostId number,
TagId 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 PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress 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 Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId 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 TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
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 ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
) |
SELECT party FROM table_2668367_14 WHERE incumbent = "Joseph Pearson" | What party did the incumbent Joseph Pearson belong to? | CREATE TABLE table_2668367_14 (party VARCHAR, incumbent VARCHAR) |
SELECT winner FROM table_name_76 WHERE tournament = "h.e.b. texas open" | Who is the winner of the H.E.B. Texas open? | CREATE TABLE table_name_76 (winner VARCHAR, tournament VARCHAR) |
SELECT reign FROM wrestler GROUP BY reign ORDER BY COUNT(*) DESC LIMIT 1 | Which reign is the most common among wrestlers? | CREATE TABLE elimination (
elimination_id text,
wrestler_id text,
team text,
eliminated_by text,
elimination_move text,
time text
)
CREATE TABLE wrestler (
wrestler_id number,
name text,
reign text,
days_held text,
location text,
event text
) |
SELECT COUNT(incumbent) FROM table_2668401_12 WHERE district = "Pennsylvania 5" | How many incumbents are there in Pennsylvania 5? | CREATE TABLE table_2668401_12 (incumbent VARCHAR, district VARCHAR) |
SELECT AVG(weight) FROM table_name_63 WHERE position = "guard" AND name = "jeremy case" | What is the average weight of Jeremy Case, who plays guard? | CREATE TABLE table_name_63 (weight INTEGER, position VARCHAR, name VARCHAR) |
SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-210868')) AND vitalperiodic.systemicsystolic BETWEEN systolic_bp_lower AND systolic_bp_upper AND NOT vitalperiodic.systemicsystolic IS NULL AND DATETIME(vitalperiodic.observationtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', vitalperiodic.observationtime) = '08' | was the systemicsystolic of patient 027-210868 in 08/this year normal? | 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 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 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 diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) |
SELECT party FROM table_2668401_12 WHERE district = "Pennsylvania 8" | What are the parties listed for Pennsylvania 8? | CREATE TABLE table_2668401_12 (party VARCHAR, district VARCHAR) |
SELECT position FROM table_name_56 WHERE home_town = "new york city, ny" | What is the position of the player from New York City, NY? | CREATE TABLE table_name_56 (position VARCHAR, home_town VARCHAR) |
SELECT "First Performance" FROM table_14502 WHERE "Status" = 'original cast' AND "Name" = 'rhys kosakowski' | What is the date of the First Performance of Rhys Kosakowski as Billy Elliot in the Original Cast? | CREATE TABLE table_14502 (
"Status" text,
"Name" text,
"First Performance" text,
"Last Performance" text,
"Style" text
) |
SELECT incumbent FROM table_2668401_12 WHERE candidates = "Joseph Hiester (DR) 83.2% Roswell Wells (F) 16.8%" | Name the incumbent for candidates Joseph Hiester (dr) 83.2% Roswell Wells (f) 16.8%. | CREATE TABLE table_2668401_12 (incumbent VARCHAR, candidates VARCHAR) |
SELECT year FROM table_name_53 WHERE position = "guard" AND name = "mario chalmers" | What year is guard Mario Chalmers? | CREATE TABLE table_name_53 (year VARCHAR, position VARCHAR, name VARCHAR) |
SELECT "International Passengers" FROM table_19007 WHERE "Rank" = '15' | What is the total number of passengers of the airport ranked 15? | CREATE TABLE table_19007 (
"Rank" real,
"Airport" text,
"Total Passengers" real,
"% Change 2007/2008" text,
"International Passengers" real,
"Domestic Passengers" real,
"Transit Passengers" real,
"Aircraft Movements" real,
"Freight ( Metric Tonnes )" real
) |
SELECT result FROM table_2668401_12 WHERE incumbent = "Andrew Gregg" | What was the result for Andrew Gregg? | CREATE TABLE table_2668401_12 (result VARCHAR, incumbent VARCHAR) |
SELECT score FROM table_name_51 WHERE country = "japan" | What was japan's score? | CREATE TABLE table_name_51 (score VARCHAR, country VARCHAR) |
SELECT SUM(bronze) FROM table_name_47 WHERE rank > 11 AND gold < 0 | What is the sum of Bronze when the rank is more than 11 and gold is less than 0? | CREATE TABLE table_name_47 (
bronze INTEGER,
rank VARCHAR,
gold VARCHAR
) |
SELECT result FROM table_2668401_12 WHERE district = "Pennsylvania 8" | What was the result for Pennsylvania 8? | CREATE TABLE table_2668401_12 (result VARCHAR, district VARCHAR) |
SELECT venue FROM table_name_66 WHERE country = "england" AND champion = "alison nicholas" | Which Venue has a Country of england, and a Champion of alison nicholas? | CREATE TABLE table_name_66 (venue VARCHAR, country VARCHAR, champion VARCHAR) |
SELECT DATE(CreationDate), COUNT(PostId) FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Tags.TagName = '##TagName:string##' GROUP BY DATE(CreationDate) ORDER BY DATE(CreationDate) | Number of posts with a tag name grouped by day. | CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResultTypes (
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 PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId 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 Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
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 Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount 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 PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskStates (
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 SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange 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 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 PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress 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 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 PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostTags (
PostId number,
TagId number
) |
SELECT party FROM table_2668401_17 WHERE result = "Re-elected" AND first_elected = "1797" AND district = "Virginia 5" | What party did the incumbent from the Virginia 5 district who was re-elected and was first elected in 1797 belong to? | CREATE TABLE table_2668401_17 (party VARCHAR, district VARCHAR, result VARCHAR, first_elected VARCHAR) |
SELECT country FROM table_name_16 WHERE year > 1978 AND score = "295" AND venue = "lindrick golf club" | Which Country has a Year larger than 1978, and a Score of 295, and a Venue of lindrick golf club? | CREATE TABLE table_name_16 (country VARCHAR, venue VARCHAR, year VARCHAR, score VARCHAR) |
SELECT COUNT(laps) FROM table_name_51 WHERE grid > 14 AND rider = "sylvain guintoli" | How many Laps have Grid larger than 14, and a Rider of sylvain guintoli? | CREATE TABLE table_name_51 (
laps VARCHAR,
grid VARCHAR,
rider VARCHAR
) |
SELECT first_elected FROM table_2668401_17 WHERE result = "Democratic-Republican gain" | When was the incumbent first elected in the district where the result was a democratic-republican gain? | CREATE TABLE table_2668401_17 (first_elected VARCHAR, result VARCHAR) |
SELECT jockey FROM table_name_35 WHERE odds = "9/1" | what player scored 9/1 | CREATE TABLE table_name_35 (jockey VARCHAR, odds VARCHAR) |
SELECT "School" FROM table_4042 WHERE "School website" = 'http://www.sjfisher.herts.sch.uk/' | Which school has a website of http://www.sjfisher.herts.sch.uk/? | CREATE TABLE table_4042 (
"School" text,
"Gender" text,
"Age Range" text,
"Religious Affiliation" text,
"Location" text,
"School website" text
) |
SELECT district FROM table_2668401_17 WHERE incumbent = "Edwin Gray" | In what district was the incumbent Edwin Gray? | CREATE TABLE table_2668401_17 (district VARCHAR, incumbent VARCHAR) |
SELECT date FROM table_name_69 WHERE score = "6–4, 7–5" | On what date was the score 6–4, 7–5? | CREATE TABLE table_name_69 (date VARCHAR, score VARCHAR) |
SELECT "Attendance" FROM table_8321 WHERE "Opponent" = 'new orleans saints' | What was the attendance when they played the New Orleans Saints? | CREATE TABLE table_8321 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) |
SELECT first_elected FROM table_2668401_17 WHERE district = "Virginia 10" | When was the incumbent from the Virginia 10 district first elected? | CREATE TABLE table_2668401_17 (first_elected VARCHAR, district VARCHAR) |
SELECT opponent FROM table_name_79 WHERE outcome = "runner-up" AND date = "november 15, 2010" | Who was the opponent with an outcome runner-up on November 15, 2010? | CREATE TABLE table_name_79 (opponent VARCHAR, outcome VARCHAR, date VARCHAR) |
SELECT "Score" FROM table_30991 WHERE "Championship" = 'French Open' | What are the results of those matches where the championship is French Open? | CREATE TABLE table_30991 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) |
SELECT result FROM table_2668387_18 WHERE candidates = "Walter Jones (DR) 99.0% Henry Lee (F) 1.0%" | Name the result for walter jones (dr) 99.0% henry lee (f) 1.0% | CREATE TABLE table_2668387_18 (result VARCHAR, candidates VARCHAR) |
SELECT outcome FROM table_name_98 WHERE opponent = "rik de voest" | What was the outcome for Rik de Voest as opponent? | CREATE TABLE table_name_98 (outcome VARCHAR, opponent VARCHAR) |
SELECT "Year named" FROM table_46705 WHERE "Diameter (km)" = '729' | What was the year when the diameter was 729 km? | CREATE TABLE table_46705 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" real,
"Year named" real,
"Name origin" text
) |
SELECT district FROM table_2668387_18 WHERE incumbent = "Matthew Clay" | Name the district for matthew clay | CREATE TABLE table_2668387_18 (district VARCHAR, incumbent VARCHAR) |
SELECT score FROM table_name_55 WHERE date = "october 24, 2005" | What was the score on October 24, 2005? | CREATE TABLE table_name_55 (score VARCHAR, date VARCHAR) |
SELECT name, cost FROM procedures ORDER BY cost DESC | Sort the list of names and costs of all procedures in the descending order of cost. | CREATE TABLE procedures (
code number,
name text,
cost number
)
CREATE TABLE affiliated_with (
physician number,
department number,
primaryaffiliation boolean
)
CREATE TABLE room (
roomnumber number,
roomtype text,
blockfloor number,
blockcode number,
unavailable boolean
)
CREATE TABLE medication (
code number,
name text,
brand text,
description text
)
CREATE TABLE nurse (
employeeid number,
name text,
position text,
registered boolean,
ssn number
)
CREATE TABLE undergoes (
patient number,
procedures number,
stay number,
dateundergoes time,
physician number,
assistingnurse number
)
CREATE TABLE physician (
employeeid number,
name text,
position text,
ssn number
)
CREATE TABLE stay (
stayid number,
patient number,
room number,
staystart time,
stayend time
)
CREATE TABLE patient (
ssn number,
name text,
address text,
phone text,
insuranceid number,
pcp number
)
CREATE TABLE on_call (
nurse number,
blockfloor number,
blockcode number,
oncallstart time,
oncallend time
)
CREATE TABLE trained_in (
physician number,
treatment number,
certificationdate time,
certificationexpires time
)
CREATE TABLE prescribes (
physician number,
patient number,
medication number,
date time,
appointment number,
dose text
)
CREATE TABLE block (
blockfloor number,
blockcode number
)
CREATE TABLE appointment (
appointmentid number,
patient number,
prepnurse number,
physician number,
start time,
end time,
examinationroom text
)
CREATE TABLE department (
departmentid number,
name text,
head number
) |
SELECT COUNT(first_elected) FROM table_2668387_18 WHERE incumbent = "John Smith" | Name the number of first elected for john smith | CREATE TABLE table_2668387_18 (first_elected VARCHAR, incumbent VARCHAR) |
SELECT SUM(state_champions) FROM table_name_72 WHERE mrc_championships > 9 AND records = "192-189-3" AND co_champions > 4 | What is the sum of state champions with more tan 9 MRC Championships, more than 4 co-champions, and a record of 192-189-3? | CREATE TABLE table_name_72 (state_champions INTEGER, co_champions VARCHAR, mrc_championships VARCHAR, records VARCHAR) |
SELECT samurai FROM table_name_97 WHERE stampede = "t. mask" | Name the samurai for stampede of t. mask | CREATE TABLE table_name_97 (
samurai VARCHAR,
stampede VARCHAR
) |
SELECT incumbent FROM table_2668387_18 WHERE district = "Virginia 18" | Name the incumbent for virginia 18 | CREATE TABLE table_2668387_18 (incumbent VARCHAR, district VARCHAR) |
SELECT co_champions FROM table_name_49 WHERE solo = 3 AND mrc_championships > 3 | What was the co-champions value when solo was 3 and MRC Championships is greater than 3? | CREATE TABLE table_name_49 (co_champions VARCHAR, solo VARCHAR, mrc_championships VARCHAR) |
SELECT MAX("Assists") FROM table_12687 WHERE "Percentage" < '0.34900000000000003' AND "Solo Blocks" > '13' AND "Total Attempts" < '4713' | When the percentage is 0.34900000000000003 with more than 13 solo blocks and less than 4713 total attempts, what is the greatest assists? | CREATE TABLE table_12687 (
"Season" text,
"GP/MP" text,
"Kills" real,
"K/Game" real,
"Errors" real,
"Total Attempts" real,
"Percentage" real,
"Assists" real,
"Service Aces" real,
"Digs" real,
"Solo Blocks" real,
"Block Assists" real,
"Total Blocks" real
) |
SELECT district FROM table_2668387_18 WHERE candidates = "John Randolph (DR)" | Name the district for john randolph (dr) | CREATE TABLE table_2668387_18 (district VARCHAR, candidates VARCHAR) |
SELECT MAX(co_champions) FROM table_name_51 WHERE pct < 0.786 AND mrc_championships = 6 AND records = "88-45-6" | What is the highest value for co-champions when the PCT is less than 0.786 and MRC championships is 6 with records of 88-45-6? | CREATE TABLE table_name_51 (co_champions INTEGER, records VARCHAR, pct VARCHAR, mrc_championships VARCHAR) |
SELECT team FROM table_1405704_1 WHERE race_name = "Texas Grand Prix" AND engine = "Foyt" | What team raced with a Foyt engine in the Texas Grand Prix? | CREATE TABLE table_1405704_1 (
team VARCHAR,
race_name VARCHAR,
engine VARCHAR
) |
SELECT incumbent FROM table_2668387_18 WHERE district = "Virginia 4" | Name the incumbent for virginia 4 | CREATE TABLE table_2668387_18 (incumbent VARCHAR, district VARCHAR) |
SELECT AVG(mrc_championships) FROM table_name_31 WHERE pct > 0.685 AND co_champions > 1 AND solo < 5 | What is the average value of MRC Championships with more than 0.685 PCT., more than 1 for co-champions, and less than 5 solo? | CREATE TABLE table_name_31 (mrc_championships INTEGER, solo VARCHAR, pct VARCHAR, co_champions VARCHAR) |
SELECT Party, COUNT(*) FROM people GROUP BY Party ORDER BY Party | Show different parties of people along with the number of people in each party with a bar chart, and I want to order by the X in ascending please. | CREATE TABLE debate (
Debate_ID int,
Date text,
Venue text,
Num_of_Audience int
)
CREATE TABLE debate_people (
Debate_ID int,
Affirmative int,
Negative int,
If_Affirmative_Win bool
)
CREATE TABLE people (
People_ID int,
District text,
Name text,
Party text,
Age int
) |
SELECT MIN(first_elected) FROM table_2668420_17 | When was the earliest person elected? | CREATE TABLE table_2668420_17 (first_elected INTEGER) |
SELECT AVG(pct) FROM table_name_51 WHERE state_champions < 1 AND mrc_championships = 10 AND co_champions > 4 | What is the average Pct value when state champions is less than 1, MRC Championships is 10, and co-champions are greater than 4? | CREATE TABLE table_name_51 (pct INTEGER, co_champions VARCHAR, state_champions VARCHAR, mrc_championships VARCHAR) |
SELECT score FROM table_name_80 WHERE country = "united states" AND place = "t1" AND player = "david duval" | What is the score for the United States in place T1 for David Duval? | CREATE TABLE table_name_80 (
score VARCHAR,
player VARCHAR,
country VARCHAR,
place VARCHAR
) |
SELECT party FROM table_2668420_17 WHERE result = "Re-elected" AND district = "Virginia 12" | What party was re-elected to Virginia 12? | CREATE TABLE table_2668420_17 (party VARCHAR, result VARCHAR, district VARCHAR) |
SELECT name FROM table_name_46 WHERE street_address = "980 n. michigan avenue" | Street Address of 980 n. michigan avenue is what name? | CREATE TABLE table_name_46 (name VARCHAR, street_address VARCHAR) |
SELECT outputevents.charttime FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 55281) AND icustays.outtime IS NULL) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'urine out foley' AND d_items.linksto = 'outputevents') ORDER BY outputevents.charttime LIMIT 1 | what is patient 55281's first urine out foley output time on the current intensive care unit visit? | CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
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 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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto 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 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title 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 d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
) |
SELECT MAX(first_elected) FROM table_2668405_17 | What is the latest first elected? | CREATE TABLE table_2668405_17 (first_elected INTEGER) |
SELECT MIN(floors) FROM table_name_39 WHERE name = "900 north michigan" AND year < 1989 | Name of 900 north michigan, and a Year smaller than 1989 involves what lowest floors? | CREATE TABLE table_name_39 (floors INTEGER, name VARCHAR, year VARCHAR) |
SELECT prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "CIPROBASE" | what is the drug route for drug ciprobase? | 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
)
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
) |
SELECT COUNT(first_elected) FROM table_2668405_17 WHERE candidates = "Leven Powell (F) 63.8% Roger West (DR) 36.4%" | How many times were the candidates leven powell (f) 63.8% roger west (dr) 36.4%? | CREATE TABLE table_2668405_17 (first_elected VARCHAR, candidates VARCHAR) |
SELECT name FROM table_name_32 WHERE street_address = "401 n. wabash avenue" | Street Address of 401 n. wabash avenue involves what name? | CREATE TABLE table_name_32 (name VARCHAR, street_address VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Radical neck dissection, unilateral" AND lab."CATEGORY" = "Blood Gas" | give me the number of patients whose procedure long title is radical neck dissection, unilateral and lab test category is blood gas? | 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 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
) |
SELECT district FROM table_2668405_17 WHERE candidates = "Leven Powell (F) 63.8% Roger West (DR) 36.4%" | What is the district with the candidates leven powell (f) 63.8% roger west (dr) 36.4%? | CREATE TABLE table_2668405_17 (district VARCHAR, candidates VARCHAR) |
SELECT school_club_team FROM table_name_66 WHERE pick > 229 AND round < 12 AND position = "defensive back" | Pick larger than 229, and a Round smaller than 12, and a Position of defensive back is what school/club team? | CREATE TABLE table_name_66 (school_club_team VARCHAR, position VARCHAR, pick VARCHAR, round VARCHAR) |
SELECT result FROM table_name_20 WHERE score = "0-2" | What is the result when the score is 0-2? | CREATE TABLE table_name_20 (
result VARCHAR,
score VARCHAR
) |
SELECT district FROM table_2668405_17 WHERE incumbent = "John Nicholas" | What is the district with the incumbent john nicholas? | CREATE TABLE table_2668405_17 (district VARCHAR, incumbent VARCHAR) |
SELECT MIN(pick) FROM table_name_30 WHERE player = "mike o'quinn" AND round < 15 | Player of mike o'quinn, and a Round smaller than 15 had what lowest pick? | CREATE TABLE table_name_30 (pick INTEGER, player VARCHAR, round VARCHAR) |
SELECT COUNT(position) FROM table_10812403_4 WHERE pick__number = 30 | How many people were pick #30? | CREATE TABLE table_10812403_4 (
position VARCHAR,
pick__number VARCHAR
) |
SELECT COUNT(candidates) FROM table_2668405_17 WHERE district = "Virginia 6" | How many were in district virginia 6? | CREATE TABLE table_2668405_17 (candidates VARCHAR, district VARCHAR) |
SELECT SUM(pick) FROM table_name_24 WHERE round = 11 | Round of 11 had waht sum of pick? | CREATE TABLE table_name_24 (pick INTEGER, round VARCHAR) |
SELECT "Team" FROM table_2732 WHERE "Date" = 'February 4' | Who was the opponent in the game held on February 4? | CREATE TABLE table_2732 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT incumbent FROM table_2668416_18 WHERE district = "Virginia 8" | If the district is Virginia 8, who is the Incumbent? | CREATE TABLE table_2668416_18 (incumbent VARCHAR, district VARCHAR) |
SELECT division FROM table_name_26 WHERE position = "6th" | Which Division has a Position of 6th? | CREATE TABLE table_name_26 (division VARCHAR, position VARCHAR) |
SELECT "Type" FROM table_47146 WHERE "Incorporated in" = 'netherlands' AND "Principal activities" = 'airline' AND "Company" = 'transavia.com' | Which Type has an Incorporated in of netherlands, a Principal activities of airline, and a Company of transavia.com? | CREATE TABLE table_47146 (
"Company" text,
"Type" text,
"Principal activities" text,
"Incorporated in" text,
"Group's Equity Shareholding" text
) |
SELECT candidates FROM table_2668416_18 WHERE district = "Virginia 17" | If the district is Virginia 17, who are the candidates? | CREATE TABLE table_2668416_18 (candidates VARCHAR, district VARCHAR) |
SELECT SUM(season) FROM table_name_18 WHERE level = "tier 4" AND position = "11th" | Which Season has a Level of tier 4, and a Position of 11th? | CREATE TABLE table_name_18 (season INTEGER, level VARCHAR, position VARCHAR) |
SELECT COUNT(lane) FROM table_name_22 WHERE heat = 4 AND nationality = "hungary" | What lane number was Hungary and had a heat of 4? | CREATE TABLE table_name_22 (
lane VARCHAR,
heat VARCHAR,
nationality VARCHAR
) |
SELECT COUNT(party) FROM table_2668416_18 WHERE incumbent = "Abraham B. Venable" | In how many different parts was the incumbent Abraham B. Venable? | CREATE TABLE table_2668416_18 (party VARCHAR, incumbent VARCHAR) |
SELECT COUNT(season) FROM table_name_82 WHERE level = "tier 2" AND position = "1st" | Which Season has a Level of tier 2 and a Position of 1st? | CREATE TABLE table_name_82 (season VARCHAR, level VARCHAR, position VARCHAR) |
SELECT "Winning driver" FROM table_62007 WHERE "Circuit" = 'saint-raphaël' | What kind of the Winning driver has a Circuit of saint-rapha l? | CREATE TABLE table_62007 (
"Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Winning constructor" text,
"Report" text
) |
SELECT date FROM table_26686908_2 WHERE circuit = "Mount Panorama circuit" | What is the date for the mount panorama circuit? | CREATE TABLE table_26686908_2 (date VARCHAR, circuit VARCHAR) |
SELECT position FROM table_name_38 WHERE level = "tier 3" AND season < 1999 | Which Position has a Level of tier 3 and a Season smaller than 1999? | CREATE TABLE table_name_38 (position VARCHAR, level VARCHAR, season VARCHAR) |
SELECT centerfold_model FROM table_1566850_8 WHERE pictorials = "Marilyn Monroe" | Who was the centerfold model when a pictorial was done on marilyn monroe? | CREATE TABLE table_1566850_8 (
centerfold_model VARCHAR,
pictorials VARCHAR
) |
SELECT city___state FROM table_26686908_2 WHERE date = "7–10 October" | What was the location for the date 7–10 october? | CREATE TABLE table_26686908_2 (city___state VARCHAR, date VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.