answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT "Owner" FROM table_31720 WHERE "Branding" = 'fox fm' | Who is the owner with the branding fox fm? | CREATE TABLE table_31720 (
"Frequency" text,
"Call sign" text,
"Branding" text,
"Format" text,
"Owner" text
) |
SELECT date_founded__founder FROM table_242785_1 WHERE notes = "prima Italica:raised for aborted Caucasus war" | when notes are prima italica:raised for aborted caucasus war, when was that founded? | CREATE TABLE table_242785_1 (date_founded__founder VARCHAR, notes VARCHAR) |
SELECT directed_by FROM table_25923164_1 WHERE us_viewers__million_ = "12.88" | Who directed the episode that had 12.88 million viewers? | CREATE TABLE table_25923164_1 (directed_by VARCHAR, us_viewers__million_ VARCHAR) |
SELECT hometown FROM table_11677691_1 WHERE player = "Jeremy Hill" | What is Jeremy Hill's hometown? | CREATE TABLE table_11677691_1 (
hometown VARCHAR,
player VARCHAR
) |
SELECT notes FROM table_242785_1 WHERE main_legionary_base = "Svishtov , Bulgaria" | What are the notes for svishtov , bulgaria? | CREATE TABLE table_242785_1 (notes VARCHAR, main_legionary_base VARCHAR) |
SELECT original_air_date FROM table_25923164_1 WHERE written_by = "Amanda Segel" | What was the original air date of the episode written by amanda segel? | CREATE TABLE table_25923164_1 (original_air_date VARCHAR, written_by VARCHAR) |
SELECT "Opponent" FROM table_77439 WHERE "Week" < '17' AND "Date" = 'june 17, 2006' | What team was the opponent in a week earlier than 17 on June 17, 2006? | CREATE TABLE table_77439 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game site" text
) |
SELECT COUNT(team) FROM table_242813_2 WHERE overall_rank = 4 | Name the team ranked 4 | CREATE TABLE table_242813_2 (team VARCHAR, overall_rank VARCHAR) |
SELECT original_air_date FROM table_25923164_1 WHERE directed_by = "Gloria Muzio" | What was the original air date of the episode directed by gloria muzio? | CREATE TABLE table_25923164_1 (original_air_date VARCHAR, directed_by VARCHAR) |
SELECT MAX("For") FROM table_72671 WHERE "Difference" = '7' | Name the most for when difference is 7 | CREATE TABLE table_72671 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Won" real,
"Drawn" real,
"Lost" real,
"For" real,
"Against" real,
"Difference" text
) |
SELECT league FROM table_242813_2 WHERE strikeouts = 451 | Name the league for strikeouts being 451 | CREATE TABLE table_242813_2 (league VARCHAR, strikeouts VARCHAR) |
SELECT original_air_date FROM table_25923164_1 WHERE directed_by = "Frederick E. O. Toye" | What was the original air date of the episode directed by frederick e. o. toye? | CREATE TABLE table_25923164_1 (original_air_date VARCHAR, directed_by VARCHAR) |
SELECT result FROM table_name_37 WHERE work = "t.u.f.f. puppy" | What was the result of t.u.f.f. puppy? | CREATE TABLE table_name_37 (
result VARCHAR,
work VARCHAR
) |
SELECT MAX(overall_rank) FROM table_242813_2 WHERE league = "NL/UA" | Name the most overall rank for nl/ua league | CREATE TABLE table_242813_2 (overall_rank INTEGER, league VARCHAR) |
SELECT top_10 FROM table_2597876_2 WHERE team_s_ = "#10 Phil Parsons Racing" AND avg_finish = "22.9" | What is every value of Top 10 when team is #10 Phil Parsons Racing and average finish is 22.9? | CREATE TABLE table_2597876_2 (top_10 VARCHAR, team_s_ VARCHAR, avg_finish VARCHAR) |
SELECT engine FROM table_name_71 WHERE points > 1 AND year > 1981 | Which engine has more than 1 point after 1981? | CREATE TABLE table_name_71 (
engine VARCHAR,
points VARCHAR,
year VARCHAR
) |
SELECT COUNT(pitcher) FROM table_242813_2 WHERE overall_rank = 9 | Name the total number of pitcher for 9 overall rank | CREATE TABLE table_242813_2 (pitcher VARCHAR, overall_rank VARCHAR) |
SELECT year FROM table_2597876_2 WHERE avg_start = "27.2" | What is every year with average start of 27.2? | CREATE TABLE table_2597876_2 (year VARCHAR, avg_start VARCHAR) |
SELECT COUNT(score) FROM table_23284271_6 WHERE date = "December 27" | Name the score for december 27 | CREATE TABLE table_23284271_6 (
score VARCHAR,
date VARCHAR
) |
SELECT MAX(season) FROM table_242813_2 WHERE pitcher = "Old Hoss Radbourn" | Name the most season for old hoss radbourn | CREATE TABLE table_242813_2 (season INTEGER, pitcher VARCHAR) |
SELECT COUNT(top_10) FROM table_2597876_2 WHERE position = "5th" | How many values of top 10 for 5th position? | CREATE TABLE table_2597876_2 (top_10 VARCHAR, position VARCHAR) |
SELECT * FROM table_train_214 WHERE estimated_glomerular_filtration_rate_egfr < 60 | egfr as calculated by mdrd of < 60 ml / min | CREATE TABLE table_train_214 (
"id" int,
"gender" string,
"lead_ecg" bool,
"systolic_blood_pressure_sbp" int,
"qt_interval" bool,
"urine_dipstick_protein" int,
"stroke" bool,
"transient_ischemic_attack" bool,
"qtc" int,
"long_qt_syndrome" bool,
"cardiovascular_disease" bool,
"estimated_glomerular_filtration_rate_egfr" int,
"screening" bool,
"diastolic_blood_pressure_dbp" int,
"urine_protein" int,
"body_mass_index_bmi" float,
"myocardial_infarction" bool,
"creatinine_ratio" int,
"age" float,
"NOUSE" float
) |
SELECT MAX(week) FROM table_24278858_2 WHERE opponent = "Amsterdam Admirals" | What week did they play the amsterdam admirals? | CREATE TABLE table_24278858_2 (week INTEGER, opponent VARCHAR) |
SELECT top_5 FROM table_2597876_2 WHERE avg_start = "21.9" | What is every value for top 5 if average start is 21.9? | CREATE TABLE table_2597876_2 (top_5 VARCHAR, avg_start VARCHAR) |
WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id = p.OwnerUserId WHERE LOWER(Location) LIKE '%australia%' AND TagName = 'laravel' GROUP BY u.Id, TagName) SELECT * FROM USER_BY_TAG WHERE rank <= 1000 ORDER BY UpVotes DESC | top egypt users in tags. | CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
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 PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
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 PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description 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 Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE 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 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 ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
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 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 Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount 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 PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress 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
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
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
) |
SELECT date FROM table_24278858_2 WHERE week = 8 | What date did the team play on week 8? | CREATE TABLE table_24278858_2 (date VARCHAR, week VARCHAR) |
SELECT COUNT(winnings) FROM table_2597876_2 WHERE avg_start = "19.0" | How many values for winnings correspond to average start of 19.0? | CREATE TABLE table_2597876_2 (winnings VARCHAR, avg_start VARCHAR) |
SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8244)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [diastolic]' AND d_items.linksto = 'chartevents') AND DATETIME(chartevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') AND STRFTIME('%d', chartevents.charttime) = '16' ORDER BY chartevents.charttime LIMIT 1 | when was patient 8244's arterial bp [diastolic] measured for the first time on this month/16? | 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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto 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 cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE 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
) |
SELECT country_or_region FROM table_24285393_1 WHERE highest_point = "Northwestern peak of Rysy" | What country has the most height in the northwestern peak of rysy? | CREATE TABLE table_24285393_1 (country_or_region VARCHAR, highest_point VARCHAR) |
SELECT location FROM table_25987797_1 WHERE school = "Lucas" | What is the name of the school in Lucas ? | CREATE TABLE table_25987797_1 (location VARCHAR, school VARCHAR) |
SELECT registered_voters FROM table_27003223_4 WHERE d_r_spread = "+14.3%" | What is the percentage of registered voters in which the d-r spread is +14.3%? | CREATE TABLE table_27003223_4 (
registered_voters VARCHAR,
d_r_spread VARCHAR
) |
SELECT highest_point FROM table_24285393_1 WHERE country_or_region = "Latvia" | What are the highest point in latvia | CREATE TABLE table_24285393_1 (highest_point VARCHAR, country_or_region VARCHAR) |
SELECT MAX(pick__number) FROM table_26077092_7 WHERE player = "Andrew Quarless" | What was the pick number for Andrew Quarless? | CREATE TABLE table_26077092_7 (pick__number INTEGER, player VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.days_stay > "6" | find the number of patients whose hospital stay is more than 6 days. | 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 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT maximum_elevation FROM table_24285393_1 WHERE country_or_region = "Netherlands" | What is the maximum elevation in netherlands? | CREATE TABLE table_24285393_1 (maximum_elevation VARCHAR, country_or_region VARCHAR) |
SELECT COUNT(player) FROM table_26077092_7 WHERE college = "Purdue" | How many players are from Purdue? | CREATE TABLE table_26077092_7 (player VARCHAR, college VARCHAR) |
SELECT T1.personal_name, T1.family_name, T2.author_id FROM course_authors_and_tutors AS T1 JOIN courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1 | Find the personal name, family name, and author ID of the course author that teaches the most courses. | CREATE TABLE students (
student_id number,
date_of_registration time,
date_of_latest_logon time,
login_name text,
password text,
personal_name text,
middle_name text,
family_name text
)
CREATE TABLE student_tests_taken (
registration_id number,
date_test_taken time,
test_result text
)
CREATE TABLE course_authors_and_tutors (
author_id number,
author_tutor_atb text,
login_name text,
password text,
personal_name text,
middle_name text,
family_name text,
gender_mf text,
address_line_1 text
)
CREATE TABLE student_course_enrolment (
registration_id number,
student_id number,
course_id number,
date_of_enrolment time,
date_of_completion time
)
CREATE TABLE courses (
course_id number,
author_id number,
subject_id number,
course_name text,
course_description text
)
CREATE TABLE subjects (
subject_id number,
subject_name text
) |
SELECT country_or_region FROM table_24285393_1 WHERE highest_point = "Mont Sokbaro" | In what country is mont sokbaro a highest point | CREATE TABLE table_24285393_1 (country_or_region VARCHAR, highest_point VARCHAR) |
SELECT player FROM table_26130295_3 WHERE season_mvp < 1.0 AND second_team < 1.0 | who are all the players when season mvp is less than 1.0 and second team is less than 1.0 | CREATE TABLE table_26130295_3 (player VARCHAR, season_mvp VARCHAR, second_team VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "56" AND demographic.admityear < "2176" | what is the number of patients whose age is less than 56 and admission year is less than 2176? | 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
)
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
) |
SELECT COUNT(club) FROM table_2429942_2 WHERE third_place = "Drnovice" | how many times was third place held by drnovice? | CREATE TABLE table_2429942_2 (club VARCHAR, third_place VARCHAR) |
SELECT player FROM table_26130295_3 WHERE first_team = 1 AND number_of_selections = 2 | when number of selection is 2 and first team is 1 who are all the player | CREATE TABLE table_26130295_3 (player VARCHAR, first_team VARCHAR, number_of_selections VARCHAR) |
SELECT COUNT(ranking_la__2_) FROM table_19948664_2 WHERE world_ranking__1_ = "21st" | How many items were under ranking l.a.(2) when the world ranking was 21st? | CREATE TABLE table_19948664_2 (
ranking_la__2_ VARCHAR,
world_ranking__1_ VARCHAR
) |
SELECT top_goalscorer FROM table_2429942_2 WHERE season = "2010-11" | Who is the top goalscorer for the season 2010-11? | CREATE TABLE table_2429942_2 (top_goalscorer VARCHAR, season VARCHAR) |
SELECT MAX(final_four_mvp) FROM table_26130295_3 WHERE first_team = 1 | what would be final four mvp maximum when first team is 1 | CREATE TABLE table_26130295_3 (final_four_mvp INTEGER, first_team VARCHAR) |
SELECT SUM(laps) FROM table_name_53 WHERE time_retired = "gearbox" | How many laps were there when time/retired was gearbox? | CREATE TABLE table_name_53 (
laps INTEGER,
time_retired VARCHAR
) |
SELECT third_place FROM table_2429942_2 WHERE champions = "Baník Ostrava (1)" | Who had third place when the champions is baník ostrava (1)? | CREATE TABLE table_2429942_2 (third_place VARCHAR, champions VARCHAR) |
SELECT MAX(number_of_selections) FROM table_26130295_3 WHERE season_mvp > 1.0 | when season mvp is larger than 1.0 what is the maximum number of selection | CREATE TABLE table_26130295_3 (number_of_selections INTEGER, season_mvp INTEGER) |
SELECT "Capital" FROM table_42223 WHERE "Hanja" = '漢州' | What is the capital of the province with in Hanja? | CREATE TABLE table_42223 (
"Former kingdom" text,
"Province" text,
"Hangul" text,
"Hanja" text,
"Capital" text,
"Modern equivalent" text
) |
SELECT top_goalscorer FROM table_2429942_2 WHERE season = "2001-02" | Who was the top goalscorer for season 2001-02? | CREATE TABLE table_2429942_2 (top_goalscorer VARCHAR, season VARCHAR) |
SELECT COUNT(first_team) FROM table_26130295_3 WHERE player = "Dimitris Diamantidis" | who is first team when dimitris diamantidis play. | CREATE TABLE table_26130295_3 (first_team VARCHAR, player VARCHAR) |
SELECT "Romanised name" FROM table_25185 WHERE "Portfolio" = 'Secretary for Health, Welfare and Food' | What's the romanised name of the official who was Secretary for health, welfare and food? | CREATE TABLE table_25185 (
"Romanised name" text,
"Chinese name" text,
"age at appointment" real,
"Portfolio" text,
"Prior occupation" text
) |
SELECT runner_up FROM table_2429942_2 WHERE season = "2008-09" | Who is the runner-up for the season 2008-09? | CREATE TABLE table_2429942_2 (runner_up VARCHAR, season VARCHAR) |
SELECT MIN(term_limited) FROM table_26129220_2 WHERE residence = "Coshocton" | What is the earliest term limit for the senator who resides in Coshocton? | CREATE TABLE table_26129220_2 (term_limited INTEGER, residence VARCHAR) |
SELECT DISTINCT AUTHOR_1.authorid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'lorenzo bruzzone' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid | co-authors of lorenzo bruzzone | CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
) |
SELECT top_goalscorer FROM table_2429942_2 WHERE season = "1998-99" | Who is the top goalscorer for season 1998-99? | CREATE TABLE table_2429942_2 (top_goalscorer VARCHAR, season VARCHAR) |
SELECT party FROM table_26129220_2 WHERE district = 27 | What is the party for district 27? | CREATE TABLE table_26129220_2 (party VARCHAR, district VARCHAR) |
SELECT "Series" FROM table_9255 WHERE "Season" > '2008' AND "Format" = 'super leg final' AND "Conference" = 'conference v' | What series has a season after 2008, super leg final as the format, and conference v as the conference? | CREATE TABLE table_9255 (
"Season" real,
"Conference" text,
"Champion" text,
"Format" text,
"Series" text,
"Runner-Up" text
) |
SELECT written_by FROM table_2430014_6 WHERE directed_by = "John Trefor" | Name the written by for john trefor | CREATE TABLE table_2430014_6 (written_by VARCHAR, directed_by VARCHAR) |
SELECT party FROM table_26129220_2 WHERE residence = "Canton" | How many party classifications are there for the senator from Canton? | CREATE TABLE table_26129220_2 (party VARCHAR, residence VARCHAR) |
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.arrival_time = 1900 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.stops = 0 | i'd like to fly nonstop from ATLANTA to BALTIMORE and get there at 1900 | CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
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 airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
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 equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code 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 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 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 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 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 food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
) |
SELECT COUNT(directed_by) FROM table_2430014_8 WHERE uk_ratings__bbc2_rank_ = "2.27m (5)" | How many directors worked on the episode with 2.27m (5) is the ratings? | CREATE TABLE table_2430014_8 (directed_by VARCHAR, uk_ratings__bbc2_rank_ VARCHAR) |
SELECT party FROM table_26129220_2 WHERE senator = "David Goodman" | What is the party affiliation for Senator David Goodman? | CREATE TABLE table_26129220_2 (party VARCHAR, senator VARCHAR) |
SELECT AVG(demographic.age) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.age >= "76" | For how many patients aged 76 or below, was the death status left unspecified? | 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 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
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT title FROM table_2430014_8 WHERE episode_no = 2 | What is the title of episode 2? | CREATE TABLE table_2430014_8 (title VARCHAR, episode_no VARCHAR) |
SELECT MIN(term_limited) FROM table_26129220_2 WHERE senator = "Tom Niehaus" | What is the term limit for Senator Tom Niehaus? | CREATE TABLE table_26129220_2 (term_limited INTEGER, senator VARCHAR) |
SELECT SUM(long) FROM table_name_59 WHERE loss > 390 AND gain < 1 OFFSET 405 | When the player gained below 1,405 yards and lost over 390 yards, what's the sum of the long yards? | CREATE TABLE table_name_59 (
long INTEGER,
loss VARCHAR,
gain VARCHAR
) |
SELECT written_by FROM table_2430014_8 WHERE uk_ratings__bbc2_rank_ = "2.27m (5)" | Who wrote the episode what had the rating 2.27m (5)? | CREATE TABLE table_2430014_8 (written_by VARCHAR, uk_ratings__bbc2_rank_ VARCHAR) |
SELECT party FROM table_26129220_2 WHERE senator = "Mark Wagoner" | What is the party affiliation for senator mark Wagoner? | CREATE TABLE table_26129220_2 (party VARCHAR, senator VARCHAR) |
SELECT "Year" FROM table_61505 WHERE "Binibining Pilipinas International" = 'alma concepcion' | Which Year has a Binibining Pilipinas International of alma concepcion? | CREATE TABLE table_61505 (
"Year" real,
"Binibining Pilipinas-Universe" text,
"Binibining Pilipinas-World" text,
"Binibining Pilipinas International" text,
"Miss Maja Pilipinas" text,
"First runner-up" text,
"Second runner-up" text
) |
SELECT 2013 AS _profit__mil_usd__ FROM table_24307126_3 WHERE assets_2013__bil$_ = "11.2" | Name the 2013 profit for assets being 11.2 | CREATE TABLE table_24307126_3 (assets_2013__bil$_ VARCHAR) |
SELECT representative FROM table_26131768_4 WHERE residence = "Chagrin Falls" | If the residence is Chagrin falls, who is the representative? | CREATE TABLE table_26131768_4 (representative VARCHAR, residence VARCHAR) |
SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "POSTERIOR COMMUNICATING ANEURYSM/SDA" | what is the average age of patients who are admitted under emergency and diagnosed with primary disease communicating aneurysm/sda? | 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 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 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 assets_2013__bil$_ FROM table_24307126_3 WHERE rank_2013 = 1435 | Name the assets when the rank is 1435 | CREATE TABLE table_24307126_3 (assets_2013__bil$_ VARCHAR, rank_2013 VARCHAR) |
SELECT MIN(term_limited) FROM table_26131768_4 WHERE first_elected = "2003 (Appt.)" | If first elected on 2003 (appt.), when was the term limited? | CREATE TABLE table_26131768_4 (term_limited INTEGER, first_elected VARCHAR) |
SELECT venue FROM table_name_19 WHERE result = "eng by 4 wkts" | In what venues was the match with a final result of Eng by 4 wkts? | CREATE TABLE table_name_19 (
venue VARCHAR,
result VARCHAR
) |
SELECT COUNT(april_2013_cum_rank) FROM table_24307126_3 WHERE rank_2012 = 225 | Name the number of rank for april 2013 for 2012 ran kbeing 225 | CREATE TABLE table_24307126_3 (april_2013_cum_rank VARCHAR, rank_2012 VARCHAR) |
SELECT COUNT(residence) FROM table_26131768_4 WHERE representative = "Scott Oelslager" | How many times was Scott Oelslager a representative? | CREATE TABLE table_26131768_4 (residence VARCHAR, representative VARCHAR) |
SELECT "Manufacturer" FROM table_58848 WHERE "Year" > '1966' AND "Start" < '5' AND "Team" = 'wood' AND "Finish" = '35' | WHAT MANUFACTURER AFTER 1966 HAD A START SMALLER THAN 5, A WOOD TEAM AND FINISHED 35? | CREATE TABLE table_58848 (
"Year" real,
"Manufacturer" text,
"Start" real,
"Finish" real,
"Team" text
) |
SELECT COUNT(assets_2013__bil) AS $_ FROM table_24307126_3 WHERE base = "Australia" | Name the number of assets for australia | CREATE TABLE table_24307126_3 (assets_2013__bil VARCHAR, base VARCHAR) |
SELECT district FROM table_26131768_4 WHERE residence = "Dublin" | In which district is the residence Dublin? | CREATE TABLE table_26131768_4 (district VARCHAR, residence VARCHAR) |
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(MANAGER_ID) DESC | For all employees who have the letters D or S in their first name, draw a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by time, sort Y-axis from high to low order. | 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 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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
) |
SELECT position FROM table_24302700_6 WHERE event_6_atlas_stones = "6 (4 in 34.49s)" | What is the position of the player who got 6 (4 in 34.49s) in the 6 atlas stones event? | CREATE TABLE table_24302700_6 (position VARCHAR, event_6_atlas_stones VARCHAR) |
SELECT term_limited FROM table_26131768_4 WHERE representative = "Dave Hall" | If the representative is Dave Hall, when was the term limited? | CREATE TABLE table_26131768_4 (term_limited VARCHAR, representative VARCHAR) |
SELECT "Location Attendance" FROM table_48456 WHERE "Score" = '125-100' | What is the location and attendance of the game when the score is 125-100? | CREATE TABLE table_48456 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"Location Attendance" text,
"Record" text
) |
SELECT name FROM table_24302700_6 WHERE nationality = "United States" | Who are all the players from the united states? | CREATE TABLE table_24302700_6 (name VARCHAR, nationality VARCHAR) |
SELECT MAX(district) FROM table_26131768_4 WHERE representative = "Barbara Sears" | If the Representative is Barbara sears, what is the district number? | CREATE TABLE table_26131768_4 (district INTEGER, representative VARCHAR) |
SELECT tries_for FROM table_name_31 WHERE tries_against = "correct as of 2007-10-15" | tries against correct as of 2007-10-15 has what tries for? | CREATE TABLE table_name_31 (
tries_for VARCHAR,
tries_against VARCHAR
) |
SELECT COUNT(event_6_atlas_stones) FROM table_24302700_6 WHERE event_3_dead_lift = "2 (6 in 30.89s)" | What is the score in the 6 atlas stones event of the player who got 2 (6 in 30.89s) in the 3 dead lift event? | CREATE TABLE table_24302700_6 (event_6_atlas_stones VARCHAR, event_3_dead_lift VARCHAR) |
SELECT original_airdate FROM table_26139378_1 WHERE viewers__in_millions_ = "8.23" | What is the original airdate of the episode that had 8.23 million viewers? | CREATE TABLE table_26139378_1 (original_airdate VARCHAR, viewers__in_millions_ VARCHAR) |
SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN') | display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN. | CREATE TABLE employees (
employee_id VARCHAR,
first_name VARCHAR,
last_name VARCHAR,
job_id VARCHAR,
salary INTEGER
) |
SELECT position FROM table_24302700_6 WHERE event_6_atlas_stones = "5 (4 in 32.66s)" | What is the position of the player with a 5 (4 in 32.66s) in the 6 atlas stones event? | CREATE TABLE table_24302700_6 (position VARCHAR, event_6_atlas_stones VARCHAR) |
SELECT viewers__in_millions_ FROM table_26139378_1 WHERE episode__number = 16 | How many millions of viewers did Episode number 16 have? | CREATE TABLE table_26139378_1 (viewers__in_millions_ VARCHAR, episode__number VARCHAR) |
SELECT COUNT(reason_for_change) FROM table_2160008_4 WHERE date_successor_seated = "May 11, 1939" | Name the number of reason for change on may 11, 1939 | CREATE TABLE table_2160008_4 (
reason_for_change VARCHAR,
date_successor_seated VARCHAR
) |
SELECT event_2_truck_pull FROM table_24302700_6 WHERE event_4_fingals_fingers = "1 (5 in 33.84s)" | What is the score in the 2 truck pull of the player who got 1 (5 in 33.84s) in the 4 fingals fingers? | CREATE TABLE table_24302700_6 (event_2_truck_pull VARCHAR, event_4_fingals_fingers VARCHAR) |
SELECT vessel_type FROM table_26168687_5 WHERE vessel_operator = "Beluga Shipping" | Name the vessel type for beluga shipping | CREATE TABLE table_26168687_5 (vessel_type VARCHAR, vessel_operator VARCHAR) |
SELECT place_of_execution FROM table_2861364_1 WHERE executed_person = "Mazouz Ghaouti" | where was mazouz ghaouti executed? | CREATE TABLE table_2861364_1 (
place_of_execution VARCHAR,
executed_person VARCHAR
) |
SELECT MAX(cuts_made) FROM table_24330912_1 WHERE top_10s = 0 | When 0 is the top 10's what is the highest amount of cuts made? | CREATE TABLE table_24330912_1 (cuts_made INTEGER, top_10s VARCHAR) |
SELECT vessel_type FROM table_26168687_5 WHERE vessel_operator = "DOF Subsea" | Name the vessel type for dof subsea | CREATE TABLE table_26168687_5 (vessel_type VARCHAR, vessel_operator VARCHAR) |
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'pancreatitis - acute' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104') AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = '1000 ml flex cont : sodium chloride 0.9 % iv soln' AND STRFTIME('%y', medication.drugstarttime) <= '2104') AS t2 WHERE t1.diagnosistime < t2.drugstarttime AND t1.patienthealthsystemstayid = t2.patienthealthsystemstayid | until 2104, how many patients were prescribed with 1000 ml flex cont : sodium chloride 0.9 % iv soln within the same hospital visit after the diagnosis with pancreatitis - acute? | 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 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 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 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
)
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
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.