answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT T2.emp_fname, T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num = T2.emp_num ORDER BY T2.emp_fname | Find the first names and offices of all professors sorted by alphabetical order of their first name. | CREATE TABLE student (
stu_num number,
stu_lname text,
stu_fname text,
stu_init text,
stu_dob time,
stu_hrs number,
stu_class text,
stu_gpa number,
stu_transfer number,
dept_code text,
stu_phone text,
prof_num number
)
CREATE TABLE enroll (
class_code text,
stu_num number,
enroll_grade text
)
CREATE TABLE employee (
emp_num number,
emp_lname text,
emp_fname text,
emp_initial text,
emp_jobcode text,
emp_hiredate time,
emp_dob time
)
CREATE TABLE department (
dept_code text,
dept_name text,
school_code text,
emp_num number,
dept_address text,
dept_extension text
)
CREATE TABLE class (
class_code text,
crs_code text,
class_section text,
class_time text,
class_room text,
prof_num number
)
CREATE TABLE course (
crs_code text,
dept_code text,
crs_description text,
crs_credit number
)
CREATE TABLE professor (
emp_num number,
dept_code text,
prof_office text,
prof_extension text,
prof_high_degree text
) |
SELECT score FROM table_23248940_9 WHERE game = 50 | How did the game number 50 end? | CREATE TABLE table_23248940_9 (score VARCHAR, game VARCHAR) |
SELECT COUNT(age) FROM table_22265261_1 WHERE sp = "200/1" | How old was the horse when the SP was 200/1? | CREATE TABLE table_22265261_1 (age VARCHAR, sp VARCHAR) |
SELECT MAX("Population") FROM table_11750 WHERE "Town/City" = 'ivaiporã, pr' | What is Ivaipor , pr's biggest population? | CREATE TABLE table_11750 (
"Town/City" text,
"Population" real,
"Operator" text,
"First year" real,
"Duration" text
) |
SELECT COUNT(high_assists) FROM table_23248940_9 WHERE date = "February 24" | How many different high assists results are there for the game played on February 24? | CREATE TABLE table_23248940_9 (high_assists VARCHAR, date VARCHAR) |
SELECT distance FROM table_22265261_1 WHERE position = "11th" | What was the distance for the 11th position? | CREATE TABLE table_22265261_1 (distance VARCHAR, position VARCHAR) |
SELECT "flag bearer" FROM table_204_986 ORDER BY "event year" LIMIT 1 | who was the first samoan flag bearer at the olympic games ? | CREATE TABLE table_204_986 (
id number,
"#" number,
"event year" number,
"season" text,
"flag bearer" text
) |
SELECT high_assists FROM table_23248940_9 WHERE date = "February 6" | Who did the most high assists during the game played on February 6? | CREATE TABLE table_23248940_9 (high_assists VARCHAR, date VARCHAR) |
SELECT jockey FROM table_22265261_1 WHERE position = "7th" | Who was the jockey in 7th position? | CREATE TABLE table_22265261_1 (jockey VARCHAR, position VARCHAR) |
SELECT SUM(gold) FROM table_name_62 WHERE rank < 3 AND silver < 1 | What shows for gold when the rank is less than 3, and silver less than 1? | CREATE TABLE table_name_62 (
gold INTEGER,
rank VARCHAR,
silver VARCHAR
) |
SELECT location_attendance FROM table_23248940_9 WHERE game = 55 | Where was game number 55 played? | CREATE TABLE table_23248940_9 (location_attendance VARCHAR, game VARCHAR) |
SELECT distance FROM table_22265261_1 WHERE handicap__st_lb_ = "11-2" | What was the distance when the handicap was 11-2? | CREATE TABLE table_22265261_1 (distance VARCHAR, handicap__st_lb_ VARCHAR) |
SELECT COUNT(silver) FROM table_name_91 WHERE gold < 0 | What is the number in total of silver with a gold smaller than 0? | CREATE TABLE table_name_91 (
silver VARCHAR,
gold INTEGER
) |
SELECT date FROM table_23248967_10 WHERE game = 78 | What date was game 78 played on? | CREATE TABLE table_23248967_10 (date VARCHAR, game VARCHAR) |
SELECT title FROM table_2226817_7 WHERE production_code = "6.18" | If the production code is 6.18, what was the episode title? | CREATE TABLE table_2226817_7 (title VARCHAR, production_code VARCHAR) |
SELECT "Korean dialect" FROM table_41890 WHERE "Capital" = 'daegu' | What is the Korean dialect in the daegu capital? | CREATE TABLE table_41890 (
"RR Romaja" text,
"M\u2013R Romaja" text,
"Hangul" text,
"Hanja" text,
"Name origin" text,
"Capital" text,
"Region" text,
"Korean dialect" text,
"Post-1896 Provinces" text
) |
SELECT score FROM table_23248967_10 WHERE date = "April 9" | What is the final score of the game on April 9? | CREATE TABLE table_23248967_10 (score VARCHAR, date VARCHAR) |
SELECT directed_by FROM table_2226817_7 WHERE original_air_date = "January 19, 1992" | If the original air date January 19, 1992, who was the episode directed by? | CREATE TABLE table_2226817_7 (directed_by VARCHAR, original_air_date VARCHAR) |
SELECT race_time FROM table_1771753_3 WHERE team = "Chip Ganassi Racing" AND laps = "228" | When 228 is the lap and chip ganassi racing is the team what is the race time? | CREATE TABLE table_1771753_3 (
race_time VARCHAR,
team VARCHAR,
laps VARCHAR
) |
SELECT high_points FROM table_23248967_10 WHERE game = 78 | Who scored the high points in game 78? | CREATE TABLE table_23248967_10 (high_points VARCHAR, game VARCHAR) |
SELECT MIN(no_in_season) FROM table_2226817_6 WHERE no_in_series = 84 | What's the season number of the episode with series number 84? | CREATE TABLE table_2226817_6 (no_in_season INTEGER, no_in_series VARCHAR) |
SELECT "Away team score" FROM table_55560 WHERE "Home team" = 'collingwood' | In the game where Collingwood is the home team what is the score of the away team? | CREATE TABLE table_55560 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT score FROM table_23249053_8 WHERE game > 29.0 | What is the score when the game is bigger than 29.0? | CREATE TABLE table_23249053_8 (score VARCHAR, game INTEGER) |
SELECT COUNT(no_in_season) FROM table_2226817_6 WHERE written_by = "Art Everett" | How many season numbers are there for the episodes written by Art Everett? | CREATE TABLE table_2226817_6 (no_in_season VARCHAR, written_by VARCHAR) |
SELECT "Rank" FROM table_8061 WHERE "Venue" = 'bellerive oval , hobart' AND "Margin" = '115 runs' | What is the Rank that has a Venue of bellerive oval , hobart, and a Margin of 115 runs? | CREATE TABLE table_8061 (
"Rank" text,
"Margin" text,
"Opponent" text,
"Venue" text,
"Season" text
) |
SELECT team FROM table_23249053_11 WHERE high_points = "Rashard Lewis (24)" | When rashard lewis (24) has the highest amount of points who is the team? | CREATE TABLE table_23249053_11 (team VARCHAR, high_points VARCHAR) |
SELECT COUNT(no_in_series) FROM table_2226817_6 WHERE original_air_date = "October 28, 1990" | How many series numbers do the episodes originally aired on October 28, 1990? | CREATE TABLE table_2226817_6 (no_in_series VARCHAR, original_air_date VARCHAR) |
SELECT place FROM table_name_11 WHERE score = 69 - 71 - 66 - 73 = 279 | WHAT IS THE PLACE WITH THE SCORE 69-71-66-73=279? | CREATE TABLE table_name_11 (
place VARCHAR,
score VARCHAR
) |
SELECT COUNT(team) FROM table_23249053_11 WHERE high_points = "Vince Carter (24)" | When vince carter (24) has the highest points how many teams are there? | CREATE TABLE table_23249053_11 (team VARCHAR, high_points VARCHAR) |
SELECT MIN(no_in_series) FROM table_2226817_6 WHERE no_in_season = 13 | What' the series number of the episode with season number 13? | CREATE TABLE table_2226817_6 (no_in_series INTEGER, no_in_season VARCHAR) |
SELECT STUFF(DisplayName, 5, 0, Id) FROM Users ORDER BY Reputation DESC LIMIT 100 | Stuff Ids inside user names. | CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId 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 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 PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description 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 PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment 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 PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
) |
SELECT championship FROM table_23259077_1 WHERE opponent_in_the_final = "Ken Rosewall" | In which championship did John Newcombe play against Ken Rosewall in the final match? | CREATE TABLE table_23259077_1 (championship VARCHAR, opponent_in_the_final VARCHAR) |
SELECT report FROM table_22298383_1 WHERE day = "Sunday" AND average_speed__mph_ = "128.27" | What was the report for the Sunday race where the winner had an average speed of 128.27 mph? | CREATE TABLE table_22298383_1 (report VARCHAR, day VARCHAR, average_speed__mph_ VARCHAR) |
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'neurology consultation' AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-4 year')) | how many patients have had neurology consultation done until 4 years ago? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
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 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
) |
SELECT score_in_the_final FROM table_23259077_1 WHERE outcome = "Runner-up" AND championship = "Wimbledon" | What were the scores of the Wimbledon final matches where Newcombe was the runner-up? | CREATE TABLE table_23259077_1 (score_in_the_final VARCHAR, outcome VARCHAR, championship VARCHAR) |
SELECT day FROM table_22298383_1 WHERE laps = "364" AND driver = "Cale Yarborough" | On what day was the race that Cale Yarborough won in 364 laps? | CREATE TABLE table_22298383_1 (day VARCHAR, laps VARCHAR, driver VARCHAR) |
SELECT Location, AVG(Number_of_Platforms) FROM station GROUP BY Location | Bar chart x axis location y axis the average of number of platforms | CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
Main_Services text,
Number_of_Platforms int
)
CREATE TABLE train_station (
Train_ID int,
Station_ID int
) |
SELECT MIN(year) FROM table_23259077_1 WHERE opponent_in_the_final = "Clark Graebner" | On what year did Newcombe first face Clark Graebner in a final match? | CREATE TABLE table_23259077_1 (year INTEGER, opponent_in_the_final VARCHAR) |
SELECT manufacturer FROM table_22298383_1 WHERE average_speed__mph_ = "126.259" | Who manufactured the car that won with an average speed of 126.259 mph? | CREATE TABLE table_22298383_1 (manufacturer VARCHAR, average_speed__mph_ VARCHAR) |
SELECT MAX(1948 AS _49__) AS $_millions_ FROM table_19766_1 WHERE country = "Iceland" | How many millions of $ were spent in Iceland in 1948/49? | CREATE TABLE table_19766_1 (
country VARCHAR
) |
SELECT outcome FROM table_23259077_1 WHERE opponent_in_the_final = "Jan Kodeš" | What was the outcome for Newcombe in the matches he played against Jan Kodeš? | CREATE TABLE table_23259077_1 (outcome VARCHAR, opponent_in_the_final VARCHAR) |
SELECT year FROM table_22298383_1 WHERE team = "Leo Jackson Racing" | What year did the Leo Jackson Racing team win? | CREATE TABLE table_22298383_1 (year VARCHAR, team VARCHAR) |
SELECT "Assists" FROM table_28613 WHERE "Opponent" = 'Illinois-Chicago' | List the number of assists against illinois-chicago. | CREATE TABLE table_28613 (
"#" real,
"Player" text,
"Points" real,
"Rebounds" real,
"Assists" real,
"Opponent" text,
"Date" text
) |
SELECT COUNT(written_by) FROM table_23255941_1 WHERE directed_by = "Charles Haid" | How many writers were there in the episode directed by Charles Haid? | CREATE TABLE table_23255941_1 (written_by VARCHAR, directed_by VARCHAR) |
SELECT owned_since FROM table_22329326_1 WHERE station = "WLS-TV" | When was the station WLS-TV owned since? | CREATE TABLE table_22329326_1 (owned_since VARCHAR, station VARCHAR) |
SELECT song_name, releasedate FROM song ORDER BY releasedate DESC LIMIT 1 | What is the name of the song that was released in the most recent year? | CREATE TABLE song (
song_name VARCHAR,
releasedate VARCHAR
) |
SELECT title FROM table_23255941_1 WHERE written_by = "Mark Goffman" | What was the title of the episode written by Mark Goffman? | CREATE TABLE table_23255941_1 (title VARCHAR, written_by VARCHAR) |
SELECT market_rank_ & _city_of_license__market FROM table_22329326_1 WHERE station = "KABC-TV" | What market rank and city had the station KABC-TV? | CREATE TABLE table_22329326_1 (market_rank_ VARCHAR, _city_of_license__market VARCHAR, station VARCHAR) |
SELECT "Time" FROM table_14392 WHERE "Lane" < '5' AND "Name" = 'ágnes kovács' | When is the lane less than 5 and is named gnes kov cs? | CREATE TABLE table_14392 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) |
SELECT COUNT(original_air_date) FROM table_23255941_1 WHERE episode__number = 12 | How many original air dates did episode 12 have?h | CREATE TABLE table_23255941_1 (original_air_date VARCHAR, episode__number VARCHAR) |
SELECT MIN(owned_since) FROM table_22329326_1 | What was the earliest year a station was owned since? | CREATE TABLE table_22329326_1 (owned_since INTEGER) |
SELECT "Date" FROM table_44504 WHERE "Set 1" = '21–25' | Which Date has a Set 1 of 21 25? | CREATE TABLE table_44504 (
"Date" text,
"Time" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Total" text
) |
SELECT viewers__in_millions_ FROM table_23255941_1 WHERE directed_by = "Christine Moore" | How many millions of viewers watched the episode directed by Christine Moore? | CREATE TABLE table_23255941_1 (viewers__in_millions_ VARCHAR, directed_by VARCHAR) |
SELECT COUNT(share) FROM table_22353769_3 WHERE viewers__millions_ = "3.62" | How many episodes had 3.62 million viewers? | CREATE TABLE table_22353769_3 (share VARCHAR, viewers__millions_ VARCHAR) |
SELECT ends FROM table_name_34 WHERE name = "donaldson" | When does Donaldson's move end? | CREATE TABLE table_name_34 (
ends VARCHAR,
name VARCHAR
) |
SELECT COUNT(date) FROM table_23274514_7 WHERE score = "W 107–97 (OT)" | Name the number of date for w 107–97 (ot) | CREATE TABLE table_23274514_7 (date VARCHAR, score VARCHAR) |
SELECT COUNT(us_air_date) FROM table_22353769_3 WHERE episode__number = 11 | How many episodes have episode #11? | CREATE TABLE table_22353769_3 (us_air_date VARCHAR, episode__number VARCHAR) |
SELECT "Verbal noun" FROM table_558 WHERE "Participle" = 'e-duki' | What is the verbal noun connected to the participle e-duki? | CREATE TABLE table_558 (
"Basic stem (root)" text,
"Present stem" text,
"Non-present stem" text,
"Participle" text,
"Verbal noun" text,
"Short stem" text,
"Meaning" text
) |
SELECT date FROM table_23274514_7 WHERE record = "17-32" | Name the date for 17-32 | CREATE TABLE table_23274514_7 (date VARCHAR, record VARCHAR) |
SELECT COUNT(episode__number) FROM table_22353769_3 WHERE viewers__millions_ = "3.63" | How many epsidode(s) had 3.63 million viewers? | CREATE TABLE table_22353769_3 (episode__number VARCHAR, viewers__millions_ VARCHAR) |
SELECT SUM(gold) FROM table_name_18 WHERE nation = "new zealand" AND rank < 14 | What is the total gold from New zealand and a rank less than 14? | CREATE TABLE table_name_18 (
gold INTEGER,
nation VARCHAR,
rank VARCHAR
) |
SELECT high_rebounds FROM table_23274514_7 WHERE record = "17-33" | Name the high rebounds for 17-33 | CREATE TABLE table_23274514_7 (high_rebounds VARCHAR, record VARCHAR) |
SELECT nation FROM table_22355_11 WHERE athlete = "Sebastian Coe Category:Articles with hCards" | What nation had the athlete sebastian coe category:articles with hcards? | CREATE TABLE table_22355_11 (nation VARCHAR, athlete VARCHAR) |
SELECT Status, AVG(Population) FROM city GROUP BY Status | I want to know the proportion of the average population for each status. | CREATE TABLE farm_competition (
Competition_ID int,
Year int,
Theme text,
Host_city_ID int,
Hosts text
)
CREATE TABLE city (
City_ID int,
Official_Name text,
Status text,
Area_km_2 real,
Population real,
Census_Ranking text
)
CREATE TABLE farm (
Farm_ID int,
Year int,
Total_Horses real,
Working_Horses real,
Total_Cattle real,
Oxen real,
Bulls real,
Cows real,
Pigs real,
Sheep_and_Goats real
)
CREATE TABLE competition_record (
Competition_ID int,
Farm_ID int,
Rank int
) |
SELECT team FROM table_23274514_7 WHERE record = "19-34" | Name the team for 19-34 | CREATE TABLE table_23274514_7 (team VARCHAR, record VARCHAR) |
SELECT COUNT(rank) FROM table_22355_11 WHERE athlete = "Peter Snell Category:Articles with hCards" | What rank did the nation with athlete peter snell category:articles with hcards have? | CREATE TABLE table_22355_11 (rank VARCHAR, athlete VARCHAR) |
SELECT Position, COUNT(Position) FROM pilot GROUP BY Position | What is the proportion of positions of pilots? | CREATE TABLE pilot (
Pilot_ID int,
Pilot_name text,
Rank int,
Age int,
Nationality text,
Position text,
Join_Year int,
Team text
)
CREATE TABLE pilot_record (
Record_ID int,
Pilot_ID int,
Aircraft_ID int,
Date text
)
CREATE TABLE aircraft (
Aircraft_ID int,
Order_Year int,
Manufacturer text,
Model text,
Fleet_Series text,
Powertrain text,
Fuel_Propulsion text
) |
SELECT COUNT(model) FROM table_2326823_2 WHERE max_power_output = "162kW (220 PS) at 6,300 rpm" | How many models have maximum power output is 162kw (220 ps) at 6,300 rpm? | CREATE TABLE table_2326823_2 (model VARCHAR, max_power_output VARCHAR) |
SELECT COUNT(nation) FROM table_22355_50 WHERE athlete = "Shuhei Nishida Category:Articles with hCards" | how many times was nation counted where athlete is shuhei nishida category:articles with hcards | CREATE TABLE table_22355_50 (nation VARCHAR, athlete VARCHAR) |
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'glucose') ORDER BY labevents.charttime DESC LIMIT 1) > (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'glucose') ORDER BY labevents.charttime DESC LIMIT 1 OFFSET 1) | is glucose patient 28443 has last measured on the current hospital visit greater than it was second to last measured on the current hospital visit? | CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE 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 prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE 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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
) |
SELECT max_power_output FROM table_2326823_2 WHERE model = "2.0 TS" AND peak_torque = "N·m (lb·ft) at 3,500 rpm" | List the max power produced for model 2.0 ts with peak of n·m (lb·ft) at 3,500 rpm. | CREATE TABLE table_2326823_2 (max_power_output VARCHAR, model VARCHAR, peak_torque VARCHAR) |
SELECT MIN(silver) FROM table_22355_50 | What is the least number of silver medals won | CREATE TABLE table_22355_50 (silver INTEGER) |
SELECT COUNT(*) FROM Users WHERE Reputation >= 10000 | Number of users with 10k+ rep. | CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId 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 SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
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 Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE VoteTypes (
Id number,
Name 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 ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE 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 ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
) |
SELECT high_points FROM table_23274514_4 WHERE record = "2-7" | Who had the highest points during the game with a record of 2-7? | CREATE TABLE table_23274514_4 (high_points VARCHAR, record VARCHAR) |
SELECT MAX(silver) FROM table_22355_71 | How many silver medalist was won? | CREATE TABLE table_22355_71 (silver INTEGER) |
SELECT role_code, COUNT(*) FROM Users GROUP BY role_code ORDER BY role_code | What are the different role codes for users, and how many users have each Show bar chart, show from low to high by the X-axis please. | CREATE TABLE Roles (
role_code VARCHAR(15),
role_description VARCHAR(80)
)
CREATE TABLE Functional_Areas (
functional_area_code VARCHAR(15),
parent_functional_area_code VARCHAR(15),
functional_area_description VARCHAR(80)
)
CREATE TABLE Users (
user_id INTEGER,
role_code VARCHAR(15),
user_name VARCHAR(40),
user_login VARCHAR(40),
password VARCHAR(40)
)
CREATE TABLE Images (
image_id INTEGER,
image_alt_text VARCHAR(80),
image_name VARCHAR(40),
image_url VARCHAR(255)
)
CREATE TABLE Document_Sections_Images (
section_id INTEGER,
image_id INTEGER
)
CREATE TABLE Document_Functional_Areas (
document_code VARCHAR(15),
functional_area_code VARCHAR(15)
)
CREATE TABLE Documents (
document_code VARCHAR(15),
document_structure_code VARCHAR(15),
document_type_code VARCHAR(15),
access_count INTEGER,
document_name VARCHAR(80)
)
CREATE TABLE Document_Structures (
document_structure_code VARCHAR(15),
parent_document_structure_code VARCHAR(15),
document_structure_description VARCHAR(80)
)
CREATE TABLE Document_Sections (
section_id INTEGER,
document_code VARCHAR(15),
section_sequence INTEGER,
section_code VARCHAR(20),
section_title VARCHAR(80)
) |
SELECT team FROM table_23274514_4 WHERE record = "2-5" | What team did the Wizards play against when their record was 2-5? | CREATE TABLE table_23274514_4 (team VARCHAR, record VARCHAR) |
SELECT league AS Cup FROM table_22357065_1 WHERE nation = "Northern Ireland" | Name the league cup for northern ireland | CREATE TABLE table_22357065_1 (league VARCHAR, nation VARCHAR) |
SELECT losing_bonus FROM table_name_48 WHERE points_for = "416" AND club = "ynysybwl rfc" | For Ynysybwl RFC, what was the losing bonus for 416 points? | CREATE TABLE table_name_48 (
losing_bonus VARCHAR,
points_for VARCHAR,
club VARCHAR
) |
SELECT high_points FROM table_23274514_4 WHERE team = "Phoenix" | Who tied in the highest point scorer when playing against Phoenix? | CREATE TABLE table_23274514_4 (high_points VARCHAR, team VARCHAR) |
SELECT start___utc__ FROM table_22385461_9 WHERE spacecraft = "Shenzhou 7 EVA 1" | If the spacecraft is the Shenzhou 7 Eva 1, what is the start (utc) date and time? | CREATE TABLE table_22385461_9 (start___utc__ VARCHAR, spacecraft VARCHAR) |
SELECT irish_name FROM table_1682865_1 WHERE £1_fraction = "1/240" | What is the Irish name for the 1 fraction of 1/240? | CREATE TABLE table_1682865_1 (
irish_name VARCHAR,
£1_fraction VARCHAR
) |
SELECT COUNT(season__number) FROM table_23279434_1 WHERE production_code = "AM10" | Which season used production code "am10"? | CREATE TABLE table_23279434_1 (season__number VARCHAR, production_code VARCHAR) |
SELECT spacecraft FROM table_22385461_9 WHERE start___utc__ = "November 18, 2008 18:09" | If the start (utc) is November 18, 2008 18:09, what is the name of the spacecraft? | CREATE TABLE table_22385461_9 (spacecraft VARCHAR, start___utc__ VARCHAR) |
SELECT opponent FROM table_name_14 WHERE date = "august 25" | what team played on august 25 | CREATE TABLE table_name_14 (
opponent VARCHAR,
date VARCHAR
) |
SELECT original_air_date FROM table_23279434_1 WHERE directed_by = "Jeremy Kagan" | When did Jeremy Kagan's episode first air? | CREATE TABLE table_23279434_1 (original_air_date VARCHAR, directed_by VARCHAR) |
SELECT end__utc_ FROM table_22385461_6 WHERE spacecraft = "STS-114 EVA 3" | What is the end (UTC) for spacecraft STS-114 Eva 3? | CREATE TABLE table_22385461_6 (end__utc_ VARCHAR, spacecraft VARCHAR) |
SELECT COUNT(*) FROM nuclear_power_plants WHERE status = "Shutdown" | How many nuclear power plants were shut down now? | CREATE TABLE nuclear_power_plants (
id text,
name text,
latitude text,
longitude text,
country text,
status text,
reactortype text,
reactormodel text,
constructionstartat text,
operationalfrom text,
operationalto text,
capacity text,
lastupdatedat text,
source text
) |
SELECT COUNT(season__number) FROM table_23279434_1 WHERE written_by = "David E. Kelley" AND series__number = 7 | What seasons in series 7 did David E. Kelley write ? | CREATE TABLE table_23279434_1 (season__number VARCHAR, written_by VARCHAR, series__number VARCHAR) |
SELECT start___utc__ FROM table_22385461_6 WHERE end__utc_ = "March 28, 2005, 11:31" | What is the start date and time of the walk that ends March 28, 2005, 11:31? | CREATE TABLE table_22385461_6 (start___utc__ VARCHAR, end__utc_ VARCHAR) |
SELECT "West Manila" FROM table_21482 WHERE "Consumer Price Index (2005=100)" = '60.6' | What was West Manila's tariff increase when its CPI is 60.6? | CREATE TABLE table_21482 (
"Year" real,
"West Manila" text,
"East Manila" text,
"Consumer Price Index (2005=100)" text,
"West Manila as a share of 1996 real tariff" text,
"East Manila as a share of 1996 real tariff" text
) |
SELECT COUNT(date) FROM table_23281862_10 WHERE score = "L 106–116 (OT)" | Name the total number of date for score being l 106–116 (ot) | CREATE TABLE table_23281862_10 (date VARCHAR, score VARCHAR) |
SELECT points_classification FROM table_22464308_2 WHERE stage = 4 | Which points classification has 4 as the stage? | CREATE TABLE table_22464308_2 (points_classification VARCHAR, stage VARCHAR) |
SELECT MAX("Game") FROM table_31416 WHERE "Location Attendance" = 'America West Arena 18,756' | In what game was the attendance at the America West Arena 18,756? | CREATE TABLE table_31416 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
) |
SELECT record FROM table_23281862_10 WHERE team = "Charlotte" | Name the record for charlotte | CREATE TABLE table_23281862_10 (record VARCHAR, team VARCHAR) |
SELECT malaysian_team_classification FROM table_22464308_2 WHERE points_classification = "Mohd Nur Rizuan Zainal" | Which malaysian team classification had mohd nur rizuan zainal as points classification? | CREATE TABLE table_22464308_2 (malaysian_team_classification VARCHAR, points_classification VARCHAR) |
SELECT light_vehicle FROM table_1211545_2 WHERE heavy_vehicle__2_axles_ = "R87.00" | What is the toll for light vehicles at the plaza where the toll for heavy vehicles with 2 axles is r87.00? | CREATE TABLE table_1211545_2 (
light_vehicle VARCHAR,
heavy_vehicle__2_axles_ VARCHAR
) |
SELECT MAX(game) FROM table_23281862_10 WHERE score = "W 113–96 (OT)" | Name the most game for w 113–96 (ot) | CREATE TABLE table_23281862_10 (game INTEGER, score VARCHAR) |
SELECT team_classification FROM table_22464308_2 WHERE malaysian_team_classification = "MNCF Continental Team" | Which team classification has malaysian team classification of mncf continental team? | CREATE TABLE table_22464308_2 (team_classification VARCHAR, malaysian_team_classification VARCHAR) |
SELECT COUNT(year) FROM table_name_78 WHERE group = "sitges film festival" | What is the number of years that Kim was nominated at the Sitges Film Festival? | CREATE TABLE table_name_78 (
year VARCHAR,
group VARCHAR
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.