answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT style FROM table_name_59 WHERE choreographer = "luda and oliver"
What is the Style of the dance by Choreographer Luda and Oliver?
CREATE TABLE table_name_59 (style VARCHAR, choreographer VARCHAR)
SELECT genre FROM table_27529608_21 WHERE age_s_ = "29-30"
What is the genre for the group with ages 29-30?
CREATE TABLE table_27529608_21 (genre VARCHAR, age_s_ VARCHAR)
SELECT MIN(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-28507' AND patient.hospitaldischargetime IS NULL)) AND intakeoutput.celllabel = 'urine' AND intakeoutput.cellpath LIKE '%output%' GROUP BY STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime)
what was the daily minimum amount of urine given to patient 013-28507 in their current hospital encounter?
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime 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 diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) 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 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 cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time )
SELECT results FROM table_name_44 WHERE choreographer = "kelly aykers"
What is the Result of the dance Choreographed by Kelly Aykers?
CREATE TABLE table_name_44 (results VARCHAR, choreographer VARCHAR)
SELECT age_s_ FROM table_27529608_21 WHERE act = "Rapper"
What is the age of the act who is a rapper?
CREATE TABLE table_27529608_21 (age_s_ VARCHAR, act VARCHAR)
SELECT p.CreationDate, CASE WHEN (2 = p.PostTypeId) THEN 'Answer' ELSE 'Question' END AS PostType, p.Score, CASE WHEN (2 = p.PostTypeId) THEN t.Title ELSE p.Title END AS QuestionTitle, p.Body, p.Id AS "post_link" FROM Posts AS p LEFT OUTER JOIN Posts AS t ON (p.ParentId = t.Id) WHERE 1 = 1 AND p.CreationDate >= DATEADD(DAY, -45, GETDATE()) AND 5 <= p.Score AND (((2 = p.PostTypeId) AND SUBSTRING(t.Title, 1, 1) != UPPER(SUBSTRING(t.Title, 1, 1))) OR ((1 = p.PostTypeId) AND SUBSTRING(p.Title, 1, 1) != UPPER(SUBSTRING(p.Title, 1, 1)))) ORDER BY p.Id DESC
Posts that start with a lower case letter.
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description 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 Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE 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 PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name 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 PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount 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 ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number )
SELECT style FROM table_name_12 WHERE results = "safe" AND choreographer = "nacho pop"
What is the Style of the dance Choreographed by Nacho Pop with result of safe?
CREATE TABLE table_name_12 (style VARCHAR, results VARCHAR, choreographer VARCHAR)
SELECT hometown FROM table_27529608_21 WHERE name_name_of_act = "PLUtonic"
What is the hometown of Plutonic?
CREATE TABLE table_27529608_21 (hometown VARCHAR, name_name_of_act VARCHAR)
SELECT COUNT(written_by) FROM table_27155243_4 WHERE episode__number = 3
How many items appear in the written by column in episode 3?
CREATE TABLE table_27155243_4 ( written_by VARCHAR, episode__number VARCHAR )
SELECT AVG(rank) FROM table_name_18 WHERE total > 2 AND gold = 21 AND bronze > 12
What is the rank with a higher than 2 total, 21 gold and more than 12 bronze?
CREATE TABLE table_name_18 (rank INTEGER, bronze VARCHAR, total VARCHAR, gold VARCHAR)
SELECT COUNT(semi_final__week_) FROM table_27529608_21 WHERE hometown = "Pittsburgh, Pennsylvania"
How many semi-final weeks are there for acts from Pittsburgh, Pennsylvania?
CREATE TABLE table_27529608_21 (semi_final__week_ VARCHAR, hometown VARCHAR)
SELECT high_points FROM table_13762472_5 WHERE record = "24-17"
Who had the high point total when the team was 24-17?
CREATE TABLE table_13762472_5 ( high_points VARCHAR, record VARCHAR )
SELECT SUM(gold) FROM table_name_74 WHERE silver > 1 AND nation = "germany"
How many golds does Germany have with more than 1 silver?
CREATE TABLE table_name_74 (gold INTEGER, silver VARCHAR, nation VARCHAR)
SELECT margin_of_victory FROM table_275162_1 WHERE location = "Lake Forest, Illinois"
What was the margin of victory for the event in lake forest, illinois?
CREATE TABLE table_275162_1 (margin_of_victory VARCHAR, location VARCHAR)
SELECT sunday_sōl__sun_ FROM table_1277350_1 WHERE friday_venus__venus_ = "vernes"
what's the sunday s l (sun) with friday venus (venus) being vernes
CREATE TABLE table_1277350_1 ( sunday_sōl__sun_ VARCHAR, friday_venus__venus_ VARCHAR )
SELECT COUNT(round) FROM table_name_87 WHERE pick = 20
What is the total number of rounds of the player with a pick of 20?
CREATE TABLE table_name_87 (round VARCHAR, pick VARCHAR)
SELECT to_par FROM table_275162_1 WHERE player = "Zach Johnson"
What was zach johnson's score to par?
CREATE TABLE table_275162_1 (to_par VARCHAR, player VARCHAR)
SELECT date_of_transaction, SUM(share_count) FROM Transactions ORDER BY SUM(share_count) DESC
Bin all date of transactions into the weekday interval, and sum the share count of each bin Return the result using a bar chart, list in descending by the y axis please.
CREATE TABLE Purchases ( purchase_transaction_id INTEGER, purchase_details VARCHAR(255) ) CREATE TABLE Sales ( sales_transaction_id INTEGER, sales_details VARCHAR(255) ) CREATE TABLE Ref_Transaction_Types ( transaction_type_code VARCHAR(10), transaction_type_description VARCHAR(80) ) CREATE TABLE Lots ( lot_id INTEGER, investor_id INTEGER, lot_details VARCHAR(255) ) CREATE TABLE Transactions ( transaction_id INTEGER, investor_id INTEGER, transaction_type_code VARCHAR(10), date_of_transaction DATETIME, amount_of_transaction DECIMAL(19,4), share_count VARCHAR(40), other_details VARCHAR(255) ) CREATE TABLE Transactions_Lots ( transaction_id INTEGER, lot_id INTEGER ) CREATE TABLE Investors ( investor_id INTEGER, Investor_details VARCHAR(255) )
SELECT player FROM table_name_15 WHERE draft = 1971 AND pick > 7
Who is the player from the 1971 draft with a pick greater than 7?
CREATE TABLE table_name_15 (player VARCHAR, draft VARCHAR, pick VARCHAR)
SELECT score FROM table_275162_1 WHERE course = "Bellerive country Club"
What was the winning score at bellerive country club?
CREATE TABLE table_275162_1 (score VARCHAR, course VARCHAR)
SELECT away_team FROM table_name_72 WHERE venue = "glenferrie oval"
What is the name of the away team with glenferrie oval venue?
CREATE TABLE table_name_72 ( away_team VARCHAR, venue VARCHAR )
SELECT COUNT(premier) FROM table_name_67 WHERE second = 55
What is the total number of Premier, when Second is "55"?
CREATE TABLE table_name_67 (premier VARCHAR, second VARCHAR)
SELECT COUNT(course) FROM table_275162_1 WHERE location = "Carmel, Indiana"
How many courses are located in carmel, indiana?
CREATE TABLE table_275162_1 (course VARCHAR, location VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "AMBI5"
provide the number of patients whose drug code is ambi5?
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text )
SELECT COUNT(second) FROM table_name_5 WHERE first > 18 AND season = "1992-93" AND premier > 16
What is the total number of Second, when First is greater than 18, when Season is 1992-93, and when Premier is greater than 16?
CREATE TABLE table_name_5 (second VARCHAR, premier VARCHAR, first VARCHAR, season VARCHAR)
SELECT COUNT(status) FROM table_27514362_7 WHERE entrant = "James Finch"
How many status figures does James Finch have?
CREATE TABLE table_27514362_7 (status VARCHAR, entrant VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND diagnoses.icd9_code = "70703"
give me the number of patients whose admission type is elective and diagnoses icd9 code is 70703?
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 MIN(total) FROM table_name_2 WHERE second = 55
What is the lowest Total, when Second is "55"?
CREATE TABLE table_name_2 (total INTEGER, second VARCHAR)
SELECT car_make FROM table_27514362_7 WHERE driver = "Sterling Marlin"
What is the car make for Sterling Marlin?
CREATE TABLE table_27514362_7 (car_make VARCHAR, driver VARCHAR)
SELECT elevator FROM table_name_89 WHERE elevated = "april 12, 1281" AND nationality = "french" AND elector = "jean cholet"
Which Elevator has Elevated of april 12, 1281, a Nationality of french, and an Elector of jean cholet?
CREATE TABLE table_name_89 ( elevator VARCHAR, elector VARCHAR, elevated VARCHAR, nationality VARCHAR )
SELECT MAX(total) FROM table_name_23 WHERE season = "1996-97" AND second < 33
What is the highest Total, when Season is "1996-97", and when Second is less than 33?
CREATE TABLE table_name_23 (total INTEGER, season VARCHAR, second VARCHAR)
SELECT pos FROM table_27514362_7 WHERE car_make = "Pontiac" AND driver = "Bobby Hamilton"
What is the finish position for cars by Pontiac driven by Bobby Hamilton?
CREATE TABLE table_27514362_7 (pos VARCHAR, car_make VARCHAR, driver VARCHAR)
SELECT first_year_aired FROM table_name_28 WHERE prize = "50,000"
What was the first year that had a prize of 50,000?
CREATE TABLE table_name_28 ( first_year_aired VARCHAR, prize VARCHAR )
SELECT SUM(second) FROM table_name_1 WHERE total < 70 AND premier < 20 AND first > 18
What is the sum of Second, when Total is less than 70, when Premier is less than 20, and when First is greater than 18?
CREATE TABLE table_name_1 (second INTEGER, first VARCHAR, total VARCHAR, premier VARCHAR)
SELECT contestant FROM table_27515452_3 WHERE sizes = "33-23-36"
who are the participants that wear clothing in 33-23-36
CREATE TABLE table_27515452_3 (contestant VARCHAR, sizes VARCHAR)
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Price DESC
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the sum of price , and group by attribute name, and order y axis in descending order.
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
SELECT season FROM table_name_54 WHERE goals = "27" AND points = "58"
In what season were there 27 goals and 58 points?
CREATE TABLE table_name_54 (season VARCHAR, goals VARCHAR, points VARCHAR)
SELECT MAX(age) FROM table_27515452_3 WHERE hometown = "Veraguas"
what is the oldest and lives in veraguas
CREATE TABLE table_27515452_3 (age INTEGER, hometown VARCHAR)
SELECT "Status" FROM table_77853 WHERE "Floors" > '28' AND "Year" = '2013'
What is the status of the building with more than 28 floor and a year of 2013?
CREATE TABLE table_77853 ( "Building" text, "Height" text, "Floors" real, "Year" real, "Status" text )
SELECT points FROM table_name_38 WHERE goals = "28" AND games = "47"
What are the points in the season with 47 games and 28 goals?
CREATE TABLE table_name_38 (points VARCHAR, goals VARCHAR, games VARCHAR)
SELECT hometown FROM table_27515452_3 WHERE contestant = "Marelissa Him"
where is the participant marelissa him from
CREATE TABLE table_27515452_3 (hometown VARCHAR, contestant VARCHAR)
SELECT ".308 Winchester cartridge type" FROM table_17497 WHERE "300 m group (mm)" = '38'
What are all the .308 Winchester cartridge types with 38 for the 300 m group (mm)
CREATE TABLE table_17497 ( ".308 Winchester cartridge type" text, "100 m group (mm)" text, "100 m group ( MOA )" text, "300 m group (mm)" text, "300 m group ( MOA )" text )
SELECT goals FROM table_name_29 WHERE games = "47"
How many goals were there in game 47?
CREATE TABLE table_name_29 (goals VARCHAR, games VARCHAR)
SELECT agency FROM table_27515452_3 WHERE sizes = "33-23-36"
which company has a person that can wear clothing in 33-23-36
CREATE TABLE table_27515452_3 (agency VARCHAR, sizes VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2179.0" AND prescriptions.formulary_drug_cd = "METH10SY"
provide the number of patients whose year of death is less than or equal to 2179 and drug code is meth10sy?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE 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 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 SUM(snatch) FROM table_name_79 WHERE total__kg_ < 257
How much Snatch has a Total (kg) smaller than 257?
CREATE TABLE table_name_79 (snatch INTEGER, total__kg_ INTEGER)
SELECT height FROM table_27515452_3 WHERE sizes = "33-24-35"
how tall is someone who is able to wear 33-24-35
CREATE TABLE table_27515452_3 (height VARCHAR, sizes VARCHAR)
SELECT results FROM table_name_36 WHERE seed = "#12" AND year < 1996
What Results has a Seed #12 and a Year that's smaller than 1996
CREATE TABLE table_name_36 ( results VARCHAR, seed VARCHAR, year VARCHAR )
SELECT MIN(snatch) FROM table_name_25 WHERE clean_ & _jerk = 180 AND bodyweight < 69.83
Which Snatch has a Clean & Jerk of 180, and a Bodyweight smaller than 69.83?
CREATE TABLE table_name_25 (snatch INTEGER, bodyweight VARCHAR, clean_ VARCHAR, _jerk VARCHAR)
SELECT MIN(total_points) FROM table_27533947_1 WHERE best_winning_average = "7.3-71"
If the best winning average is 7.3-71, what are the total points?
CREATE TABLE table_27533947_1 (total_points INTEGER, best_winning_average VARCHAR)
SELECT COUNT("nation") FROM table_204_311 WHERE "bronze" = 1
how many countries total only received one bronze medal in the 1987 championship ?
CREATE TABLE table_204_311 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
SELECT COUNT(military_deaths) FROM table_name_41 WHERE military_and_or_civilian_wounded = "78" AND total_deaths > 27
What is the total number of military deaths when there are 78 military and/or civilian wounded and more than 27 total deaths?
CREATE TABLE table_name_41 (military_deaths VARCHAR, military_and_or_civilian_wounded VARCHAR, total_deaths VARCHAR)
SELECT games_lost FROM table_27533947_1 WHERE best_run = 138
if the best run was 138, what is the amount of games lost?
CREATE TABLE table_27533947_1 (games_lost VARCHAR, best_run VARCHAR)
SELECT 2 AS nd_runner_up FROM table_name_59 WHERE season_number = "season 7"
Name the 2nd runner-up for season 7
CREATE TABLE table_name_59 ( season_number VARCHAR )
SELECT AVG(military_deaths) FROM table_name_22 WHERE civilian_deaths__including_foreigners_ < 38 AND military_and_or_civilian_wounded = "33"
What is the average number of military deaths when there are fewer than 38 civilian deaths (including foreigners) and 33 military and/or civilian wounded?
CREATE TABLE table_name_22 (military_deaths INTEGER, civilian_deaths__including_foreigners_ VARCHAR, military_and_or_civilian_wounded VARCHAR)
SELECT best_winning_average FROM table_27533947_1 WHERE games_won = 5
If the games won are 5, what is the best winning average?
CREATE TABLE table_27533947_1 (best_winning_average VARCHAR, games_won VARCHAR)
SELECT "Launched" FROM table_15688 WHERE "Name" = 'harusame'
What is the launched date for the Harusame ship?
CREATE TABLE table_15688 ( "Kanji" text, "Name" text, "Builder" text, "Laid down" text, "Launched" text, "Completed" text )
SELECT total_casualties FROM table_name_47 WHERE total_deaths = 12 AND military_deaths > 1
What is the total number of casualties when there are 12 total deaths and more than 1 military death?
CREATE TABLE table_name_47 (total_casualties VARCHAR, total_deaths VARCHAR, military_deaths VARCHAR)
SELECT MIN(total_points) FROM table_27533947_1 WHERE players = "William Jakes"
If the player is William Jakes, what are the total points?
CREATE TABLE table_27533947_1 (total_points INTEGER, players VARCHAR)
SELECT Id, Title FROM Posts WHERE Body LIKE '%grep%'
search for (possible) cat abuse.
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description 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 Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text, LastEditDate time, LastActivityDate time, Title text, Tags text, AnswerCount number, CommentCount number, FavoriteCount number, ClosedDate time, CommunityOwnedDate time, ContentLicense text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE 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 PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name 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 PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount 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 ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number )
SELECT total FROM table_name_13 WHERE score_points = "11"
which Total has a Score points of 11?
CREATE TABLE table_name_13 (total VARCHAR, score_points VARCHAR)
SELECT players FROM table_27533947_1 WHERE grand_average = "12.76-202"
If the grand average is 12.76-202, who is the player?
CREATE TABLE table_27533947_1 (players VARCHAR, grand_average VARCHAR)
SELECT "Home team score" FROM table_11180 WHERE "Venue" = 'windy hill'
How much was the score of the home team at windy hill?
CREATE TABLE table_11180 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT total FROM table_name_27 WHERE rank_points = "olympic bronze medalist"
Which Total has an olympic bronze medalist?
CREATE TABLE table_name_27 (total VARCHAR, rank_points VARCHAR)
SELECT COUNT(games_won) FROM table_27533947_1 WHERE best_winning_average = "20"
How many players had a best winning average of 20?
CREATE TABLE table_27533947_1 (games_won VARCHAR, best_winning_average VARCHAR)
SELECT MIN(laps) FROM table_name_68 WHERE driver = "graham hill"
What are the lowest laps of Graham Hill?
CREATE TABLE table_name_68 ( laps INTEGER, driver VARCHAR )
SELECT shooter FROM table_name_40 WHERE score_points = "olympic silver medalist"
Which Shooter has Score points of olympic silver medalist?
CREATE TABLE table_name_40 (shooter VARCHAR, score_points VARCHAR)
SELECT record FROM table_27537518_4 WHERE date = "October 22"
What was the October 22 record?
CREATE TABLE table_27537518_4 (record VARCHAR, date VARCHAR)
SELECT "Series Ep." FROM table_38028 WHERE "Segment C" = 'stetson hats (part 1)'
What series episode has stetson hats (part 1) under segment C?
CREATE TABLE table_38028 ( "Series Ep." text, "Episode" real, "Netflix" text, "Segment A" text, "Segment B" text, "Segment C" text, "Segment D" text )
SELECT rank_points FROM table_name_75 WHERE event = "wc beijing" AND score_points = "13" AND total = "18"
Name the Rank points which have an Event of wc beijing, and Score points of 13, and a Total of 18?
CREATE TABLE table_name_75 (rank_points VARCHAR, total VARCHAR, event VARCHAR, score_points VARCHAR)
SELECT MAX(attendance) FROM table_27537518_4 WHERE score = "6-4"
What was the 6-4 score's maximum attendance?
CREATE TABLE table_27537518_4 (attendance INTEGER, score VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.long_title = "Suicide and self-inflicted poisoning by analgesics, antipyretics, and antirheumatics"
provide the number of patients whose death status is 0 and diagnoses long title is suicide and self-inflicted poisoning by analgesics, antipyretics, and antirheumatics?
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 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 film_title_used_in_nomination FROM table_name_91 WHERE original_title = "cilvēka bērns"
What is the Film title used in nomination of Cilvēka Bērns?
CREATE TABLE table_name_91 (film_title_used_in_nomination VARCHAR, original_title VARCHAR)
SELECT score FROM table_27537518_4 WHERE game = 1
What was the score for game #1?
CREATE TABLE table_27537518_4 (score VARCHAR, game VARCHAR)
SELECT COUNT(attendance) FROM table_name_28 WHERE date = "april 14"
How many attended the game on april 14?
CREATE TABLE table_name_28 ( attendance VARCHAR, date VARCHAR )
SELECT original_title FROM table_name_61 WHERE year__ceremony_ = "1992 (65th)"
What is the Original Title of the 1992 (65th) Film
CREATE TABLE table_name_61 (original_title VARCHAR, year__ceremony_ VARCHAR)
SELECT record FROM table_27537518_4 WHERE date = "October 16"
What was the record for the October 16 game?
CREATE TABLE table_27537518_4 (record VARCHAR, date VARCHAR)
SELECT ncbi_accession_number__mrna_protein_ FROM table_name_99 WHERE protein_identity = "69%"
What NCBI Accession Number (mRNA/Protein) has a Protein Identity of 69%?
CREATE TABLE table_name_99 ( ncbi_accession_number__mrna_protein_ VARCHAR, protein_identity VARCHAR )
SELECT director FROM table_name_55 WHERE film_title_used_in_nomination = "gulf stream under the iceberg"
What is the Director of Gulf Stream Under the Iceberg?
CREATE TABLE table_name_55 (director VARCHAR, film_title_used_in_nomination VARCHAR)
SELECT record FROM table_27537518_6 WHERE first_star = "J. Oduya"
What was the record in the game whose first star was J. Oduya?
CREATE TABLE table_27537518_6 (record VARCHAR, first_star VARCHAR)
SELECT height FROM table_name_59 WHERE current_club = "alta gestión fuenlabrada"
What is the height of the player who currently plays for Alta Gesti n Fuenlabrada?
CREATE TABLE table_name_59 ( height VARCHAR, current_club VARCHAR )
SELECT original_title FROM table_name_36 WHERE director = "aigars grauba"
What is the Original Title of the movie directed by Aigars Grauba?
CREATE TABLE table_name_36 (original_title VARCHAR, director VARCHAR)
SELECT score FROM table_27537518_6 WHERE first_star = "O. Pavelec"
What was the score of the game whose first star was O. Pavelec?
CREATE TABLE table_27537518_6 (score VARCHAR, first_star VARCHAR)
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', prescriptions.startdate)) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40707 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'd10w' ORDER BY prescriptions.startdate LIMIT 1
how many days is it since patient 40707's first d10w prescription in the current hospital visit?
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_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_icd_diagnoses ( 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 chartevents ( row_id number, subject_id number, hadm_id number, icustay_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 ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime 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 patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) 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 d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) 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 labevents ( row_id number, subject_id number, hadm_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 )
SELECT british FROM table_name_55 WHERE letter = "o /oʊ/"
What is the British letter with o /oʊ/?
CREATE TABLE table_name_55 (british VARCHAR, letter VARCHAR)
SELECT decision FROM table_27537518_6 WHERE date = "December 26"
Who made the decision in the game played on December 26?
CREATE TABLE table_27537518_6 (decision VARCHAR, date VARCHAR)
SELECT name, AVG(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.target_u_id GROUP BY T2.target_u_id ORDER BY name
Find each target user's name and average trust score Visualize by bar chart, I want to show by the x axis in ascending.
CREATE TABLE review ( a_id integer, u_id integer, i_id integer, rating integer, rank integer ) CREATE TABLE useracct ( u_id integer, name varchar(128) ) CREATE TABLE trust ( source_u_id integer, target_u_id integer, trust integer ) CREATE TABLE item ( i_id integer, title varchar(20) )
SELECT letter FROM table_name_40 WHERE british = "aɪ"
Which letter has the British aɪ?
CREATE TABLE table_name_40 (letter VARCHAR, british VARCHAR)
SELECT location FROM table_27537518_6 WHERE attendance = 10056
Where was the game seen by 10056 people played?
CREATE TABLE table_27537518_6 (location VARCHAR, attendance VARCHAR)
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT_RECORDalias0.student_id = 1) AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.department = 'BCS' AND COURSE_1.number = 232
For BCS 232 what are the classes needed to be taken ?
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_project varchar, has_final_exam varchar, textbook varchar, class_address varchar, allow_audit varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_projects varchar, has_exams varchar, num_reviews int, clarity_score int, easiness_score int, helpfulness_score int ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments int, respected int, participation int, heavy_reading int, tough_grader int, hilarious int, would_take_again int, good_lecture int, no_skip int ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar )
SELECT american FROM table_name_65 WHERE australian = "əʉ"
What does American have if Australia has əʉ?
CREATE TABLE table_name_65 (american VARCHAR, australian VARCHAR)
SELECT first_star FROM table_27537518_6 WHERE record = "17-11-5"
Who was the first star of the game with record of 17-11-5?
CREATE TABLE table_27537518_6 (first_star VARCHAR, record VARCHAR)
SELECT Project_ID, COUNT(*) FROM Documents GROUP BY Project_ID
Show me a scatter chart for how many documents correspond with each project id?
CREATE TABLE Documents ( Document_ID INTEGER, Document_Type_Code CHAR(15), Project_ID INTEGER, Document_Date DATETIME, Document_Name VARCHAR(255), Document_Description VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Projects ( Project_ID INTEGER, Project_Details VARCHAR(255) ) CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15), Budget_Type_Description VARCHAR(255) ) CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARCHAR(255) ) CREATE TABLE Accounts ( Account_ID INTEGER, Statement_ID INTEGER, Account_Details VARCHAR(255) ) CREATE TABLE Statements ( Statement_ID INTEGER, Statement_Details VARCHAR(255) )
SELECT british FROM table_name_10 WHERE american = "ə"
What is the British letter if American is ə?
CREATE TABLE table_name_10 (british VARCHAR, american VARCHAR)
SELECT decision FROM table_27537518_6 WHERE first_star = "V. Lecavalier"
Who made the decisions in the game whose first star was V. Lecavalier?
CREATE TABLE table_27537518_6 (decision VARCHAR, first_star VARCHAR)
SELECT "Innings" FROM table_30793 WHERE "BBI" = '4/26'
how many innings had bbi 4/26?
CREATE TABLE table_30793 ( "Player" text, "Matches" real, "Innings" real, "Wickets" real, "Average" text, "BBI" text, "BBM" text, "5wi" real, "10wi" real )
SELECT australian FROM table_name_67 WHERE british = "ɪ" AND letter = "æ /i/"
What is the Australian letter with a British of ɪ and a letter of æ /i/??
CREATE TABLE table_name_67 (australian VARCHAR, british VARCHAR, letter VARCHAR)
SELECT score FROM table_27537518_7 WHERE record = "22-16-6"
What was the final score the game where the Thrashers over-all record went to 22-16-6?
CREATE TABLE table_27537518_7 (score VARCHAR, record VARCHAR)
SELECT "Winner" FROM table_70131 WHERE "Points classification" = 'tony rominger' AND "Stage" = '17'
Which winner has a points classification of Tony Rominger at stage 17?
CREATE TABLE table_70131 ( "Stage" text, "Winner" text, "General classification" text, "Points classification" text, "Mountains classification" text, "Trofeo Fast Team" text )
SELECT away_team FROM table_name_74 WHERE home_team = "sheffield united"
What is sheffield united's away team?
CREATE TABLE table_name_74 (away_team VARCHAR, home_team VARCHAR)