answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT date FROM table_name_56 WHERE opponent = "alena tarasova"
What is the date of the tournament with Alena Tarasova as the opponent?
CREATE TABLE table_name_56 (date VARCHAR, opponent VARCHAR)
SELECT "Away team score" FROM table_4823 WHERE "Away team" = 'south melbourne'
What is the away team's score when south melbourne is the away team?
CREATE TABLE table_4823 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT podiums FROM table_26473176_1 WHERE position = "12th"
What was the number of podiums in 12th position?
CREATE TABLE table_26473176_1 (podiums VARCHAR, position VARCHAR)
SELECT hereditary_peers FROM table_name_15 WHERE total = 1
Which Hereditary peers have a Total of 1?
CREATE TABLE table_name_15 (hereditary_peers VARCHAR, total VARCHAR)
SELECT MAX(date) FROM table_name_64 WHERE cores_per_die___dies_per_module = "2 / 1" AND clock = "1.4-1.6ghz"
What is the latest date with Cores per die / Dies per module of 2 / 1, and a Clock of 1.4-1.6ghz?
CREATE TABLE table_name_64 ( date INTEGER, cores_per_die___dies_per_module VARCHAR, clock VARCHAR )
SELECT COUNT(finish) FROM table_2649597_1 WHERE start = "21.6"
Where did he finish when he started at 21.6?
CREATE TABLE table_2649597_1 (finish VARCHAR, start VARCHAR)
SELECT COUNT(total) FROM table_name_17 WHERE hereditary_peers = "–" AND lords_spiritual = "–" AND life_peers = "2" AND affiliation = "plaid cymru"
Which Total has a Hereditary peer of –, and a Lords spiritual of –, and a Life peers of 2, and an Affiliation of plaid cymru?
CREATE TABLE table_name_17 (total VARCHAR, affiliation VARCHAR, life_peers VARCHAR, hereditary_peers VARCHAR, lords_spiritual VARCHAR)
SELECT points FROM table_20500097_1 WHERE poles > 1.0
How many points did he win in the race with more than 1.0 poles?
CREATE TABLE table_20500097_1 ( points VARCHAR, poles INTEGER )
SELECT team_s_ FROM table_2649597_1 WHERE start = "39.1"
What teams started at 39.1?
CREATE TABLE table_2649597_1 (team_s_ VARCHAR, start VARCHAR)
SELECT elector FROM table_name_68 WHERE nationality = "hungarian"
Which Elector is hungarian?
CREATE TABLE table_name_68 (elector VARCHAR, nationality VARCHAR)
SELECT "Station" FROM table_64207 WHERE "Frequency" = '873khz'
Which station has a frequency of 873khz?
CREATE TABLE table_64207 ( "Frequency" text, "Station" text, "Operator" text, "Country of origin" text, "Transmitter location" text, "Format" text )
SELECT season_rank FROM table_2649597_1 WHERE winnings = "$491,977"
Where did they finish in the season when when they won $491,977?
CREATE TABLE table_2649597_1 (season_rank VARCHAR, winnings VARCHAR)
SELECT cardinalatial_title FROM table_name_77 WHERE elevator = "pope eugenius iv"
Which Cardinalatial Title has an Elevator of pope eugenius iv?
CREATE TABLE table_name_77 (cardinalatial_title VARCHAR, elevator VARCHAR)
SELECT AVG("Wins") FROM table_60853 WHERE "Goal Difference" > '-24' AND "Draws" > '7'
Can you tell me the average Wins that has the Goal Difference larger than -24, and the Draws larger than 7?
CREATE TABLE table_60853 ( "Position" real, "Club" text, "Played" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Points" real, "Goal Difference" real )
SELECT COUNT(genre) FROM table_26488540_1 WHERE artist = "The Jimi Hendrix Experience"
How many different genres appear for the Jimi Hendrix Experience?
CREATE TABLE table_26488540_1 (genre VARCHAR, artist VARCHAR)
SELECT AVG(works_number) FROM table_name_1 WHERE number > 807 AND type = "0-6-0" AND date = 1920
Which Works number has a Number larger than 807, and a Type of 0-6-0, and a Date of 1920?
CREATE TABLE table_name_1 (works_number INTEGER, date VARCHAR, number VARCHAR, type VARCHAR)
SELECT song FROM table_name_1 WHERE year < 1979 AND us_hot_100 = "8"
Which Song has a Year smaller than 1979, and a US Hot 100 of 8?
CREATE TABLE table_name_1 ( song VARCHAR, year VARCHAR, us_hot_100 VARCHAR )
SELECT title FROM table_26493520_3 WHERE total_viewers_on_fx = "483,000"
Name the title for total viewers on fx+ being 483,000
CREATE TABLE table_26493520_3 (title VARCHAR, total_viewers_on_fx VARCHAR)
SELECT type FROM table_name_46 WHERE date < 1943 AND builder = "alco schenectady" AND number > 822 AND works_number = 59867
Which Type has a Date smaller than 1943, and a Builder of alco schenectady, and a Number larger than 822, and Works number of 59867?
CREATE TABLE table_name_46 (type VARCHAR, works_number VARCHAR, number VARCHAR, date VARCHAR, builder VARCHAR)
SELECT AVG("Frequency") FROM table_33865 WHERE "Website" = '•' AND "Webcast" = '•' AND "City of License" = 'san antonio'
Which Frequency has a Website of , and a Webcast of in san antonio?
CREATE TABLE table_33865 ( "Frequency" real, "Callsign" text, "Brand" text, "City of License" text, "Website" text, "Webcast" text )
SELECT rank_on_channel FROM table_26493520_3 WHERE original_air_date = "January 21, 2011"
Name the rank on channel for january 21, 2011
CREATE TABLE table_26493520_3 (rank_on_channel VARCHAR, original_air_date VARCHAR)
SELECT AVG(date) FROM table_name_19 WHERE builder = "alco schenectady" AND number > 835 AND works_number = 56566
Which Date has a Builder of alco schenectady, and a Number larger than 835, and Works number of 56566?
CREATE TABLE table_name_19 (date INTEGER, works_number VARCHAR, builder VARCHAR, number VARCHAR)
SELECT name FROM club WHERE NOT club_id IN (SELECT club_id FROM player)
What are the names of all clubs that do not have any players?
CREATE TABLE competition_result ( competition_id number, club_id_1 number, club_id_2 number, score text ) CREATE TABLE club ( club_id number, name text, region text, start_year text ) CREATE TABLE competition ( competition_id number, year number, competition_type text, country text ) CREATE TABLE player ( player_id number, name text, position text, club_id number, apps number, tries number, goals text, points number ) CREATE TABLE club_rank ( rank number, club_id number, gold number, silver number, bronze number, total number )
SELECT COUNT(title) FROM table_26493520_1 WHERE written_by = "Alexander Woo" AND directed_by = "Scott Winant"
How many episodes were written by Alexander Woo and directed by Scott Winant?
CREATE TABLE table_26493520_1 (title VARCHAR, written_by VARCHAR, directed_by VARCHAR)
SELECT date FROM table_name_46 WHERE election = "1953"
When was the Election of 1953?
CREATE TABLE table_name_46 (date VARCHAR, election VARCHAR)
SELECT "Mountain Peak" FROM table_70048 WHERE "Location" = '46.7000°n 60.5992°w'
Name the mountain peak with location of 46.7000 n 60.5992 w
CREATE TABLE table_70048 ( "Rank" real, "Mountain Peak" text, "Province" text, "Mountain Range" text, "Location" text )
SELECT MAX(round) FROM table_26533354_8 WHERE player = "Jordan Cameron"
Name the most round for jordan cameron
CREATE TABLE table_26533354_8 (round INTEGER, player VARCHAR)
SELECT date FROM table_name_78 WHERE votes = "50,324"
On what date were there 50,324 votes?
CREATE TABLE table_name_78 (date VARCHAR, votes VARCHAR)
SELECT Score, ViewCount, CreationDate, DATEDIFF(DAY, CreationDate, GETDATE()) AS "DaysOpen", (ViewCount / DATEDIFF(DAY, CreationDate, GETDATE())) AS "NewScore", LastActivityDate, Title, Id, Tags FROM Posts WHERE Title LIKE '%mongodb%' OR Tags LIKE '%mongodb%' ORDER BY NewScore DESC
Popular MongoDB Queries by ViewCount.
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 PostHistoryTypes ( 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 FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTaskResultTypes ( 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 CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDate time, ApprovalModeratorId number, DeactivationDate time, DeactivationModeratorId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) 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 Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskStates ( 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 PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) 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 VoteTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId 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 ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time )
SELECT position FROM table_26533354_8 WHERE player = "Jordan Cameron"
Name the position for jordan cameron
CREATE TABLE table_26533354_8 (position VARCHAR, player VARCHAR)
SELECT votes FROM table_name_32 WHERE date = "november 10"
How many votes were there on November 10?
CREATE TABLE table_name_32 (votes VARCHAR, date VARCHAR)
SELECT "Date" FROM table_8168 WHERE "Away team" = 'adelaide'
What date was the away team from Adelaide?
CREATE TABLE table_8168 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Date" text, "Crowd" real )
SELECT position FROM table_26533354_8 WHERE player = "Stanley Havili"
Name the position for stanley havili
CREATE TABLE table_26533354_8 (position VARCHAR, player VARCHAR)
SELECT date FROM table_name_47 WHERE record = "79-48"
What date has 79-48 as the record?
CREATE TABLE table_name_47 (date VARCHAR, record VARCHAR)
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'chest pain' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104') AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'tamsulosin hcl 0.4 mg po caps' AND STRFTIME('%y', medication.drugstarttime) <= '2104') AS t2 WHERE t1.diagnosistime < t2.drugstarttime AND DATETIME(t2.drugstarttime) BETWEEN DATETIME(t1.diagnosistime) AND DATETIME(t1.diagnosistime, '+2 month')
count the number of people who were prescribed tamsulosin hcl 0.4 mg po caps within 2 months following a diagnosis of chest pain until 2104.
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime 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 diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time )
SELECT college FROM table_26533354_8 WHERE player = "David Carter"
Name the college for david carter
CREATE TABLE table_26533354_8 (college VARCHAR, player VARCHAR)
SELECT AVG(attendance) FROM table_name_86 WHERE record = "83-52"
What is the average attendance that has 83-52 as the record?
CREATE TABLE table_name_86 (attendance INTEGER, record VARCHAR)
SELECT title FROM table_name_28 WHERE rank = 9
Which title had rank 9?
CREATE TABLE table_name_28 ( title VARCHAR, rank VARCHAR )
SELECT democratic_coalition FROM table_2651755_1 WHERE together_we_can_do_more = "Sergio Castro ( PC )"
What is the democratic coalation when together we can do more is sergio castro ( pc )?
CREATE TABLE table_2651755_1 (democratic_coalition VARCHAR, together_we_can_do_more VARCHAR)
SELECT segment_d FROM table_name_60 WHERE segment_a = "umbrellas"
Name the segment D for umbrellas
CREATE TABLE table_name_60 (segment_d VARCHAR, segment_a VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2043" AND lab.fluid = "Urine"
what is the number of patients whose year of birth is less than 2043 and lab test fluid is urine?
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 independent_regional_force FROM table_2651755_1 WHERE alliance = "(R) Iván Norambuena ( UDI )"
What is the independent regional force when alliance is (r) iván norambuena ( udi )?
CREATE TABLE table_2651755_1 (independent_regional_force VARCHAR, alliance VARCHAR)
SELECT segment_a FROM table_name_89 WHERE netflix = "s05e01"
Name the segment A for netflix of s05e01
CREATE TABLE table_name_89 (segment_a VARCHAR, netflix VARCHAR)
SELECT date FROM table_2006661_1 WHERE value = "55c"
Name the date for value 55c
CREATE TABLE table_2006661_1 ( date VARCHAR, value VARCHAR )
SELECT together_we_can_do_more FROM table_2651755_1 WHERE democratic_coalition = "René Alinco ( PPD )"
Who is the together we can do more when democratic coalition is rené alinco ( ppd )?
CREATE TABLE table_2651755_1 (together_we_can_do_more VARCHAR, democratic_coalition VARCHAR)
SELECT series_ep FROM table_name_27 WHERE segment_d = "darts"
Name the series ep for darts
CREATE TABLE table_name_27 (series_ep VARCHAR, segment_d VARCHAR)
SELECT DISTINCT TYPE FROM vocals
Find all the vocal types.
CREATE TABLE vocals ( TYPE VARCHAR )
SELECT independent_regional_force FROM table_2651755_1 WHERE democratic_coalition = "(R) Jorge Tarud ( PPD )"
Who is the independent regional force when democratic coalition is (r) jorge tarud ( ppd )?
CREATE TABLE table_2651755_1 (independent_regional_force VARCHAR, democratic_coalition VARCHAR)
SELECT series_ep FROM table_name_63 WHERE segment_c = "luxury cars (part 1)"
Name the series ep for segment c of luxury cars (part 1)
CREATE TABLE table_name_63 (series_ep VARCHAR, segment_c VARCHAR)
SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3
Show the names of the three most recent festivals.
CREATE TABLE festival_detail ( Festival_Name VARCHAR, YEAR VARCHAR )
SELECT cons FROM table_2651755_2 WHERE together_we_can_do_more = "Gloria Mujica ( PH )"
where together we can do more is gloria mujica ( ph ) what are all the cons.
CREATE TABLE table_2651755_2 (cons VARCHAR, together_we_can_do_more VARCHAR)
SELECT school FROM table_name_79 WHERE location = "rossville"
What school is located in rossville?
CREATE TABLE table_name_79 (school VARCHAR, location VARCHAR)
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Iran%' ORDER BY Reputation DESC LIMIT 300
Top 300 users by Reputation in Iran.
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE 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 ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE PostHistoryTypes ( 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 Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) 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 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 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 VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( 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 PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostTypes ( Id number, Name text )
SELECT alliance FROM table_2651755_2 WHERE democratic_coalition = "Eduardo Frei ( PDC )"
where democratic coalition is eduardo frei ( pdc ) what are all the alliance
CREATE TABLE table_2651755_2 (alliance VARCHAR, democratic_coalition VARCHAR)
SELECT MIN(enrollment) FROM table_name_73 WHERE ihsaa_class = "a" AND mascot = "trojans"
How many people enrolled a the school with an IHSAA Class of a, and the trojans as their mascot?
CREATE TABLE table_name_73 (enrollment INTEGER, ihsaa_class VARCHAR, mascot VARCHAR)
SELECT power FROM table_name_90 WHERE class = "a" AND identifier = "cboc-fm"
What is the power that belongs to Class A with an Identifier of CBOC-FM?
CREATE TABLE table_name_90 ( power VARCHAR, class VARCHAR, identifier VARCHAR )
SELECT episode_title FROM table_2655016_4 WHERE nick_prod__number = 342
What's the name of the episode associated with Nick production number 342?
CREATE TABLE table_2655016_4 (episode_title VARCHAR, nick_prod__number VARCHAR)
SELECT ihsaa_class FROM table_name_80 WHERE _number___county = "12 clinton" AND mascot = "hornets"
What IHSAA clas is the school with a county number of 12 clinton and the hornets as their mascot?
CREATE TABLE table_name_80 (ihsaa_class VARCHAR, _number___county VARCHAR, mascot VARCHAR)
SELECT "Date" FROM table_14805 WHERE "Margin of victory" = '1 stroke' AND "Tournament" = 'legend financial group classic'
Name the date with margin of victory of 1 stroke and tournament of legend financial group classic
CREATE TABLE table_14805 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
SELECT original_air_date FROM table_2655016_4 WHERE season__number = 12
What date did season 12 premiere?
CREATE TABLE table_2655016_4 (original_air_date VARCHAR, season__number VARCHAR)
SELECT score FROM table_name_48 WHERE loss = "lannan (4-8)"
What is the score when a loss was listed with Lannan (4-8)?
CREATE TABLE table_name_48 (score VARCHAR, loss VARCHAR)
SELECT People_ID, Total FROM body_builder
Return a scatter chart about the correlation between People_ID and Total .
CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Birth_Date text, Birth_Place text ) CREATE TABLE body_builder ( Body_Builder_ID int, People_ID int, Snatch real, Clean_Jerk real, Total real )
SELECT MIN(nick_prod__number) FROM table_2655016_4
What is the lowest Nick production number?
CREATE TABLE table_2655016_4 (nick_prod__number INTEGER)
SELECT date FROM table_name_93 WHERE record = "44-37"
What was the date when the Twins had a record of 44-37?
CREATE TABLE table_name_93 (date VARCHAR, record VARCHAR)
SELECT outcome FROM table_name_84 WHERE score_in_final = "5–7, 6–4, [10–7]"
What was the outcome for the match that ended in a score of 5 7, 6 4, [10 7]?
CREATE TABLE table_name_84 ( outcome VARCHAR, score_in_final VARCHAR )
SELECT original_air_date FROM table_2655016_10 WHERE nick_prod__number = 945
When did the episode originally air with a nick production number of 945?
CREATE TABLE table_2655016_10 (original_air_date VARCHAR, nick_prod__number VARCHAR)
SELECT opponents_in_final FROM table_name_25 WHERE date = "september 16, 1990"
Which Opponents in Final has a Date of september 16, 1990?
CREATE TABLE table_name_25 (opponents_in_final VARCHAR, date VARCHAR)
SELECT slalom FROM table_name_36 WHERE downhill = "4"
Which Slalom has a Downhill of 4?
CREATE TABLE table_name_36 ( slalom VARCHAR, downhill VARCHAR )
SELECT MAX(season__number) FROM table_2655016_10 WHERE nick_prod__number = 942
What was the latest season with a nick production number of 942?
CREATE TABLE table_2655016_10 (season__number INTEGER, nick_prod__number VARCHAR)
SELECT partner FROM table_name_87 WHERE date = "june 18, 1989"
Which Partner has a Date of june 18, 1989?
CREATE TABLE table_name_87 (partner VARCHAR, date VARCHAR)
SELECT "Nationality" FROM table_58142 WHERE "Position" = 'guard' AND "School/Club Team" = 'utah'
What is the nationality of the guard who plays at Utah?
CREATE TABLE table_58142 ( "Player" text, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text )
SELECT metrical_equivalence FROM table_26538461_2 WHERE portuguese_name = "Linha"
Name the metrical equivalence for linha
CREATE TABLE table_26538461_2 (metrical_equivalence VARCHAR, portuguese_name VARCHAR)
SELECT opponents_in_final FROM table_name_15 WHERE outcome = "winner" AND surface = "hard" AND date = "april 17, 1994"
Which Opponents in Final has an Outcome of winner, and a Surface of hard, and a Date of april 17, 1994?
CREATE TABLE table_name_15 (opponents_in_final VARCHAR, date VARCHAR, outcome VARCHAR, surface VARCHAR)
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hepatorenal syndrome') AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'acetaminophen 650 mg re supp') AS t2 WHERE t1.diagnosistime < t2.drugstarttime AND DATETIME(t2.drugstarttime) BETWEEN DATETIME(t1.diagnosistime) AND DATETIME(t1.diagnosistime, '+2 month')
how many patients were prescribed with acetaminophen 650 mg re supp within 2 months after the diagnosis of hepatorenal syndrome,?
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 treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime 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 )
SELECT equivalence_in_varas FROM table_26538461_2 WHERE english_name = "Geometrical pace"
Name the equivalence for varas for geometrical pace
CREATE TABLE table_26538461_2 (equivalence_in_varas VARCHAR, english_name VARCHAR)
SELECT opponents_in_final FROM table_name_19 WHERE score_in_final = "7–5, 1–6 4–6"
Which Opponents in Final has a Score in Final of 7–5, 1–6 4–6?
CREATE TABLE table_name_19 (opponents_in_final VARCHAR, score_in_final VARCHAR)
SELECT SUM("Diameter (km)") FROM table_50139 WHERE "Latitude" = '62.7n'
COunt the sum of Diameter (km) which has a Latitude of 62.7n?
CREATE TABLE table_50139 ( "Name" text, "Latitude" text, "Longitude" text, "Diameter (km)" real, "Year named" real, "Name origin" text )
SELECT subdivides_in FROM table_26538461_2 WHERE equivalence_in_varas = "1/5"
Name the subdivides in equivalence for varas 1/5
CREATE TABLE table_26538461_2 (subdivides_in VARCHAR, equivalence_in_varas VARCHAR)
SELECT partner FROM table_name_94 WHERE score_in_final = "6–1, 6–2"
Which Partner has a Score in Final of 6–1, 6–2?
CREATE TABLE table_name_94 (partner VARCHAR, score_in_final VARCHAR)
SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23605')) AND microlab.culturesite = 'blood, venipuncture' AND DATETIME(microlab.culturetakentime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')
is there any microbiological test result for patient 031-23605's blood, venipuncture the previous year?
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 treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime 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 lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time )
SELECT year__ceremony_ FROM table_26555737_1 WHERE arabic_title = "موسم زيتون"
When موسم زيتون is the arabic title when is the year (ceremony)?
CREATE TABLE table_26555737_1 (year__ceremony_ VARCHAR, arabic_title VARCHAR)
SELECT SUM(points) FROM table_name_29 WHERE opponent = "@ new jersey devils" AND game > 7
What is the total Points for the Opponent of @ New Jersey Devils and a Game bigger than 7?
CREATE TABLE table_name_29 (points INTEGER, opponent VARCHAR, game VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND prescriptions.drug = "Sulfameth/Trimethoprim DS"
what is the number of patients prescribed sulfameth/trimethoprim ds who were admitted via physician referral/normal delivery?
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 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 english_title FROM table_26555737_1 WHERE arabic_title = "ملح هذا البحر"
When ملح هذا البحر is the arabic title what is the english title?
CREATE TABLE table_26555737_1 (english_title VARCHAR, arabic_title VARCHAR)
SELECT time FROM table_name_83 WHERE event = "njkf titans neo x"
What was the time of the NJKF Titans Neo X event?
CREATE TABLE table_name_83 (time VARCHAR, event VARCHAR)
SELECT Team, COUNT(Team) FROM Elimination GROUP BY Team
What is the proportion of the teams in elimination? Display by a pie chart.
CREATE TABLE Elimination ( Elimination_ID text, Wrestler_ID text, Team text, Eliminated_By text, Elimination_Move text, Time text ) CREATE TABLE wrestler ( Wrestler_ID int, Name text, Reign text, Days_held text, Location text, Event text )
SELECT director FROM table_26555737_1 WHERE result = "Nominee"
When nominee is the result who is the director?
CREATE TABLE table_26555737_1 (director VARCHAR, result VARCHAR)
SELECT record FROM table_name_72 WHERE time = "2:06" AND event = "njkf magnam 16"
What was the record after the NJKF Magnam 16 event that lasted 2:06?
CREATE TABLE table_name_72 (record VARCHAR, time VARCHAR, event VARCHAR)
SELECT HIRE_DATE, EMPLOYEE_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE
For all employees who have the letters D or S in their first name, a line chart shows the change of employee_id over hire_date, and could you sort by the X in ascending?
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) )
SELECT result FROM table_26555737_1 WHERE director = "Hany Abu-Assad Category:Articles with hCards"
When hany abu-assad category:articles with hcards is the director what is the result?
CREATE TABLE table_26555737_1 (result VARCHAR, director VARCHAR)
SELECT opponent FROM table_name_14 WHERE record = "6-3"
Which opponent led to a 6-3 record?
CREATE TABLE table_name_14 (opponent VARCHAR, record VARCHAR)
SELECT network FROM table_name_86 WHERE title = "epik high's love and delusion"
What is the Network, when Title is 'Epik High's Love And Delusion'?
CREATE TABLE table_name_86 ( network VARCHAR, title VARCHAR )
SELECT COUNT(result) FROM table_26555737_1 WHERE year__ceremony_ = "2012 (85th)"
When 2012 (85th) is the year (ceremony) how many results?
CREATE TABLE table_26555737_1 (result VARCHAR, year__ceremony_ VARCHAR)
SELECT COUNT(pick__number) FROM table_name_69 WHERE round > 2 AND name = "lawrence sidbury" AND overall < 125
How many Picks have a Round larger than 2, and a Name of lawrence sidbury, and an Overall smaller than 125?
CREATE TABLE table_name_69 (pick__number VARCHAR, overall VARCHAR, round VARCHAR, name VARCHAR)
SELECT "Score" FROM table_71814 WHERE "Attendance" > '33,736' AND "Record" = '75-68'
What was the score of the Blue Jays game when their record was 75-68 and the attendance was larger than 33,736?
CREATE TABLE table_71814 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
SELECT director FROM table_26555737_1 WHERE english_title = "Salt of this Sea"
When salt of this sea is the english title who is the director?
CREATE TABLE table_26555737_1 (director VARCHAR, english_title VARCHAR)
SELECT MAX(pick__number) FROM table_name_32 WHERE name = "william middleton" AND round > 5
Which Pick # is the highest one that has a Name of william middleton, and a Round larger than 5?
CREATE TABLE table_name_32 (pick__number INTEGER, name VARCHAR, round VARCHAR)
SELECT AVG(velocity) FROM flight WHERE pilot = 'Thompson'
What is the velocity of the pilot named 'Thompson'?
CREATE TABLE operate_company ( id number, name text, type text, principal_activities text, incorporated_in text, group_equity_shareholding number ) CREATE TABLE flight ( id number, vehicle_flight_number text, date text, pilot text, velocity number, altitude number, airport_id number, company_id number ) CREATE TABLE airport ( id number, city text, country text, iata text, icao text, name text )
SELECT record_low FROM table_26558_1 WHERE precip = "1.71 in."
What was the record lowest temperature with a precipitation of 1.71 in.?
CREATE TABLE table_26558_1 (record_low VARCHAR, precip VARCHAR)
SELECT MIN(overall) FROM table_name_33 WHERE position = "offensive tackle"
Which Overall is the lowest one that has a Position of offensive tackle?
CREATE TABLE table_name_33 (overall INTEGER, position VARCHAR)