answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT high_assists FROM table_23285805_8 WHERE team = "Oklahoma City" | Who has the high assists when the team is Oklahoma City? | CREATE TABLE table_23285805_8 (
high_assists VARCHAR,
team VARCHAR
) |
SELECT COUNT(starts) FROM table_2622469_1 WHERE avg_finish = "17.9" | How many different starts had an average finish of 17.9? | CREATE TABLE table_2622469_1 (starts VARCHAR, avg_finish VARCHAR) |
SELECT MIN(term_ending) FROM table_name_54 WHERE position = "member" AND tenure_began = 2010 AND name = "xue hanqin" | Position of member, and a Tenure Began of 2010, and a Name of xue hanqin has what lowest term ending? | CREATE TABLE table_name_54 (term_ending INTEGER, name VARCHAR, position VARCHAR, tenure_began VARCHAR) |
SELECT "Language" FROM table_19170 WHERE "Genre" = 'Glam' | What language for the glam genre? | CREATE TABLE table_19170 (
"Song title" text,
"Artist" text,
"Language" text,
"Decade" text,
"Genre" text,
"Exportable" text,
"Family Friendly" text
) |
SELECT wins FROM table_2622469_1 WHERE year = 1983 | What were the wins of 1983? | CREATE TABLE table_2622469_1 (wins VARCHAR, year VARCHAR) |
SELECT name FROM table_name_85 WHERE term_ending < 2018 AND nationality = "new zealand" | Term Ending smaller than 2018, and a Nationality of new zealand what is the name? | CREATE TABLE table_name_85 (name VARCHAR, term_ending VARCHAR, nationality VARCHAR) |
SELECT procedures.icd9_code, prescriptions.drug FROM procedures INNER JOIN prescriptions ON procedures.hadm_id = prescriptions.hadm_id WHERE procedures.subject_id = "10317" | find out the procedure icd9 code and drug name of patient with patient id 10317. | 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
)
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 Season AS episode__number FROM table_2623498_4 WHERE written_by = "Mark Drop" | Which episodes in season 3 were written by Mark Drop? | CREATE TABLE table_2623498_4 (Season VARCHAR, written_by VARCHAR) |
SELECT episode FROM table_name_75 WHERE airdate__usa_ = "20 may 2005" | Which episode aired in the USA on 20 May 2005? | CREATE TABLE table_name_75 (episode VARCHAR, airdate__usa_ VARCHAR) |
SELECT * FROM table_train_91 WHERE rosen_modified_hachinski_ischemic_score <= 4 | rosen modified hachinski ischemic score less than or equal to 4 | CREATE TABLE table_train_91 (
"id" int,
"mini_mental_state_examination_mmse" int,
"stroke" bool,
"rosen_modified_hachinski_ischemic_score" int,
"NOUSE" float
) |
SELECT 54 AS _holes FROM table_262383_1 WHERE runner_s__up = "Jimmy Demaret" | what is the number where the player was jimmy demaret | CREATE TABLE table_262383_1 (runner_s__up VARCHAR) |
SELECT COUNT(episode) FROM table_name_18 WHERE airdate__canada_ = "22 october 2004" | What is the total number of episodes aired in Canada on 22 October 2004? | CREATE TABLE table_name_18 (episode VARCHAR, airdate__canada_ VARCHAR) |
SELECT MAX("Interceptions") FROM table_22985 | What is the highest number of interceptions? | CREATE TABLE table_22985 (
"Name" text,
"Completions" real,
"Attempts" real,
"Completion %" text,
"Yards" real,
"Touchdowns" real,
"Interceptions" real,
"QB Rating" text
) |
SELECT margin FROM table_262383_1 WHERE runner_s__up = "Mike Turnesa" | what is the space where the next one was mike turnesa | CREATE TABLE table_262383_1 (margin VARCHAR, runner_s__up VARCHAR) |
SELECT cbs_airdate FROM table_name_26 WHERE episode < 70 AND airdate__usa_ = "1 april 2005" | What is the CBS airdate of the episode with a number under 70 with a USA airdate of 1 April 2005? | CREATE TABLE table_name_26 (cbs_airdate VARCHAR, episode VARCHAR, airdate__usa_ VARCHAR) |
SELECT t.TagName, YEAR(p.CreationDate), MONTH(p.CreationDate), COUNT(t.TagName) AS d FROM Tags AS t INNER JOIN PostTags AS pt ON t.Id = pt.TagId INNER JOIN Posts AS P ON p.Id = pt.PostId WHERE t.TagName = '##TagNam##' AND NOT p.ClosedDate IS NULL GROUP BY YEAR(p.CreationDate), MONTH(p.CreationDate), t.TagName ORDER BY YEAR(p.CreationDate), MONTH(p.CreationDate) | Asked Questions per month for a given Tag. | CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId 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 ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
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 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 Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId 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 PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
) |
SELECT margin FROM table_262383_1 WHERE runner_s__up = "Skee Riegel" | what is the space where the next winner is skee riegel | CREATE TABLE table_262383_1 (margin VARCHAR, runner_s__up VARCHAR) |
SELECT song_title FROM table_name_26 WHERE genre = "glam" | what song is a genre of glam | CREATE TABLE table_name_26 (song_title VARCHAR, genre VARCHAR) |
SELECT venue FROM table_name_62 WHERE goal = 4 | Which venue has a Goal of 4? | CREATE TABLE table_name_62 (
venue VARCHAR,
goal VARCHAR
) |
SELECT old_english_day_name FROM table_2624098_1 WHERE modern_english_day_name = "Saturday" | what is the old English name of Saturday? | CREATE TABLE table_2624098_1 (old_english_day_name VARCHAR, modern_english_day_name VARCHAR) |
SELECT score FROM table_name_38 WHERE team = "seattle" | Which score is the Seattle team? | CREATE TABLE table_name_38 (score VARCHAR, team VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "S/P FALL" AND demographic.dob_year < "2085" | count the number of patients whose primary disease is s/p fall and year of birth is less than 2085? | 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 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
) |
SELECT COUNT(old_english_day_name) FROM table_2624098_1 WHERE glossed_from_latin_day_name = "Dies Iovis" | how mant different day names in old English were coined from the Latin day name "dies iovis"? | CREATE TABLE table_2624098_1 (old_english_day_name VARCHAR, glossed_from_latin_day_name VARCHAR) |
SELECT COUNT(number) FROM table_name_57 WHERE position = "f" AND hometown = "dallas, texas" | What is the number with the f position in Dallas, Texas? | CREATE TABLE table_name_57 (number VARCHAR, position VARCHAR, hometown VARCHAR) |
SELECT AVG("Score") FROM table_76810 WHERE "Place" = 't5' AND "Country" = 'united states' | What is the average score for the player who is T5 in the United States? | CREATE TABLE table_76810 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) |
SELECT COUNT(english_day_name_meaning) FROM table_2624098_1 WHERE modern_english_day_name = "Wednesday" | how many different meanings does Wednesday have? | CREATE TABLE table_2624098_1 (english_day_name_meaning VARCHAR, modern_english_day_name VARCHAR) |
SELECT competition FROM table_name_94 WHERE venue = "bangkok" | Which competition took place in Bangkok? | CREATE TABLE table_name_94 (competition VARCHAR, venue VARCHAR) |
SELECT MIN("Rank") FROM table_15703 WHERE "Nationality" = 'poland' AND "Time" > '55.34' | What is the lowest rank with poland as the nationality and a time greater than 55.34? | CREATE TABLE table_15703 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" real
) |
SELECT english_day_name_meaning FROM table_2624098_1 WHERE old_english_day_name = "Sæturnesdæg" | what is the English meaning of the old English name "sæturnesdæg"? | CREATE TABLE table_2624098_1 (english_day_name_meaning VARCHAR, old_english_day_name VARCHAR) |
SELECT score FROM table_name_96 WHERE venue = "kathmandu" | What was the score in Kathmandu? | CREATE TABLE table_name_96 (score VARCHAR, venue VARCHAR) |
SELECT MIN("Sd") FROM table_3814 WHERE "Player" = 'Kaia Kanepi' | What's Kaia Kanepi's Sd? | CREATE TABLE table_3814 (
"Sd" real,
"Rk" real,
"Player" text,
"Points" real,
"Points defending" text,
"Points won" real,
"New points" real,
"Status" text
) |
SELECT latin_day_name_meaning FROM table_2624098_1 WHERE glossed_from_latin_day_name = "Dies Saturni" | what is the meaning of the latin day name "dies saturni"? | CREATE TABLE table_2624098_1 (latin_day_name_meaning VARCHAR, glossed_from_latin_day_name VARCHAR) |
SELECT venue FROM table_name_68 WHERE date = "august 29, 1980" | Where was the location for the August 29, 1980 game? | CREATE TABLE table_name_68 (venue VARCHAR, date VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND prescriptions.route = "SC" | how many patients whose ethnicity is black/haitian and drug route is sc? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE 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 opponents_conference FROM table_26240481_1 WHERE result = "L, 62-10" | Which opponents conference has the result L, 62-10? | CREATE TABLE table_26240481_1 (opponents_conference VARCHAR, result VARCHAR) |
SELECT notes FROM table_name_31 WHERE position = "2nd" AND year < 1986 | What is the notes distance for 2nd position earlier than 1986? | CREATE TABLE table_name_31 (notes VARCHAR, position VARCHAR, year VARCHAR) |
SELECT marketing_region_descriptrion FROM marketing_regions WHERE marketing_region_name = "China" | What is the description of the marketing region China? | CREATE TABLE addresses (
address_id text,
line_1 text,
line_2 text,
city_town text,
state_county text,
other_details text
)
CREATE TABLE performers_in_bookings (
order_id number,
performer_id number
)
CREATE TABLE bookings (
booking_id number,
customer_id number,
workshop_group_id text,
status_code text,
store_id number,
order_date time,
planned_delivery_date time,
actual_delivery_date time,
other_order_details text
)
CREATE TABLE customer_orders (
order_id number,
customer_id number,
store_id number,
order_date time,
planned_delivery_date time,
actual_delivery_date time,
other_order_details text
)
CREATE TABLE invoice_items (
invoice_item_id number,
invoice_id number,
order_id number,
order_item_id number,
product_id number,
order_quantity number,
other_item_details text
)
CREATE TABLE customers (
customer_id text,
address_id number,
customer_name text,
customer_phone text,
customer_email_address text,
other_details text
)
CREATE TABLE drama_workshop_groups (
workshop_group_id number,
address_id number,
currency_code text,
marketing_region_code text,
store_name text,
store_phone text,
store_email_address text,
other_details text
)
CREATE TABLE marketing_regions (
marketing_region_code text,
marketing_region_name text,
marketing_region_descriptrion text,
other_details text
)
CREATE TABLE bookings_services (
order_id number,
product_id number
)
CREATE TABLE ref_service_types (
service_type_code text,
parent_service_type_code text,
service_type_description text
)
CREATE TABLE invoices (
invoice_id number,
order_id number,
payment_method_code text,
product_id number,
order_quantity text,
other_item_details text,
order_item_id number
)
CREATE TABLE ref_payment_methods (
payment_method_code text,
payment_method_description text
)
CREATE TABLE services (
service_id number,
service_type_code text,
workshop_group_id number,
product_description text,
product_name text,
product_price number,
other_product_service_details text
)
CREATE TABLE products (
product_id text,
product_name text,
product_price number,
product_description text,
other_product_service_details text
)
CREATE TABLE order_items (
order_item_id number,
order_id number,
product_id number,
order_quantity text,
other_item_details text
)
CREATE TABLE performers (
performer_id number,
address_id number,
customer_name text,
customer_phone text,
customer_email_address text,
other_details text
)
CREATE TABLE stores (
store_id text,
address_id number,
marketing_region_code text,
store_name text,
store_phone text,
store_email_address text,
other_details text
)
CREATE TABLE clients (
client_id number,
address_id number,
customer_email_address text,
customer_name text,
customer_phone text,
other_details text
) |
SELECT opponents_head_coach FROM table_26240481_1 WHERE result = "L, 56-6" | Who was the opponents head coach with the result L, 56-6? | CREATE TABLE table_26240481_1 (opponents_head_coach VARCHAR, result VARCHAR) |
SELECT venue FROM table_name_24 WHERE competition = "olympic games" AND position = "dnq" | Which venue hosts the Olympic Games for DNQ position? | CREATE TABLE table_name_24 (venue VARCHAR, competition VARCHAR, position VARCHAR) |
SELECT ACC_Road, COUNT(ACC_Road) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC | Give me the comparison about the amount of ACC_Road over the ACC_Road , and group by attribute ACC_Road, display x-axis in desc order. | CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
) |
SELECT charleston_southerns_head_coach FROM table_26240481_1 WHERE result = "L, 56-6" | Who is Charleston Southerns head coach where the result is L, 56-6?- | CREATE TABLE table_26240481_1 (charleston_southerns_head_coach VARCHAR, result VARCHAR) |
SELECT year FROM table_name_82 WHERE notes = "1.83m" | In what year is the notes distance 1.83m? | CREATE TABLE table_name_82 (year VARCHAR, notes VARCHAR) |
SELECT EMAIL, SALARY FROM employees | Plot salary by grouped by email as a bar graph | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,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)
) |
SELECT fbs_opponent FROM table_26240481_1 WHERE result = "L, 62-3" | Who played FBS where the result was L, 62-3? | CREATE TABLE table_26240481_1 (fbs_opponent VARCHAR, result VARCHAR) |
SELECT race_number FROM table_name_95 WHERE driver = "bob wollek" | what is the race number of bob wollek | CREATE TABLE table_name_95 (race_number VARCHAR, driver VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.discharge_location = "LEFT AGAINST MEDICAL ADVI" | get me the number of female patients who left against medical advice. | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT MAX(founded) FROM table_262476_3 WHERE institution = "Alfred University" | When was alfred university founded? | CREATE TABLE table_262476_3 (founded INTEGER, institution VARCHAR) |
SELECT country FROM table_name_10 WHERE driver = "john nielsen" | what country is john nielsen from | CREATE TABLE table_name_10 (country VARCHAR, driver VARCHAR) |
SELECT "Game" FROM table_6061 WHERE "April" = '6' | Which game took place April 6? | CREATE TABLE table_6061 (
"Game" real,
"April" real,
"Opponent" text,
"Score" text,
"Record" text
) |
SELECT location FROM table_262476_1 WHERE institution = "Bethany College" | Name where bethany college is | CREATE TABLE table_262476_1 (location VARCHAR, institution VARCHAR) |
SELECT model FROM table_name_59 WHERE propulsion = "hybrid" | Which Model has hybrid propulsion? | CREATE TABLE table_name_59 (model VARCHAR, propulsion VARCHAR) |
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-106613')) AND lab.labname = 'tv' AND STRFTIME('%y-%m', lab.labresulttime) = '2103-04' ORDER BY lab.labresulttime LIMIT 1 | when did patient 027-106613 first take a tv lab test in 04/2103? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime 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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
) |
SELECT location FROM table_262476_1 WHERE nickname = "Golden Tornadoes" | Name the location for golden tornadoes | CREATE TABLE table_262476_1 (location VARCHAR, nickname VARCHAR) |
SELECT propulsion FROM table_name_68 WHERE order_year = "2003-2004" AND manufacturer = "neoplan usa" | What is the Propulsion for the model offered in 2003-2004 by neoplan usa? | CREATE TABLE table_name_68 (propulsion VARCHAR, order_year VARCHAR, manufacturer VARCHAR) |
SELECT home__1st_leg_ FROM table_name_70 WHERE aggregate = "3-4" | Which team played their first leg at home with an aggregate score of 3-4? | CREATE TABLE table_name_70 (
home__1st_leg_ VARCHAR,
aggregate VARCHAR
) |
SELECT COUNT(location) FROM table_262476_1 WHERE institution = "Geneva College" | Name the number of locations for geneva college | CREATE TABLE table_262476_1 (location VARCHAR, institution VARCHAR) |
SELECT length__ft_ FROM table_name_67 WHERE manufacturer = "nfi" AND model = "d40lf" AND order_year = "2008" | What is the Length (ft.) for a 2008 nfi d40lf? | CREATE TABLE table_name_67 (length__ft_ VARCHAR, order_year VARCHAR, manufacturer VARCHAR, model VARCHAR) |
SELECT "Written by" FROM table_25525 WHERE "No. in series" = '129' | When 129 is the number in the series who is the writer? | CREATE TABLE table_25525 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
) |
SELECT enrollment FROM table_262476_1 WHERE nickname = "Tomcats" | Name the enrollment for tomcats | CREATE TABLE table_262476_1 (enrollment VARCHAR, nickname VARCHAR) |
SELECT SUM(founded) FROM table_name_68 WHERE club = "tri-city storm" AND titles > 1 | Which Founded has a Club of tri-city storm and a Titles larger than 1? | CREATE TABLE table_name_68 (founded INTEGER, club VARCHAR, titles VARCHAR) |
SELECT category FROM table_name_69 WHERE tournament = "rodez, france" | What is the Category of the Rodez, France Tournament? | CREATE TABLE table_name_69 (
category VARCHAR,
tournament VARCHAR
) |
SELECT MIN(season_4) FROM table_26240046_1 WHERE character = "Mrs. Jennifer Knight" | How many season 4 appearances are there by Mrs. Jennifer Knight? | CREATE TABLE table_26240046_1 (season_4 INTEGER, character VARCHAR) |
SELECT founded FROM table_name_97 WHERE club = "no coast derby girls" | Which Founded that has a Club of no coast derby girls? | CREATE TABLE table_name_97 (founded VARCHAR, club VARCHAR) |
SELECT episode FROM table_24725951_1 WHERE celebrities = "Nick Hewer and Saira Khan" | Which episode had celebrities Nick Hewer and Saira Khan in them? | CREATE TABLE table_24725951_1 (
episode VARCHAR,
celebrities VARCHAR
) |
SELECT MAX(season_3) FROM table_26240046_1 WHERE played_by = "Morgan the Dog" | How many season 3 appearances by Morgan the Dog? | CREATE TABLE table_26240046_1 (season_3 INTEGER, played_by VARCHAR) |
SELECT AVG(founded) FROM table_name_14 WHERE league = "women's flat track derby association" AND club = "omaha rollergirls" | Which Founded has a League of women's flat track derby association, and a Club of omaha rollergirls? | CREATE TABLE table_name_14 (founded INTEGER, league VARCHAR, club VARCHAR) |
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(SALARY) DESC | For those employees who did not have any job in the past, give me the comparison about the sum of salary over the hire_date bin hire_date by time, could you sort by the Y in desc? | 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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,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 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 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 first_appearance FROM table_26240046_1 WHERE season_4 = 7 | What episode was the first appearance of the character who appears 7 times in season 4? | CREATE TABLE table_26240046_1 (first_appearance VARCHAR, season_4 VARCHAR) |
SELECT date FROM table_name_2 WHERE competition = "international friendly" | On what date was there an International Friendly competition? | CREATE TABLE table_name_2 (date VARCHAR, competition VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Trnspl status-bne marrow" AND prescriptions.route = "IM" | provide the number of patients whose diagnoses short title is trnspl status-bne marrow and drug route is im? | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid 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 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 MIN(season_3) FROM table_26240046_1 WHERE played_by = "Stefan van Ray" | How many season 3 appearances by the character played by Stefan Van Ray? | CREATE TABLE table_26240046_1 (season_3 INTEGER, played_by VARCHAR) |
SELECT score FROM table_name_94 WHERE competition = "bernardo o'higgins cup" AND date = "may 7, 1961" | What was the score at Bernardo O'Higgins Cup on May 7, 1961? | CREATE TABLE table_name_94 (score VARCHAR, competition VARCHAR, date VARCHAR) |
SELECT SUM(rating) FROM table_name_92 WHERE rank__timeslot_ < 3 AND rank__night_ < 8 | what is the rating when the rank (timeslot) is less than 3 and the rank (night) is less than 8? | CREATE TABLE table_name_92 (
rating INTEGER,
rank__timeslot_ VARCHAR,
rank__night_ VARCHAR
) |
SELECT first_appearance FROM table_26240046_1 WHERE played_by = "Obdul Reid" | What is the first appearance of the character played by Obdul Reid? | CREATE TABLE table_26240046_1 (first_appearance VARCHAR, played_by VARCHAR) |
SELECT AVG(grid) FROM table_name_7 WHERE time = "+22.505" AND laps > 23 | What grid has an average time of +22.505 and laps larger than 23? | CREATE TABLE table_name_7 (grid INTEGER, time VARCHAR, laps VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2139" AND lab.label = "Bilirubin, Indirect" | provide the number of patients whose admission year is less than 2139 and lab test name is bilirubin, indirect? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid 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 primary_conference_when_joining_the_csfl FROM table_262501_1 WHERE founded = 1894 | What was the primary conference when joining the cslf for the institution that was founded in 1894 | CREATE TABLE table_262501_1 (primary_conference_when_joining_the_csfl VARCHAR, founded VARCHAR) |
SELECT MAX(grid) FROM table_name_8 WHERE time = "retirement" AND bike = "suzuki gsx-r1000 k7" | Which suzuki gsx-r1000 k7 has the highest time of retirement? | CREATE TABLE table_name_8 (grid INTEGER, time VARCHAR, bike VARCHAR) |
SELECT SUM(points) FROM table_name_70 WHERE entrant = "alfa romeo spa" AND year < 1951 | What is the total points that an 1951 Entrant alfa romeo spa have? | CREATE TABLE table_name_70 (
points INTEGER,
entrant VARCHAR,
year VARCHAR
) |
SELECT primary_conference_when_joining_the_csfl FROM table_262501_1 WHERE joined = "2004-05" | what was the primary conference when joining the csfl for the institution that joined in 2004-05? | CREATE TABLE table_262501_1 (primary_conference_when_joining_the_csfl VARCHAR, joined VARCHAR) |
SELECT AVG(laps) FROM table_name_39 WHERE bike = "suzuki gsx-r1000 k7" AND grid = 6 | What is the average lap for suzuki gsx-r1000 k7 and at grid 6? | CREATE TABLE table_name_39 (laps INTEGER, bike VARCHAR, grid VARCHAR) |
SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review) | Find the names of users who did not leave any review. | CREATE TABLE review (
name VARCHAR,
u_id VARCHAR
)
CREATE TABLE useracct (
name VARCHAR,
u_id VARCHAR
) |
SELECT COUNT(result) FROM table_26250151_1 WHERE theme = "Inspirational" | How may results had the theme inspirational? | CREATE TABLE table_26250151_1 (result VARCHAR, theme VARCHAR) |
SELECT rider FROM table_name_29 WHERE laps = 23 AND grid < 18 AND time = "+44.333" | Which rider has a lap of 23, grid smaller than 18, and time +44.333? | CREATE TABLE table_name_29 (rider VARCHAR, time VARCHAR, laps VARCHAR, grid VARCHAR) |
SELECT COUNT(goals_scored) FROM table_name_15 WHERE draws > 3 AND loses > 1 AND points < 26 | What is the total number of goals scored of the club with more than 3 draws, more than 1 loses, and less than 26 points? | CREATE TABLE table_name_15 (
goals_scored VARCHAR,
points VARCHAR,
draws VARCHAR,
loses VARCHAR
) |
SELECT episode FROM table_26250151_1 WHERE original_recording_artist = "LaVern Baker" | Which episode had Lavern Baker? | CREATE TABLE table_26250151_1 (episode VARCHAR, original_recording_artist VARCHAR) |
SELECT MIN(grid) FROM table_name_85 WHERE laps > 23 | what is the lowest grid with laps larger than 23? | CREATE TABLE table_name_85 (grid INTEGER, laps INTEGER) |
SELECT "Title" FROM table_23032 WHERE "U.S. viewers (millions)" = '18.29' | Name the title for us viewers being 18.29 | CREATE TABLE table_23032 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) |
SELECT order__number FROM table_26250151_1 WHERE original_recording_artist = "Erma Franklin" | What was the order # or Erma Franklin? | CREATE TABLE table_26250151_1 (order__number VARCHAR, original_recording_artist VARCHAR) |
SELECT location FROM table_name_58 WHERE opponent = "iowa state" | Where did the Bruins play Iowa State? | CREATE TABLE table_name_58 (location VARCHAR, opponent VARCHAR) |
SELECT 2006 FROM table_name_29 WHERE 2011 = "0-0" | What 2006 has 0-0 as the 2011? | CREATE TABLE table_name_29 (
Id VARCHAR
) |
SELECT theme FROM table_26250145_1 WHERE original_artist = "Alicia Keys" | What is the theme for the original artist Alicia Keys? | CREATE TABLE table_26250145_1 (theme VARCHAR, original_artist VARCHAR) |
SELECT conf FROM table_name_24 WHERE date = "ncaa tournament" | What Conference was during the NCAA Tournament? | CREATE TABLE table_name_24 (conf VARCHAR, date VARCHAR) |
SELECT competition FROM table_name_33 WHERE score = "0-1" AND opponents = "pkns fc" | Which Competition has a Score of 0-1, and Opponents of pkns fc? | CREATE TABLE table_name_33 (
competition VARCHAR,
score VARCHAR,
opponents VARCHAR
) |
SELECT COUNT(result) FROM table_26250145_1 WHERE original_artist = "Alicia Keys" | How many times is the original artist Alicia keys? | CREATE TABLE table_26250145_1 (result VARCHAR, original_artist VARCHAR) |
SELECT COUNT(avg) FROM table_name_34 WHERE yards > 265 AND car > 105 | What is the amount of Avg that has Yards more 265 and a Car more 105? | CREATE TABLE table_name_34 (avg VARCHAR, yards VARCHAR, car VARCHAR) |
SELECT MIN(extra_points) FROM table_25517718_3 WHERE position = "Left halfback" | What is the smallest number of extra points for a left halfback? | CREATE TABLE table_25517718_3 (
extra_points INTEGER,
position VARCHAR
) |
SELECT order__number FROM table_26250145_1 WHERE original_artist = "Sarah McLachlan" | What is the order # for the original artist sarah mclachlan? | CREATE TABLE table_26250145_1 (order__number VARCHAR, original_artist VARCHAR) |
SELECT player FROM table_name_83 WHERE rank = 3 | Which player is ranked number 3? | CREATE TABLE table_name_83 (player VARCHAR, rank VARCHAR) |
SELECT venue FROM table_name_27 WHERE away_team = "north melbourne" | What venue featured north melbourne as the away side? | CREATE TABLE table_name_27 (
venue VARCHAR,
away_team VARCHAR
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.