answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT part_number_s_ FROM table_23028629_2 WHERE model_number = "Core i5-670"
What is every part number with model number core i5-670?
CREATE TABLE table_23028629_2 (part_number_s_ VARCHAR, model_number VARCHAR)
SELECT result FROM table_name_49 WHERE goal = 9
What was the result of the game with 9 goals?
CREATE TABLE table_name_49 ( result VARCHAR, goal VARCHAR )
SELECT COUNT(evening_gown) FROM table_name_57 WHERE swimsuit < 9.36 AND average < 9.23
Which is the total number of evening gowns for swimsui less than 9.36 and average less than 9.23?
CREATE TABLE table_name_57 (evening_gown VARCHAR, swimsuit VARCHAR, average VARCHAR)
SELECT winner FROM table_23058971_8 WHERE big_ten_team = "#4 Purdue"
What is the record for Big Ten Team #4 Purdue?
CREATE TABLE table_23058971_8 (winner VARCHAR, big_ten_team VARCHAR)
SELECT "Set 1" FROM table_37916 WHERE "Set 2" = '26–24'
Which Set 1 has a Set 2 of 26 24?
CREATE TABLE table_37916 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Total" text )
SELECT MIN(average) FROM table_name_42 WHERE interview > 9.57 AND country = "delaware" AND evening_gown > 9.77
Name the lowest average for interview more than 9.57 and delaware and evening gown more than 9.77
CREATE TABLE table_name_42 (average INTEGER, evening_gown VARCHAR, interview VARCHAR, country VARCHAR)
SELECT avg_start FROM table_2308381_1 WHERE avg_finish = "24.2"
Name the avg start for avg finish being 24.2
CREATE TABLE table_2308381_1 (avg_start VARCHAR, avg_finish VARCHAR)
SELECT 3 AS _september_2004 FROM table_23988726_2 WHERE "saif_saaeed_shaheen___qat__" = "saif_saaeed_shaheen___qat__"
When saif saaeed shaheen ( qat ) is the saif saaeed shaheen ( qat ) what is the date on September 3rd, 2004?
CREATE TABLE table_23988726_2 ( Id VARCHAR )
SELECT SUM(swimsuit) FROM table_name_31 WHERE average > 9.23 AND country = "delaware" AND interview > 9.73
Name the sum of swimsuit for average more than 9.23 for delaware for interview more than 9.73
CREATE TABLE table_name_31 (swimsuit INTEGER, interview VARCHAR, average VARCHAR, country VARCHAR)
SELECT year FROM table_2308381_1 WHERE avg_start = "22.4"
Name the year for avg start being 22.4
CREATE TABLE table_2308381_1 (year VARCHAR, avg_start VARCHAR)
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 97395) AND STRFTIME('%y-%m', labevents.charttime) >= '2105-07' ORDER BY labevents.charttime DESC LIMIT 1
when did the last laboratory test of patient 97395 take place since 07/2105?
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 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_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text )
SELECT SUM(average) FROM table_name_99 WHERE interview > 9.57 AND swimsuit > 9.65
Name the sum of average for interview more than 9.57 and swimsuit more than 9.65
CREATE TABLE table_name_99 (average INTEGER, interview VARCHAR, swimsuit VARCHAR)
SELECT COUNT(kei) FROM table_23050383_1 WHERE economic_incentive_regime = "2.56"
How many KEI catagories are listed when the economic incentive regime is 2.56?
CREATE TABLE table_23050383_1 (kei VARCHAR, economic_incentive_regime VARCHAR)
SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description ORDER BY Document_Date DESC
Show the number of documents created in each day and bin document date by year interval and group by document type description with a group line chart, I want to rank x axis in descending order.
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_Budget_Codes ( Budget_Type_Code CHAR(15), Budget_Type_Description VARCHAR(255) ) CREATE TABLE Statements ( Statement_ID INTEGER, Statement_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 Accounts ( Account_ID INTEGER, Statement_ID INTEGER, Account_Details VARCHAR(255) ) CREATE TABLE Projects ( Project_ID INTEGER, Project_Details VARCHAR(255) ) CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARCHAR(255) )
SELECT evening_gown FROM table_name_90 WHERE swimsuit > 9.51 AND country = "maryland"
Name the evening gown for swimsuit more than 9.51 for maryland
CREATE TABLE table_name_90 (evening_gown VARCHAR, swimsuit VARCHAR, country VARCHAR)
SELECT innovation FROM table_23050383_1 WHERE economic_incentive_regime = "7.14"
What is the innovation when the economic incentive grime is 7.14?
CREATE TABLE table_23050383_1 (innovation VARCHAR, economic_incentive_regime VARCHAR)
SELECT "team 1", "team 2" FROM table_204_324 WHERE NOT "1st leg" IS NULL
who were the 6 teams to play in the first leg of the 2011 caf u-23 championship qualification ?
CREATE TABLE table_204_324 ( id number, "team 1" text, "agg." text, "team 2" text, "1st leg" text, "2nd leg" text )
SELECT MAX(points_awarded__platinum_) FROM table_name_51 WHERE points_awarded__gold_ = 9 AND points_awarded__silver_ > 6
What points awarded are higher than 6 but smaller than 9
CREATE TABLE table_name_51 (points_awarded__platinum_ INTEGER, points_awarded__gold_ VARCHAR, points_awarded__silver_ VARCHAR)
SELECT education FROM table_23050383_1 WHERE country = "Nepal"
What is the education in Nepal?
CREATE TABLE table_23050383_1 (education VARCHAR, country VARCHAR)
SELECT "Date" FROM table_70817 WHERE "Course" = 'rome to naples'
On what date was the race course from Rome to Naples?
CREATE TABLE table_70817 ( "Date" text, "Course" text, "Distance" text, "Type" text, "Winner" text, "Race Leader" text )
SELECT tyre FROM table_name_50 WHERE pole_position = "jacky ickx" AND race = "canadian grand prix"
In the Canadian Grand Prix, what tyre was used when Jacky Ickx held pole position?
CREATE TABLE table_name_50 (tyre VARCHAR, pole_position VARCHAR, race VARCHAR)
SELECT 2008 AS _rank FROM table_23050383_1 WHERE country = "Djibouti"
What is the 2008 rank of Djibouti?
CREATE TABLE table_23050383_1 (country VARCHAR)
SELECT winning_score FROM table_name_62 WHERE tournament = "german masters"
What was Olazabal's winning score in the German Masters?
CREATE TABLE table_name_62 ( winning_score VARCHAR, tournament VARCHAR )
SELECT circuit FROM table_name_16 WHERE tyre = "d" AND pole_position = "jochen rindt" AND fastest_lap = "jackie stewart"
When Jackie Stewart had the fastest lap and Jochen Rindt held the pole position with a D tyre, what was the circuit?
CREATE TABLE table_name_16 (circuit VARCHAR, fastest_lap VARCHAR, tyre VARCHAR, pole_position VARCHAR)
SELECT ict FROM table_23050383_1 WHERE education = "1.73" AND ki = "1.99"
What is the ICT when education is 1.73 and KI is ag 1.99?
CREATE TABLE table_23050383_1 (ict VARCHAR, education VARCHAR, ki VARCHAR)
SELECT "player" FROM table_203_116 WHERE "birth date" >= 25
who is at least 25 years or older ?
CREATE TABLE table_203_116 ( id number, "no." number, "player" text, "birth date" text, "weight" number, "height" number, "position" text, "current club" text )
SELECT circuit FROM table_name_28 WHERE winning_driver = "jochen rindt"
What was the circuit when Jochen Rindt won?
CREATE TABLE table_name_28 (circuit VARCHAR, winning_driver VARCHAR)
SELECT education FROM table_23050383_1 WHERE economic_incentive_regime = "1.58"
What is the education when the economic incentive regime is 1.58?
CREATE TABLE table_23050383_1 (education VARCHAR, economic_incentive_regime VARCHAR)
SELECT MIN("Total Medals") FROM table_66926 WHERE "Ensemble" = 'madison independent' AND "Bronze Medals" > '0'
What is the lowest Total Medals that has madison independent and Bronze Medals larger than 0
CREATE TABLE table_66926 ( "Ensemble" text, "Gold Medals" real, "Silver Medals" real, "Bronze Medals" real, "Total Medals" real )
SELECT tyre FROM table_name_81 WHERE circuit = "kyalami"
What tyre was used in Kyalami?
CREATE TABLE table_name_81 (tyre VARCHAR, circuit VARCHAR)
SELECT original_air_date FROM table_23114705_7 WHERE nz_viewers__thousand_ = "456.58"
What was the air date of the episod that had 456.58 thousand viewers?
CREATE TABLE table_23114705_7 (original_air_date VARCHAR, nz_viewers__thousand_ VARCHAR)
SELECT yards FROM table_name_74 WHERE attempts = "247"
Which Yards has a Attempts of 247
CREATE TABLE table_name_74 ( yards VARCHAR, attempts VARCHAR )
SELECT driver FROM table_name_11 WHERE grid = 10
Which driver had a grid number of 10?
CREATE TABLE table_name_11 (driver VARCHAR, grid VARCHAR)
SELECT season FROM table_2311410_1 WHERE winning_profit___aud__ = "$15,000"
What season had a winning profit of $15,000?
CREATE TABLE table_2311410_1 (season VARCHAR, winning_profit___aud__ VARCHAR)
SELECT "Losses" FROM table_40424 WHERE "Conference" = 'western' AND "Season" = '2004–05'
What is the Losses at the western conference and the 2004 05 season?
CREATE TABLE table_40424 ( "Season" text, "Conference" text, "Division" text, "Finish" text, "Wins" text, "Losses" text )
SELECT constructor FROM table_name_55 WHERE grid < 3 AND time_retired = "1:34:31.522"
Which constructor had a grid number of less than 3 and where the Time/Retired was 1:34:31.522?
CREATE TABLE table_name_55 (constructor VARCHAR, grid VARCHAR, time_retired VARCHAR)
SELECT COUNT(series_premiere) FROM table_2311410_1 WHERE season = "All-Stars"
How many series premieres did the season "All-stars" have?
CREATE TABLE table_2311410_1 (series_premiere VARCHAR, season VARCHAR)
SELECT COUNT(*) FROM table_203_308 WHERE "gold" >= 2
how many have won at least 2 gold medals ?
CREATE TABLE table_203_308 ( id number, "athlete" text, "nation" text, "olympics" text, "gold" number, "silver" number, "bronze" number, "total" number )
SELECT constructor FROM table_name_22 WHERE time_retired = "collision" AND grid < 18 AND driver = "nick heidfeld"
Which constructor had a Time/Retired of collision, where the grid number was less than 18 and Nick Heidfeld was the driver?
CREATE TABLE table_name_22 (constructor VARCHAR, driver VARCHAR, time_retired VARCHAR, grid VARCHAR)
SELECT erin_and_jake FROM table_2311410_5 WHERE week = 4
Name the erin and jake for week 4
CREATE TABLE table_2311410_5 (erin_and_jake VARCHAR, week VARCHAR)
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 97330 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'd5w (excel bag)'
tell me the total dose of d5w (excel bag) that patient 97330 was prescribed in this hospital encounter?
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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) 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 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 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 icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE 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_labitems ( row_id number, itemid number, label text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number )
SELECT record FROM table_name_64 WHERE date = "may 20"
What was the record on May 20?
CREATE TABLE table_name_64 (record VARCHAR, date VARCHAR)
SELECT MIN(no_in_series) FROM table_23117208_3 WHERE viewers__millions_ = "5.28"
when the number of spectator are 5.28 millions, which is the smallest number of the episode in series?
CREATE TABLE table_23117208_3 (no_in_series INTEGER, viewers__millions_ VARCHAR)
SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-24513')) AND microlab.culturesite = 'urine, voided specimen' AND DATETIME(microlab.culturetakentime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', microlab.culturetakentime) = '03' ORDER BY microlab.culturetakentime LIMIT 1
what was the organism found in patient 031-24513's first urine, voided specimen microbiology test in 03/last year?
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE 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 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 medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) 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 diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text )
SELECT height_in_ft FROM table_name_70 WHERE no_s_ = "24"
What is the height in feet of player number 24?
CREATE TABLE table_name_70 (height_in_ft VARCHAR, no_s_ VARCHAR)
SELECT MAX(no_in_season) FROM table_23117208_3 WHERE no_in_series = 20
which is the biggest number of episode in the season, where the number of the episode in series is 20?
CREATE TABLE table_23117208_3 (no_in_season INTEGER, no_in_series VARCHAR)
SELECT COUNT(losses) FROM table_name_43 WHERE wins < 12 AND golden_rivers = "ultima" AND byes > 2
How many losses did the golden rivers of ultima have when wins were less than 12 and byes larger than 2?
CREATE TABLE table_name_43 ( losses VARCHAR, byes VARCHAR, wins VARCHAR, golden_rivers VARCHAR )
SELECT school_club_team_country FROM table_name_27 WHERE years_for_rockets = "1967-68"
Who is the school, club, team or country that the Rockets played for 1967-68?
CREATE TABLE table_name_27 (school_club_team_country VARCHAR, years_for_rockets VARCHAR)
SELECT title FROM table_23117208_3 WHERE viewers__millions_ = "5.60"
what is the name of the episode when the number of spectators was 5.60 millions?
CREATE TABLE table_23117208_3 (title VARCHAR, viewers__millions_ VARCHAR)
SELECT tonnage FROM table_name_75 WHERE built = 2007
What tonnage was built in 2007?
CREATE TABLE table_name_75 ( tonnage VARCHAR, built VARCHAR )
SELECT player FROM table_name_48 WHERE position = "infielder" AND hometown = "atlanta, ga"
Which player has a Position of infielder, and a Hometown of atlanta, ga?
CREATE TABLE table_name_48 (player VARCHAR, position VARCHAR, hometown VARCHAR)
SELECT viewers__millions_ FROM table_23117208_3 WHERE prod_code = "RP#213"
how many millions of spectator did has the episode whose prod.code was rp#213?
CREATE TABLE table_23117208_3 (viewers__millions_ VARCHAR, prod_code VARCHAR)
SELECT score FROM table_name_4 WHERE date = "26 may 1997"
Name the score for 26 may 1997
CREATE TABLE table_name_4 ( score VARCHAR, date VARCHAR )
SELECT mlb_draft FROM table_name_7 WHERE school = "green valley high school"
What MLB draft has a School of green valley high school?
CREATE TABLE table_name_7 (mlb_draft VARCHAR, school VARCHAR)
SELECT MAX(no_in_season) FROM table_23117208_3 WHERE directed_by = "Constantine Makris"
which is the biggest number of episode in the season, when the director of the episode was Constantine Makris?
CREATE TABLE table_23117208_3 (no_in_season INTEGER, directed_by VARCHAR)
SELECT COUNT("Total") FROM table_75065 WHERE "Silver" = '0' AND "Bronze" = '1' AND "Rank" < '3'
How many total show when silver is 0, bronze is 1, and the rank is less than 3?
CREATE TABLE table_75065 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT position FROM table_name_26 WHERE school = "green valley high school"
Which position has a School of green valley high school?
CREATE TABLE table_name_26 (position VARCHAR, school VARCHAR)
SELECT title FROM table_23117208_5 WHERE written_by = "Michael Rauch"
What is the name of the episode that was written by Michael Rauch?
CREATE TABLE table_23117208_5 (title VARCHAR, written_by VARCHAR)
SELECT grand_finaldate FROM table_name_40 WHERE season = 1988
I want the Grand Final Date for season 1988
CREATE TABLE table_name_40 ( grand_finaldate VARCHAR, season VARCHAR )
SELECT position FROM table_name_61 WHERE player = "chad hutchinson"
Which position has a Player of chad hutchinson?
CREATE TABLE table_name_61 (position VARCHAR, player VARCHAR)
SELECT no_in_series FROM table_23117208_5 WHERE directed_by = "Matthew Penn"
For the episode directed by Matthew Penn, what is the total number in the series?
CREATE TABLE table_23117208_5 (no_in_series VARCHAR, directed_by VARCHAR)
SELECT "Tournament" FROM table_6739 WHERE "Date" = '1993' AND "Score in the final" = '6–2, 2–6, 7–5'
Which Tournament is in 1993 with a Score in the final of 6 2, 2 6, 7 5?
CREATE TABLE table_6739 ( "Date" real, "Tournament" text, "Surface" text, "Partner" text, "Opponent in the final" text, "Score in the final" text )
SELECT position FROM table_name_71 WHERE school = "petal high school"
Which position has a School of petal high school?
CREATE TABLE table_name_71 (position VARCHAR, school VARCHAR)
SELECT prod_code FROM table_23117208_4 WHERE viewers__millions_ = "4.92"
Name the production code for 4.92 million viewers
CREATE TABLE table_23117208_4 (prod_code VARCHAR, viewers__millions_ VARCHAR)
SELECT MIN(ofsted) FROM table_name_63 WHERE school = "marple hall school" AND capacity > 1711
Which Ofsted has a School of marple hall school, and a Capacity larger than 1711?
CREATE TABLE table_name_63 ( ofsted INTEGER, school VARCHAR, capacity VARCHAR )
SELECT date FROM table_name_23 WHERE week = 8
What is the date of week 8?
CREATE TABLE table_name_23 (date VARCHAR, week VARCHAR)
SELECT MIN(no_in_season) FROM table_23117208_4 WHERE written_by = "Jessica Ball"
Name the least number in season for jessica ball
CREATE TABLE table_23117208_4 (no_in_season INTEGER, written_by VARCHAR)
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT microbiologyevents.hadm_id FROM microbiologyevents WHERE microbiologyevents.spec_type_desc = 'blood culture (post-mortem)')
how many patients have received a blood culture (post-mortem) microbiological test?
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) 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_labitems ( row_id number, itemid number, label text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE 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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE 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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) 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 labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text )
SELECT MIN(week) FROM table_name_4 WHERE attendance = 48 OFFSET 102
Which week has the lowest attendance of 48,102?
CREATE TABLE table_name_4 (week INTEGER, attendance VARCHAR)
SELECT MAX(flaps) FROM table_23128286_1 WHERE points = 109
How many flaps did he have when he had 109 points?
CREATE TABLE table_23128286_1 (flaps INTEGER, points VARCHAR)
SELECT AVG("# of National votes") FROM table_48592 WHERE "Election" < '1992' AND "% of Prefectural vote" = '39.5%' AND "Leader" = 'takeo fukuda' AND "# of seats won" > '63'
What is the average # Of National Votes, when the Election is before 1992, when the % Of Prefectural Vote is 39.5%, when Leader is Takeo Fukuda, and when # Of Seats Won is greater than 63?
CREATE TABLE table_48592 ( "Election" real, "Leader" text, "# of seats won" real, "# of National votes" real, "% of National vote" text, "# of Prefectural votes" real, "% of Prefectural vote" text )
SELECT year FROM table_name_68 WHERE runs = "144"
What was the year with runs of 144?
CREATE TABLE table_name_68 (year VARCHAR, runs VARCHAR)
SELECT COUNT(wins) FROM table_23128286_1 WHERE team_name = "Carlin Motorsport"
How many wins did he have with carlin motorsport?
CREATE TABLE table_23128286_1 (wins VARCHAR, team_name VARCHAR)
SELECT SUM(ends) FROM table_name_65 WHERE goals < 0
Add up all the Ends columns that have goals smaller than 0.
CREATE TABLE table_name_65 ( ends INTEGER, goals INTEGER )
SELECT city_country FROM table_name_51 WHERE venue = "adelaide oval"
Name the place where adelaide oval is
CREATE TABLE table_name_51 (city_country VARCHAR, venue VARCHAR)
SELECT MAX(races) FROM table_23128286_1
What was the most races he had in a season?
CREATE TABLE table_23128286_1 (races INTEGER)
SELECT * FROM Posts WHERE PostTypeId = '##type##' ORDER BY Id
All posts of a given type.
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange 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 ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId 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 PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) 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 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 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 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 Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId 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 PostTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE FlagTypes ( Id number, Name text, Description text )
SELECT AVG(zone) FROM table_name_64 WHERE stations = "waddon marsh tram stop"
Name the average zone for waddon marsh tram stop
CREATE TABLE table_name_64 (zone INTEGER, stations VARCHAR)
SELECT sets_w_l FROM table_23133482_1 WHERE player = "Ken Rosewall"
What are Ken Rosewall's sets w-l?
CREATE TABLE table_23133482_1 (sets_w_l VARCHAR, player VARCHAR)
SELECT "name of place" FROM table_204_279 WHERE id = (SELECT id FROM table_204_279 WHERE "name of place" = 'deer park') - 1
what is the name of the place listed before deer park ?
CREATE TABLE table_204_279 ( id number, "name of place" text, "number\nof\ncounties" number, "principal\ncounty" text, "zip code\nlower" number, "zip code\nupper" number )
SELECT stations FROM table_name_58 WHERE managed_by = "tramlink" AND zone = 5 AND platforms = 1
Name the stations for zone 5 and 1 platform by tramlink
CREATE TABLE table_name_58 (stations VARCHAR, platforms VARCHAR, managed_by VARCHAR, zone VARCHAR)
SELECT games_w_l FROM table_23133482_1 WHERE player = "Arthur Ashe"
What are Arthur Ashe's games w-l?
CREATE TABLE table_23133482_1 (games_w_l VARCHAR, player VARCHAR)
SELECT "Winner" FROM table_57197 WHERE "Date" = '18 may'
What is the name of the winner on 18 may?
CREATE TABLE table_57197 ( "Date" text, "Course" text, "Distance" text, "Type" text, "Winner" text )
SELECT COUNT(platforms) FROM table_name_41 WHERE stations = "waddon railway station"
Name the total number of platforms that waddon railway station has
CREATE TABLE table_name_41 (platforms VARCHAR, stations VARCHAR)
SELECT games_w_l FROM table_23145653_1 WHERE player = "Cliff Richey"
Name the games w-1 for cliff richey
CREATE TABLE table_23145653_1 (games_w_l VARCHAR, player VARCHAR)
SELECT COUNT("Tries against") FROM table_18835 WHERE "Points for" = '325'
what is the total amount of tries where the points were 325?
CREATE TABLE table_18835 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text )
SELECT AVG(zone) FROM table_name_54 WHERE stations = "waddon railway station" AND platforms > 2
Name the average zone for waddon railway station and has more than 2 platforms
CREATE TABLE table_name_54 (zone INTEGER, stations VARCHAR, platforms VARCHAR)
SELECT COUNT(stage) FROM table_23157997_13 WHERE general_classification = "Rory Sutherland"
What stage number had the general classification Rory Sutherland?
CREATE TABLE table_23157997_13 (stage VARCHAR, general_classification VARCHAR)
SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.dob_year > "2064"
what is minimum days of hospital stay of patients whose year of birth is greater than 2064?
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location text, discharge_location text, diagnosis text, dod text, dob_year text, dod_year text, admittime text, dischtime text, admityear text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT record FROM table_name_20 WHERE opponent = "bob ostovich"
What is Bob Ostovich's opponents record?
CREATE TABLE table_name_20 (record VARCHAR, opponent VARCHAR)
SELECT youth_classification FROM table_23157997_13 WHERE mountains_classification = "Kenneth Hanson" AND winner = "Lucas Sebastian Haedo"
Who was the Youth Classification in the race with Kenneth Hanson as Mountains Classification and Lucas Sebastian Haedo as winner?
CREATE TABLE table_23157997_13 (youth_classification VARCHAR, mountains_classification VARCHAR, winner VARCHAR)
SELECT COUNT(points) FROM table_name_29 WHERE rank = "17th" AND wins > 0
How many Points have a Rank of 17th, and Wins larger than 0?
CREATE TABLE table_name_29 ( points VARCHAR, rank VARCHAR, wins VARCHAR )
SELECT location FROM table_name_72 WHERE opponent = "jimmy smith"
What location is Jimmy Smith fighting in?
CREATE TABLE table_name_72 (location VARCHAR, opponent VARCHAR)
SELECT winner FROM table_23157997_13 WHERE mountains_classification = "Tom Zirbel" AND points_classification = "Thomas Soladay"
Who won the race with Tom Zirbel as Mountains Classification and Thomas Soladay as Points Classification?
CREATE TABLE table_23157997_13 (winner VARCHAR, mountains_classification VARCHAR, points_classification VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "62" AND prescriptions.drug = "Clobetasol Propionate 0.05% Ointment"
get me the number of patients less than 62 years who have prescription for clobetasol propionate 0.05% ointment.
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 procedures ( 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 ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text )
SELECT away FROM table_name_22 WHERE record = "7-4" AND win__percentage = 0.637 AND season = "2010"
What is the away score with a record of 7-4, win% of 0.637, and 2010 season?
CREATE TABLE table_name_22 (away VARCHAR, season VARCHAR, record VARCHAR, win__percentage VARCHAR)
SELECT mountains_classification FROM table_23157997_13 WHERE youth_classification = "Nick Frey" AND points_classification = "Tom Zirbel"
Who was Mountains Classification in the race with Nick Frey as Youth Classification and Tom Zirbel as Points Classification?
CREATE TABLE table_23157997_13 (mountains_classification VARCHAR, youth_classification VARCHAR, points_classification VARCHAR)
SELECT COUNT("Filipino") FROM table_15934 WHERE "Indian" = '30947'
How many States have an Indian population of 30947?
CREATE TABLE table_15934 ( "State/Territory" text, "Asian American Population (2010 Census)" real, "Chinese" real, "Filipino" real, "Indian" real, "Japanese" real, "Korean" real, "Vietnamese" real, "Other Asian" real )
SELECT MIN(win__percentage) FROM table_name_53 WHERE away = "3-2" AND season = "2011"
What was the lowest win% with an away score of 3-2 in 2011 season?
CREATE TABLE table_name_53 (win__percentage INTEGER, away VARCHAR, season VARCHAR)
SELECT COUNT(mountains_classification) FROM table_23157997_13 WHERE youth_classification = "Mike Northey"
How many Mountains Classifications were in the race with Mike Northey as Youth Classification?
CREATE TABLE table_23157997_13 (mountains_classification VARCHAR, youth_classification VARCHAR)