answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT COUNT(format) FROM table_20174050_24 WHERE author = "Day, Martin Martin Day"
how many formats of books authored by day, martin martin day
CREATE TABLE table_20174050_24 (format VARCHAR, author VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME" AND demographic.days_stay > "14"
among patients who had a hospital stay for more than 14 days, how many of them were discharged to home?
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
SELECT date_of_birth__age_ FROM table_name_57 WHERE caps = "3" AND name = "gabriel quak jun yi"
What is the date of birth and age of Gabriel Quak Jun Yi with 3 caps?
CREATE TABLE table_name_57 (date_of_birth__age_ VARCHAR, caps VARCHAR, name VARCHAR)
SELECT COUNT(cfl_team) FROM table_20170644_5 WHERE college = "Laval"
How many players were drafted from laval?
CREATE TABLE table_20170644_5 (cfl_team VARCHAR, college VARCHAR)
SELECT Name, COUNT(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.Storm_ID = T2.Storm_ID GROUP BY T1.Storm_ID
List the name for storms and the number of affected regions for each storm. Plot them as pie chart.
CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Number_Deaths int ) CREATE TABLE affected_region ( Region_id int, Storm_ID int, Number_cit...
SELECT club FROM table_name_80 WHERE name = "hafiz abu sujad"
Which club is associated with Hafiz Abu Sujad?
CREATE TABLE table_name_80 (club VARCHAR, name VARCHAR)
SELECT player FROM table_20170644_5 WHERE college = "Montreal"
What player went to montreal college?
CREATE TABLE table_20170644_5 (player VARCHAR, college VARCHAR)
SELECT "Party" FROM table_18645 WHERE "First elected" = '1919'
What was the party that was frist elected in 1919?
CREATE TABLE table_18645 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
SELECT SUM(rank) FROM table_name_45 WHERE nation = "west germany" AND bronze > 0
What is the sum of a rank whose nation is West Germany and has bronze larger than 0?
CREATE TABLE table_name_45 (rank INTEGER, nation VARCHAR, bronze VARCHAR)
SELECT player FROM table_20170644_5 WHERE cfl_team = "Hamilton Tiger-Cats"
What player(s) drafted by the hamilton tiger-cats?
CREATE TABLE table_20170644_5 (player VARCHAR, cfl_team VARCHAR)
SELECT lees_team FROM table_23575917_4 WHERE episode = "4x04"
Who is the Lees Team for episode 4x04?
CREATE TABLE table_23575917_4 ( lees_team VARCHAR, episode VARCHAR )
SELECT COUNT(bronze) FROM table_name_52 WHERE total < 3 AND nation = "poland" AND rank > 4
What is the total of Bronze with a total smaller than 3, and a nation of Poland, and a rank larger than 4?
CREATE TABLE table_name_52 (bronze VARCHAR, rank VARCHAR, total VARCHAR, nation VARCHAR)
SELECT position FROM table_20170644_5 WHERE cfl_team = "Montreal Alouettes"
What position(s) drafted by the montreal alouettes?
CREATE TABLE table_20170644_5 (position VARCHAR, cfl_team VARCHAR)
SELECT DISTINCT (catalog_entry_name) FROM catalog_contents
What are all the catalog entry names?
CREATE TABLE attribute_definitions ( attribute_id number, attribute_name text, attribute_data_type text ) CREATE TABLE catalog_contents_additional_attributes ( catalog_entry_id number, catalog_level_number number, attribute_id number, attribute_value text ) CREATE TABLE catalogs ( cata...
SELECT money_spent, _2q FROM table_name_69 WHERE total_receipts = "$1,117,566"
How much money was spent in 2Q when the total receipts were $1,117,566?
CREATE TABLE table_name_69 (money_spent VARCHAR, _2q VARCHAR, total_receipts VARCHAR)
SELECT company FROM table_20174050_23 WHERE author = "Pinborough, Sarah Sarah Pinborough"
which company uses pinborough, sarah sarah pinborough?
CREATE TABLE table_20174050_23 (company VARCHAR, author VARCHAR)
SELECT MIN(money___) AS $__ FROM table_name_25 WHERE score = 70 - 68 - 73 - 68 = 279
Which Money has a Score of 70-68-73-68=279?
CREATE TABLE table_name_25 ( money___ INTEGER, score VARCHAR )
SELECT money_raised, _2q FROM table_name_28 WHERE total_receipts = "$63,075,927"
How much money was raised in the 2Q when the total receipts were $63,075,927?
CREATE TABLE table_name_28 (money_raised VARCHAR, _2q VARCHAR, total_receipts VARCHAR)
SELECT reader FROM table_20174050_23 WHERE title = "Department X"
who the reader of title department x?
CREATE TABLE table_20174050_23 (reader VARCHAR, title VARCHAR)
SELECT team FROM table_name_88 WHERE class = "500cc" AND rank = "16th"
Which team has a class of 500cc and rank of 16th?
CREATE TABLE table_name_88 ( team VARCHAR, class VARCHAR, rank VARCHAR )
SELECT AVG(laps) FROM table_name_4 WHERE driver = "peter gethin" AND grid < 25
When the driver peter gethin has a grid less than 25, what is the average number of laps?
CREATE TABLE table_name_4 (laps INTEGER, driver VARCHAR, grid VARCHAR)
SELECT COUNT(notes) FROM table_20174050_23 WHERE reader = "Varma, Idria Indira Varma"
how many notes were read by reader varma, idria indira varma?
CREATE TABLE table_20174050_23 (notes VARCHAR, reader VARCHAR)
SELECT COUNT(played) FROM table_18505065_1 WHERE against = 175
How many games had a deficit of 175?
CREATE TABLE table_18505065_1 ( played VARCHAR, against VARCHAR )
SELECT AVG(laps) FROM table_name_96 WHERE time_retired = "+ 2 laps" AND driver = "mike hailwood" AND grid > 12
When the driver mike hailwood has a grid greater than 12 and a Time/Retired of + 2 laps, what is the average number of laps?
CREATE TABLE table_name_96 (laps INTEGER, grid VARCHAR, time_retired VARCHAR, driver VARCHAR)
SELECT reader FROM table_20174050_23 WHERE format = "Download/CD" AND author = "Lidster, Joseph Joseph Lidster"
who is the reader on the download/cd format of the title written by author lidster, joseph joseph lidster?
CREATE TABLE table_20174050_23 (reader VARCHAR, format VARCHAR, author VARCHAR)
SELECT average_ratings FROM table_18539834_2 WHERE tv_station = "TV Asahi"
What is the average rating for tv asahi?
CREATE TABLE table_18539834_2 ( average_ratings VARCHAR, tv_station VARCHAR )
SELECT home_team AS score FROM table_name_43 WHERE away_team = "south melbourne"
Which team was the home team when playing South Melbourne?
CREATE TABLE table_name_43 (home_team VARCHAR, away_team VARCHAR)
SELECT landesliga_mitte FROM table_20181270_3 WHERE landesliga_süd = "FC Gundelfingen" AND landesliga_nord = "VfL Frohnlach"
Name the landesliga mitte for fc gundelfingen and vfl frohnlach
CREATE TABLE table_20181270_3 (landesliga_mitte VARCHAR, landesliga_süd VARCHAR, landesliga_nord VARCHAR)
SELECT original_air_date FROM table_29920800_1 WHERE written_by = "Liz Feldman"
What is the original air date of the episode written by Liz Feldman?
CREATE TABLE table_29920800_1 ( original_air_date VARCHAR, written_by VARCHAR )
SELECT home_team AS score FROM table_name_48 WHERE away_team = "richmond"
What did the home team when they played Richmond?
CREATE TABLE table_name_48 (home_team VARCHAR, away_team VARCHAR)
SELECT landesliga_nord FROM table_20181270_3 WHERE landesliga_mitte = "Freier TuS Regensburg"
Name the landesliga nord for freier tus regensburg
CREATE TABLE table_20181270_3 (landesliga_nord VARCHAR, landesliga_mitte VARCHAR)
WITH test_posts AS (SELECT q.Id AS Id, q.CreationDate AS CreationDate FROM Posts AS q JOIN Posts AS a ON a.ParentId = q.Id WHERE q.AnswerCount > 2 UNION SELECT Id, CreationDate FROM Posts WHERE AnswerCount > 2) SELECT DATEADD(week, DATEDIFF(week, @epoch, CreationDate), @epoch) AS Week, COUNT(DISTINCT c.Id) AS Comments,...
Comments per week (questions with > 2 answers).
CREATE TABLE CloseReasonTypes ( 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 PostLinks ( Id number, Crea...
SELECT stage_reached FROM table_name_23 WHERE venue = "edmonton green"
What is the stage reached for venue edmonton green?
CREATE TABLE table_name_23 (stage_reached VARCHAR, venue VARCHAR)
SELECT landesliga_nord FROM table_20181270_3 WHERE landesliga_mitte = "ASV Neumarkt"
Name the landesliga nord for asv neumarkt
CREATE TABLE table_20181270_3 (landesliga_nord VARCHAR, landesliga_mitte VARCHAR)
SELECT "9:00" FROM table_40413 WHERE "8:30" = 'my thursday night movie'
What is 9:00, when 8:30 is 'My Thursday Night Movie'?
CREATE TABLE table_40413 ( "8:00" text, "8:30" text, "9:00" text, "9:30" text, "10:00" text )
SELECT AVG(round) FROM table_name_64 WHERE club_team = "garmisch-partenkirchen riessersee sc (germany 2)"
What is the average round for Club team of garmisch-partenkirchen riessersee sc (germany 2)?
CREATE TABLE table_name_64 (round INTEGER, club_team VARCHAR)
SELECT landesliga_mitte FROM table_20181270_3 WHERE bayernliga = "SV Türk Gücü München"
Name the landesliga mitte sv türk gücü münchen
CREATE TABLE table_20181270_3 (landesliga_mitte VARCHAR, bayernliga VARCHAR)
SELECT T2.party_name, COUNT(*) FROM member AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id
How many members are in each party?
CREATE TABLE member ( member_id number, member_name text, party_id text, in_office text ) CREATE TABLE region ( region_id number, region_name text, date text, label text, format text, catalogue text ) CREATE TABLE party_events ( event_id number, event_name text, par...
SELECT player FROM table_name_15 WHERE opponent = "st kilda" AND team = "richmond"
What richmond player played against st kilda?
CREATE TABLE table_name_15 (player VARCHAR, opponent VARCHAR, team VARCHAR)
SELECT landesliga_süd FROM table_20181270_3 WHERE bayernliga = "SG Quelle Fürth"
Name the landesliga sud for sg quelle fürth
CREATE TABLE table_20181270_3 (landesliga_süd VARCHAR, bayernliga VARCHAR)
SELECT "week" FROM table_203_730 WHERE "date" IS NULL
which week did they not have a match ?
CREATE TABLE table_203_730 ( id number, "week" number, "date" text, "opponent" text, "result" text, "attendance" number, "bye" text )
SELECT player FROM table_name_66 WHERE year = 2000
What player played in 2000?
CREATE TABLE table_name_66 (player VARCHAR, year VARCHAR)
SELECT oil_rig FROM table_20183474_1 WHERE place = "7th"
What's the oil rig of the song that ended on 7th place?
CREATE TABLE table_20183474_1 (oil_rig VARCHAR, place VARCHAR)
SELECT COUNT("Votes") FROM table_52367 WHERE "Seats" > '28'
What is the number of votes for the party which got more than 28 seats?
CREATE TABLE table_52367 ( "Party" text, "Leader" text, "Votes" real, "Percentage" text, "Seats" real )
SELECT year FROM table_name_77 WHERE opponent = "geelong" AND player = "john roberts"
What year for geelong player john roberts?
CREATE TABLE table_name_77 (year VARCHAR, opponent VARCHAR, player VARCHAR)
SELECT MIN(oil_rig) FROM table_20183474_1 WHERE draw = 9
What's the oil rig of the song with a draw number 9?
CREATE TABLE table_20183474_1 (oil_rig INTEGER, draw VARCHAR)
SELECT "Poor law union" FROM table_74468 WHERE "Townland" = 'Kilmaloda'
What is the poor law union of the Kilmaloda townland?
CREATE TABLE table_74468 ( "Townland" text, "Area( acres )" real, "Barony" text, "Civil parish" text, "Poor law union" text )
SELECT authority FROM table_name_7 WHERE roll = 40
What's the authority when the roll is 40?
CREATE TABLE table_name_7 (authority VARCHAR, roll VARCHAR)
SELECT MIN(press_jury) FROM table_20183474_1 WHERE artist = "Frank Aleksandersen"
How many press jury points did the song by Frank Aleksandersen get?
CREATE TABLE table_20183474_1 (press_jury INTEGER, artist VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "67" AND prescriptions.formulary_drug_cd = "NS451000"
count the number of patients whose age is less than 67 and drug code is ns451000?
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, ...
SELECT authority FROM table_name_79 WHERE roll < 234 AND area = "massey east"
What's the authority when the roll is less than 234 for the massey east area?
CREATE TABLE table_name_79 (authority VARCHAR, roll VARCHAR, area VARCHAR)
SELECT total_points FROM table_20183474_1 WHERE draw = 3
How many points did the song with a draw number 3 get?
CREATE TABLE table_20183474_1 (total_points VARCHAR, draw VARCHAR)
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the average of price , and group by attribute name.
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT roll FROM table_name_66 WHERE decile > 6 AND name = "summerland primary"
What's the roll for summerland primary when decile is over 6?
CREATE TABLE table_name_66 (roll VARCHAR, decile VARCHAR, name VARCHAR)
SELECT notes FROM table_20174050_7 WHERE reader = "Briggs, Nicholas Nicholas Briggs" AND title = "Paradox Lost"
If the title is Paradox Lost and the reader is Briggs, Nicholas Nicholas Briggs, what are all of the notes?
CREATE TABLE table_20174050_7 (notes VARCHAR, reader VARCHAR, title VARCHAR)
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-2205' AND patient.hospitaldischargetime IS NULL)) AND medication.drugn...
during the current hospital encounter patient 035-2205 had been prescribed ondansetron?
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, wa...
SELECT name FROM table_name_22 WHERE delivered = "1839/08"
What is the name where the delivered date is 1839/08?
CREATE TABLE table_name_22 (name VARCHAR, delivered VARCHAR)
SELECT release_date FROM table_20174050_7 WHERE title = "The Way Through the Woods"
If the title is The Way Through The Woods, what is the release date?
CREATE TABLE table_20174050_7 (release_date VARCHAR, title VARCHAR)
SELECT Participant_Details, Participant_ID FROM Participants
Bar chart x axis participant details y axis participant_id
CREATE TABLE Participants_in_Events ( Event_ID INTEGER, Participant_ID INTEGER ) CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15) ) CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREATE TABLE Eve...
SELECT original_us_air_date FROM table_name_80 WHERE original_canadian_air_date = "december 9, 2007"
What is the Original U.S. air-date for the Original Canadian air-date of december 9, 2007?
CREATE TABLE table_name_80 (original_us_air_date VARCHAR, original_canadian_air_date VARCHAR)
SELECT release_date FROM table_20174050_7 WHERE reader = "Syal, Meera Meera Syal"
If the reader is Syal, Meera Meera Syal, what was the release date?
CREATE TABLE table_20174050_7 (release_date VARCHAR, reader VARCHAR)
SELECT "Date of Birth (Age)" FROM table_56413 WHERE "Caps" = '11' AND "Position" = 'prop'
What is the date of birth of the player that has 11 caps and plays the prop position?
CREATE TABLE table_56413 ( "Player" text, "Position" text, "Date of Birth (Age)" text, "Caps" real, "Club/province" text )
SELECT original_canadian_air_date FROM table_name_98 WHERE director = "michael tolkin"
What is the Original Canadian air-date that was directed by Michael Tolkin?
CREATE TABLE table_name_98 (original_canadian_air_date VARCHAR, director VARCHAR)
SELECT MAX(divisional_titles) FROM table_20190834_1 WHERE enrollment = 30049
What is the most divisional titles won by a school with an enrollment of 30049?
CREATE TABLE table_20190834_1 (divisional_titles INTEGER, enrollment VARCHAR)
SELECT Country, COUNT(Country) FROM mountain WHERE Height > 5000 GROUP BY Country
What are the countries of mountains with height bigger than 5000, and count them by a bar chart
CREATE TABLE mountain ( Mountain_ID int, Name text, Height real, Prominence real, Range text, Country text ) CREATE TABLE climber ( Climber_ID int, Name text, Country text, Time text, Points real, Mountain_ID int )
SELECT original_canadian_air_date FROM table_name_25 WHERE director = "mark rydell"
What was the Original Canadian air-date for the episode directed by mark rydell?
CREATE TABLE table_name_25 (original_canadian_air_date VARCHAR, director VARCHAR)
SELECT MAX(enrollment) FROM table_20190834_1 WHERE team_name = "Sooners"
What is the maximum enrollment of the Sooners?
CREATE TABLE table_20190834_1 (enrollment INTEGER, team_name VARCHAR)
SELECT patients.gender FROM patients WHERE patients.subject_id = 8204
what are patient 8204's genders?
CREATE TABLE diagnoses_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, ...
SELECT home_team FROM table_name_71 WHERE venue = "junction oval"
Which home team's venue is junction oval?
CREATE TABLE table_name_71 (home_team VARCHAR, venue VARCHAR)
SELECT MIN(enrollment) FROM table_20190834_1 WHERE team_name = "Cyclones"
What is the minimum enrollment of the cyclones?
CREATE TABLE table_20190834_1 (enrollment INTEGER, team_name VARCHAR)
SELECT series AS premiere FROM table_15823956_1 WHERE series = "Pilot"
When was series premiere on the pilot episode
CREATE TABLE table_15823956_1 ( series VARCHAR )
SELECT venue FROM table_name_56 WHERE away_team = "melbourne"
Which venue was melbourne the away team of?
CREATE TABLE table_name_56 (venue VARCHAR, away_team VARCHAR)
SELECT result FROM table_20193855_2 WHERE book_title = "Firelands"
What is the result of the book title firelands?
CREATE TABLE table_20193855_2 (result VARCHAR, book_title VARCHAR)
SELECT location FROM table_21330550_2 WHERE time = "9:30PM"
Which location has a time of 9:30pm?
CREATE TABLE table_21330550_2 ( location VARCHAR, time VARCHAR )
SELECT home_team AS score FROM table_name_39 WHERE away_team = "footscray"
What was the home teams score against the away team footscray?
CREATE TABLE table_name_39 (home_team VARCHAR, away_team VARCHAR)
SELECT year FROM table_20193855_2 WHERE book_title = "The Ordinary"
Which year is the book title the ordinary?
CREATE TABLE table_20193855_2 (year VARCHAR, book_title VARCHAR)
SELECT nationality FROM table_name_79 WHERE position = "right wing" AND pick__number = "20"
What Nationality has a Position of right wing, with a #20 pick?
CREATE TABLE table_name_79 ( nationality VARCHAR, position VARCHAR, pick__number VARCHAR )
SELECT AVG(long) FROM table_name_18 WHERE player = "ramon richardson" AND avg > 5.5
What is the average long that Ramon Richardson played and an average greater than 5.5?
CREATE TABLE table_name_18 (long INTEGER, player VARCHAR, avg VARCHAR)
SELECT publisher FROM table_20193855_2 WHERE book_title = "Daughters of an Emerald Dusk"
Who is the publisher of the book titled daughters of an emerald dusk?
CREATE TABLE table_20193855_2 (publisher VARCHAR, book_title VARCHAR)
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'signs and symptom...
what were the five most commonly given laboratory tests for patients who were previously diagnosed with signs and symptoms of sepsis (sirs) - due to infectious process with organ dysfunction within the same hospital visit, since 2 years ago?
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, wa...
SELECT MIN(yards) FROM table_name_56 WHERE avg < 3
Which has and average less than 3 and the lowest yards?
CREATE TABLE table_name_56 (yards INTEGER, avg INTEGER)
SELECT MAX(year) FROM table_20193855_2 WHERE author_s__or_editor_s_ = "Delia Sherman"
In which year were the authors or editors Delia Sherman?
CREATE TABLE table_20193855_2 (year INTEGER, author_s__or_editor_s_ VARCHAR)
SELECT team FROM table_22883210_11 WHERE series = "1-1"
When 1-1 is the series who is the team?
CREATE TABLE table_22883210_11 ( team VARCHAR, series VARCHAR )
SELECT AVG(rec) FROM table_name_2 WHERE yards = 40 AND avg > 10
What is the average rec that is greater than 10 and has 40 yards?
CREATE TABLE table_name_2 (rec INTEGER, yards VARCHAR, avg VARCHAR)
SELECT COUNT(author_s__or_editor_s_) FROM table_20193855_2 WHERE book_title = "Elf Child"
How many authors or editors are there for the book title elf child?
CREATE TABLE table_20193855_2 (author_s__or_editor_s_ VARCHAR, book_title VARCHAR)
SELECT MAX(points) FROM table_name_30 WHERE played > 5
What is the highest Points, when Played is greater than 5?
CREATE TABLE table_name_30 ( points INTEGER, played INTEGER )
SELECT high_assists FROM table_name_52 WHERE game = 31
What was the high assists for game 31?
CREATE TABLE table_name_52 (high_assists VARCHAR, game VARCHAR)
SELECT book_title FROM table_20193855_2 WHERE publisher = "Black Car Publishing"
What is the title of the book when the publisher is black car publishing?
CREATE TABLE table_20193855_2 (book_title VARCHAR, publisher VARCHAR)
SELECT hadeda_ibis FROM table_20042805_2 WHERE ostrich = "Dark Chanting Goshawk"
What is the Hadeda Ibis when the Ostrich is Dark Chanting Goshawk?
CREATE TABLE table_20042805_2 ( hadeda_ibis VARCHAR, ostrich VARCHAR )
SELECT team FROM table_name_79 WHERE game = 39
What team played in game 39?
CREATE TABLE table_name_79 (team VARCHAR, game VARCHAR)
SELECT prize__eur_ FROM table_20195922_3 WHERE number_of_winning_tickets = 1
What are the prizes when 1 is the number of winning tickets?
CREATE TABLE table_20195922_3 (prize__eur_ VARCHAR, number_of_winning_tickets VARCHAR)
SELECT document_id FROM Documents_with_expenses WHERE budget_type_code = 'SF'
What are the document ids for the budget type code 'SF'?
CREATE TABLE Documents_with_expenses ( document_id VARCHAR, budget_type_code VARCHAR )
SELECT location_attendance FROM table_name_30 WHERE game = 42
How many people attended game 42?
CREATE TABLE table_name_30 (location_attendance VARCHAR, game VARCHAR)
SELECT number_of_winning_tickets FROM table_20195922_3 WHERE prize__eur_ = "180.00"
What are the number of winning tickets that have 180.00 as the prize (eur)?
CREATE TABLE table_20195922_3 (number_of_winning_tickets VARCHAR, prize__eur_ VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "75733" AND lab.flag = "delta"
provide the number of patients with diagnoses icd9 code 75733 who had delta abnormal lab test status.
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 te...
SELECT MAX(total) FROM table_name_40 WHERE sport = "shooting" AND bronze < 0
What is the highest Shooting Total with a Bronze less than 0?
CREATE TABLE table_name_40 (total INTEGER, sport VARCHAR, bronze VARCHAR)
SELECT odds_of_winning__1in_ FROM table_20195922_3 WHERE divisions = "6th"
How many odd of winning have 6th as the division?
CREATE TABLE table_20195922_3 (odds_of_winning__1in_ VARCHAR, divisions VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2139" AND lab.itemid = "50893"
provide the number of patients whose admission year is less than 2139 and item id is 50893?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT MIN(silver) FROM table_name_77 WHERE bronze > 1 AND sport = "total" AND gold < 1
What is the lowest Silver in the Total Sport has less than 1 Gold and more than 1 Bronze?
CREATE TABLE table_name_77 (silver INTEGER, gold VARCHAR, bronze VARCHAR, sport VARCHAR)
SELECT prize__eur_ FROM table_20195922_3 WHERE divisions = "6th"
What is the prize (eur) for the 6th division?
CREATE TABLE table_20195922_3 (prize__eur_ VARCHAR, divisions VARCHAR)