answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT title FROM table_2226817_12 WHERE production_code = "11.01"
what is the name of the episode when the production code is 11.01?
CREATE TABLE table_2226817_12 (title VARCHAR, production_code VARCHAR)
SELECT "Status" FROM table_18223 WHERE "Incumbent" = 'Charles Stenholm'
What is the status of incumbent Charles Stenholm?
CREATE TABLE table_18223 ( "District" text, "Incumbent" text, "Party" text, "Elected" real, "Status" text, "Opponent" text )
SELECT score FROM table_name_53 WHERE date = "april 22"
What was the score on April 22?
CREATE TABLE table_name_53 (score VARCHAR, date VARCHAR)
SELECT title FROM table_2226817_12 WHERE production_code = "11.12"
what is the name of the episode if the production code is 11.12?
CREATE TABLE table_2226817_12 (title VARCHAR, production_code VARCHAR)
SELECT SUM("Crude birth rate (per 1000)") FROM table_11430 WHERE "Natural change (per 1000)" > '31.6' AND "Average population (x 1000)" < '1,802'
what is the crude birth rate (per 1000) when the natural change (per 1000) is more than 31.6 and the average population (x1000) is less than 1,802?
CREATE TABLE table_11430 ( "Average population (x 1000)" real, "Live births" real, "Deaths" text, "Natural change" real, "Crude birth rate (per 1000)" real, "Crude death rate (per 1000)" real, "Natural change (per 1000)" real )
SELECT event FROM table_name_88 WHERE quarterfinal = "zhamash l 1–2"
What event had zhamash l 1–2 in the quarterfinal?
CREATE TABLE table_name_88 (event VARCHAR, quarterfinal VARCHAR)
SELECT COUNT(no_in_series) FROM table_2226817_12 WHERE directed_by = "Mark K. Samuels"
how many episodes has been directed by Mark K. Samuels ?
CREATE TABLE table_2226817_12 (no_in_series VARCHAR, directed_by VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "WIDOWED" AND lab.fluid = "Pleural"
give me the number of patients whose marital status is widowed and lab test fluid is pleural?
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 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 ) 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 )
SELECT semifinal FROM table_name_4 WHERE athlete = "hossein ojaghi"
Hossein Ojaghi participated in what semifinal.
CREATE TABLE table_name_4 (semifinal VARCHAR, athlete VARCHAR)
SELECT directed_by FROM table_2226817_3 WHERE written_by = "Michael G. Moye & Ron Leavitt & J. Stanford Parker"
Who directed what was written by Michael G. Moye & Ron Leavitt & J. Stanford Parker?
CREATE TABLE table_2226817_3 (directed_by VARCHAR, written_by VARCHAR)
SELECT title FROM table_name_52 WHERE appointed_by = "james k. polk"
What is the title of the representative appointed by James K. Polk?
CREATE TABLE table_name_52 ( title VARCHAR, appointed_by VARCHAR )
SELECT event FROM table_name_29 WHERE quarterfinal = "did not advance" AND athlete = "alireza rouzbahani"
Alireza Rouzbahani did not advance to the quarterfinal in what event?
CREATE TABLE table_name_29 (event VARCHAR, quarterfinal VARCHAR, athlete VARCHAR)
SELECT production_code FROM table_2226817_8 WHERE written_by = "Michael G. Moye"
What are all the production codes of episodes written by Michael G. Moye?
CREATE TABLE table_2226817_8 (production_code VARCHAR, written_by VARCHAR)
SELECT MAX(silver) FROM table_name_61 WHERE gold = 8 AND total > 31
What is the highest Silver, when Gold is '8', and when Total is greater than 31?
CREATE TABLE table_name_61 ( silver INTEGER, gold VARCHAR, total VARCHAR )
SELECT COUNT(games) FROM table_name_38 WHERE goals_against > 288 AND lost < 34
How many games have more than 288 goals and less than 34 losses?
CREATE TABLE table_name_38 (games VARCHAR, goals_against VARCHAR, lost VARCHAR)
SELECT COUNT(written_by) FROM table_2226817_8 WHERE no_in_season = 13
Who is the writer of episode 13?
CREATE TABLE table_2226817_8 (written_by VARCHAR, no_in_season VARCHAR)
SELECT "Player" FROM table_78126 WHERE "Hometown" = 'tampa, florida'
Which player is from Tampa, Florida?
CREATE TABLE table_78126 ( "Player" text, "Position" text, "School" text, "Hometown" text, "College" text )
SELECT MIN(tied) FROM table_name_57 WHERE points < 100 AND goals_for = 277
What is the lowest tie with less than 100 points and 277 goals?
CREATE TABLE table_name_57 (tied INTEGER, points VARCHAR, goals_for VARCHAR)
SELECT COUNT(no_in_series) FROM table_2226817_8 WHERE production_code = "7.07"
Which series number has the production code 7.07?
CREATE TABLE table_2226817_8 (no_in_series VARCHAR, production_code VARCHAR)
SELECT 1921 FROM table_1108394_47 WHERE queens = "88"
Which candidate won 88 votes in Queens in 1921?
CREATE TABLE table_1108394_47 ( queens VARCHAR )
SELECT team FROM table_name_94 WHERE position = "g"
What is the team with position G?
CREATE TABLE table_name_94 (team VARCHAR, position VARCHAR)
SELECT MAX(no_in_season) FROM table_2226817_8 WHERE production_code = "7.01"
How many seasons have the production code 7.01 for an episode?
CREATE TABLE table_2226817_8 (no_in_season INTEGER, production_code VARCHAR)
SELECT city FROM table_name_41 WHERE results¹ = "4:2"
what city has the results of 4:2?
CREATE TABLE table_name_41 ( city VARCHAR, results¹ VARCHAR )
SELECT player FROM table_name_33 WHERE college = "illinois"
What is the player from Illinois?
CREATE TABLE table_name_33 (player VARCHAR, college VARCHAR)
SELECT no_in_series FROM table_2226817_8 WHERE no_in_season = 12
How many episodes in the series are from season 12?
CREATE TABLE table_2226817_8 (no_in_series VARCHAR, no_in_season VARCHAR)
SELECT "Permanent Account" FROM table_50559 WHERE "Userpics Free" = 'unknown' AND "Registration" = 'invite-only'
Which permanent account has registration of invite-only and userpics free of unknown?
CREATE TABLE table_50559 ( "Name" text, "Year Began" text, "Registration" text, "Userpics Free" text, "Userpics Paid" text, "Monthly Cost for Paid Account" text, "Yearly Cost for Paid Account" text, "Permanent Account" text )
SELECT phone FROM table_name_46 WHERE address = "53 dayton road"
What is the phone number of the station located at 53 Dayton Road?
CREATE TABLE table_name_46 (phone VARCHAR, address VARCHAR)
SELECT MIN(no_in_season) FROM table_2226817_9 WHERE no_in_series = 158
How many seasons had episode 158?
CREATE TABLE table_2226817_9 (no_in_season INTEGER, no_in_series VARCHAR)
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(MANAGER_ID)
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of hire_date and the average of manager_id bin hire_date by time in a bar chart, and order by the y axis in ascending.
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) )
SELECT engine_company FROM table_name_35 WHERE address = "89 rope ferry road"
What is the name of the engine company that is located at 89 Rope Ferry Road?
CREATE TABLE table_name_35 (engine_company VARCHAR, address VARCHAR)
SELECT production_code FROM table_2226817_9 WHERE written_by = "Stacie Lipp"
What is the production code of the episode directed by Stacie Lipp?
CREATE TABLE table_2226817_9 (production_code VARCHAR, written_by VARCHAR)
SELECT MAX("Converted") FROM table_62796 WHERE "Previous Number(s)" = '68165'
With a previous number of 68165, what is the oldest converted date?
CREATE TABLE table_62796 ( "Number" text, "Previous Number(s)" real, "Previous Class" text, "Converted" real, "Withdrawn" real, "Disposal" text )
SELECT record FROM table_name_24 WHERE visitor = "trail blazers"
What was the Record of the game in which the Trail Blazers was the visiting team?
CREATE TABLE table_name_24 (record VARCHAR, visitor VARCHAR)
SELECT title FROM table_2226817_9 WHERE no_in_series = 165
What is the name of episode 165?
CREATE TABLE table_2226817_9 (title VARCHAR, no_in_series VARCHAR)
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'pulmonary artery catheter placement' AND STRFTIME('%y', treatment.treatmenttime) >= '2103') AS t1 JOIN (SELECT patient.uniquepid, lab.labname, lab.labresulttime FROM lab JOIN patient ON lab.patientunitstayid = patient.patientunitstayid WHERE STRFTIME('%y', lab.labresulttime) >= '2103') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.treatmenttime < t2.labresulttime AND DATETIME(t1.treatmenttime, 'start of month') = DATETIME(t2.labresulttime, 'start of month') GROUP BY t2.labname) AS t3 WHERE t3.c1 <= 3
what were the three most frequently ordered lab tests for patients who had previously received pulmonary artery catheter placement during the same month, since 2103?
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) 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 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 )
SELECT date FROM table_name_30 WHERE competition = "friendly match" AND result = "1-1"
What was the date of the friendly match, ending in a result of 1-1?
CREATE TABLE table_name_30 (date VARCHAR, competition VARCHAR, result VARCHAR)
SELECT COUNT(directed_by) FROM table_2226817_9 WHERE production_code = "8.04"
How many episodes have the production code 8.04
CREATE TABLE table_2226817_9 (directed_by VARCHAR, production_code VARCHAR)
SELECT score FROM table_name_56 WHERE date = "june 28, 2009"
What was the score on June 28, 2009?
CREATE TABLE table_name_56 ( score VARCHAR, date VARCHAR )
SELECT result FROM table_name_28 WHERE venue = "as-salt"
What was the result of the game held at the As-Salt venue?
CREATE TABLE table_name_28 (result VARCHAR, venue VARCHAR)
SELECT alpha_2_code FROM table_222771_1 WHERE alpha_3_code = "TCA"
What is the Alpha 2 code for the area also known as TCA?
CREATE TABLE table_222771_1 (alpha_2_code VARCHAR, alpha_3_code VARCHAR)
SELECT COUNT(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid = t2.paperid JOIN inst AS t3 ON t2.instid = t3.instid WHERE t3.name = "University of Pennsylvania"
Find the number of papers published by the institution 'University of Pennsylvania'.
CREATE TABLE authorship ( authid number, instid number, paperid number, authorder number ) CREATE TABLE authors ( authid number, lname text, fname text ) CREATE TABLE papers ( paperid number, title text ) CREATE TABLE inst ( instid number, name text, country text )
SELECT record FROM table_name_56 WHERE date = "may 17"
What was the team's record on May 17?
CREATE TABLE table_name_56 (record VARCHAR, date VARCHAR)
SELECT alpha_3_code FROM table_222771_1 WHERE alpha_2_code = "FO"
What is the Alpha 3 code for the area also known as FO?
CREATE TABLE table_222771_1 (alpha_3_code VARCHAR, alpha_2_code VARCHAR)
SELECT "Republican/ Democratic" FROM table_67119 WHERE "State ranked in partisan order" = 'south carolina'
What is the ratio of Republicans to Democrats in South Carolina?
CREATE TABLE table_67119 ( "State ranked in partisan order" text, "Percentage Republicans" text, "Percentage Democrats" text, "Republican/ Democratic" text, "Republican seat plurality" text )
SELECT zone FROM table_name_30 WHERE opponents = "mădălina gojnea monica niculescu"
Which zone had mădălina gojnea monica niculescu as the opponent?
CREATE TABLE table_name_30 (zone VARCHAR, opponents VARCHAR)
SELECT alpha_2_code FROM table_222771_1 WHERE alpha_3_code = "NZL"
What is the alpha 2 code for the area also known as NZL?
CREATE TABLE table_222771_1 (alpha_2_code VARCHAR, alpha_3_code VARCHAR)
SELECT "Championship" FROM table_8624 WHERE "Circuit" = 'le mans'
Which championship had a Circuit of le mans?
CREATE TABLE table_8624 ( "Discipline" text, "Championship" text, "Circuit" text, "Session" text, "Cause" text )
SELECT against FROM table_name_94 WHERE opponents = "mădălina gojnea monica niculescu"
Who was against the opponents, mădălina gojnea monica niculescu?
CREATE TABLE table_name_94 (against VARCHAR, opponents VARCHAR)
SELECT iso_3166_2_codes FROM table_222771_1 WHERE english_short_name__upper_lower_case_ = "South Sudan"
What is the ISO for South Sudan?
CREATE TABLE table_222771_1 (iso_3166_2_codes VARCHAR, english_short_name__upper_lower_case_ VARCHAR)
SELECT college_junior_club_team__league_ FROM table_name_14 WHERE player = "mitch fadden"
What College/junior/club team (league) did mitch fadden play for?
CREATE TABLE table_name_14 ( college_junior_club_team__league_ VARCHAR, player VARCHAR )
SELECT surface FROM table_name_7 WHERE opponents = "margit rüütel anett schutting"
What was the surface on the game with margit rüütel anett schutting as the opponent?
CREATE TABLE table_name_7 (surface VARCHAR, opponents VARCHAR)
SELECT alpha_2_code FROM table_222771_1 WHERE english_short_name__upper_lower_case_ = "Papua New Guinea"
What is the Alpha 2 code for Papua New Guinea?
CREATE TABLE table_222771_1 (alpha_2_code VARCHAR, english_short_name__upper_lower_case_ VARCHAR)
SELECT score FROM table_name_55 WHERE opponent = "flavia pennetta"
What is the Score with an Opponent that is flavia pennetta?
CREATE TABLE table_name_55 ( score VARCHAR, opponent VARCHAR )
SELECT zone FROM table_name_64 WHERE against = "estonia"
What is the zone of the game played against Estonia?
CREATE TABLE table_name_64 (zone VARCHAR, against VARCHAR)
SELECT numeric_code FROM table_222771_1 WHERE alpha_3_code = "LIE"
What is the number reference for LIE?
CREATE TABLE table_222771_1 (numeric_code VARCHAR, alpha_3_code VARCHAR)
SELECT tries_for FROM table_name_47 WHERE losing_bonus = "losing bonus"
what is the tries fow when losing bonus is losing bonus?
CREATE TABLE table_name_47 ( tries_for VARCHAR, losing_bonus VARCHAR )
SELECT high_rebounds FROM table_name_36 WHERE date = "february 24"
Who had the high rebounds on February 24?
CREATE TABLE table_name_36 (high_rebounds VARCHAR, date VARCHAR)
SELECT COUNT(launch_date) FROM table_22274142_1 WHERE transmission = "Digital"
How many launch dates are there for digital transmission?
CREATE TABLE table_22274142_1 (launch_date VARCHAR, transmission VARCHAR)
SELECT COUNT("Date") FROM table_46571 WHERE "Type" = '0-4-4 forney locomotive' AND "Number" < '20' AND "Works number" = '1251'
What is the sum of number with type 0-4-4 forney locomotive, number smaller than 20 and works number of 1251?
CREATE TABLE table_46571 ( "Number" real, "Builder" text, "Type" text, "Date" real, "Works number" real )
SELECT location_attendance FROM table_name_49 WHERE date = "february 10"
On February 10, what was the location attendance?
CREATE TABLE table_name_49 (location_attendance VARCHAR, date VARCHAR)
SELECT written_by FROM table_22269839_1 WHERE production_code = "7ACX14"
Who wrote the title with production code 7acx14?
CREATE TABLE table_22269839_1 (written_by VARCHAR, production_code VARCHAR)
SELECT lab."CATEGORY" FROM lab WHERE lab.subject_id = "6983"
what is lab test category of subject id 6983?
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 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 ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT player FROM table_name_40 WHERE econ = "4.23"
Tell me the player with econ of 4.23
CREATE TABLE table_name_40 (player VARCHAR, econ VARCHAR)
SELECT directed_by FROM table_22269839_1 WHERE written_by = "Cherry Chevapravatdumrong"
Who directed the title written by cherry chevapravatdumrong?
CREATE TABLE table_22269839_1 (directed_by VARCHAR, written_by VARCHAR)
SELECT course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY course_name DESC
Return a histogram on what is the name of each course and the corresponding number of student enrollment?, could you list in desc by the x axis?
CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_of_completion DATETIME ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password VARCHAR(40), personal_name VARCHAR(80), middle_name VARCHAR(80), family_name VARCHAR(80), gender_mf VARCHAR(1), address_line_1 VARCHAR(80) ) CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARCHAR(40), middle_name VARCHAR(40), family_name VARCHAR(40) ) CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) )
SELECT runs FROM table_name_15 WHERE player = "b lee"
Tell me the runs for b lee
CREATE TABLE table_name_15 (runs VARCHAR, player VARCHAR)
SELECT written_by FROM table_22269839_1 WHERE production_code = "7ACX08"
Who wrote the title with the production code is 7acx08?
CREATE TABLE table_22269839_1 (written_by VARCHAR, production_code VARCHAR)
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13841) AND prescriptions.drug = 'desitin' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-160 month')
tell me the total dose of desitin dosage that patient 13841 had been prescribed since 160 months ago?
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name 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 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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) 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 chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title 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 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 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_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number )
SELECT player FROM table_name_91 WHERE overs = "87.4"
Tell me the player with overs of 87.4
CREATE TABLE table_name_91 (player VARCHAR, overs VARCHAR)
SELECT directed_by FROM table_22269839_1 WHERE written_by = "Patrick Meighan"
Who directed the episode written by patrick meighan?
CREATE TABLE table_22269839_1 (directed_by VARCHAR, written_by VARCHAR)
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'acute lung injury - etiology unknown')
what are the cost of diagnosis for acute lung injury - etiology unknown?
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, hospitaladmitsource text, unitadmittime time, unitdischargetime time, hospitaldischargetime time, hospitaldischargestatus text ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time )
SELECT runs FROM table_name_80 WHERE econ = "3.63"
Tell me the runs for econ of 3.63
CREATE TABLE table_name_80 (runs VARCHAR, econ VARCHAR)
SELECT dates FROM table_22282917_26 WHERE control_site_condition_owner = "machine shop on Martin Dr."
When is every date that control site condition or owner is machine shop on Martin Dr.?
CREATE TABLE table_22282917_26 (dates VARCHAR, control_site_condition_owner VARCHAR)
SELECT MIN("Attendance") FROM table_77763 WHERE "Opponent" = 'buffalo bills'
What is the low attendance rate against buffalo bills?
CREATE TABLE table_77763 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT wkts FROM table_name_13 WHERE econ = "4.23"
Tell me the wkts for econ of 4.23
CREATE TABLE table_name_13 (wkts VARCHAR, econ VARCHAR)
SELECT missile_type FROM table_22282917_26 WHERE code_ & _location = "M-20 Harbor Drive"
What is every missile type with a code and location of M-20 Harbor Drive?
CREATE TABLE table_22282917_26 (missile_type VARCHAR, code_ VARCHAR, _location VARCHAR)
SELECT to_par FROM table_name_77 WHERE place = "t6" AND score = 68 - 69 - 70 = 207
What is the To par of the T6 Place Player with a Score of 68-69-70=207?
CREATE TABLE table_name_77 ( to_par VARCHAR, place VARCHAR, score VARCHAR )
SELECT overs FROM table_name_66 WHERE mdns = "4"
Tell me the overs for mdns of 4
CREATE TABLE table_name_66 (overs VARCHAR, mdns VARCHAR)
SELECT code_ & _location FROM table_22282917_26 WHERE launch_site_condition_owner = "Obliterated"
What is every code and location where the launch site condition and owner is obliterated?
CREATE TABLE table_22282917_26 (code_ VARCHAR, _location VARCHAR, launch_site_condition_owner VARCHAR)
SELECT Area, COUNT(Area) FROM appellations GROUP BY Area ORDER BY COUNT(Area) DESC
List the number of areas of all appellations in the bar chart, rank by the total number from high to low.
CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases INTEGER, Drink TEXT )
SELECT home_team FROM table_name_43 WHERE away_team = "collingwood"
If collingwood is playing away, who played as the home team?
CREATE TABLE table_name_43 (home_team VARCHAR, away_team VARCHAR)
SELECT control_site_condition_owner FROM table_22282917_26 WHERE launch_site_condition_owner = "lakefront office buildings"
What is every control site condition and owner if launch site condition and owner is Lakefront Office Buildings?
CREATE TABLE table_22282917_26 (control_site_condition_owner VARCHAR, launch_site_condition_owner VARCHAR)
SELECT "5 credits" FROM table_35138 WHERE "1 credit" = '300'
What is listed for 5 credits that has 1 credit of 300?
CREATE TABLE table_35138 ( "Hand" text, "1 credit" text, "2 credits" text, "3 credits" text, "4 credits" text, "5 credits" text )
SELECT away_team AS score FROM table_name_7 WHERE venue = "kardinia park"
What was the away teams score when they played at kardinia park?
CREATE TABLE table_name_7 (away_team VARCHAR, venue VARCHAR)
SELECT team FROM table_22297140_3 WHERE outgoing_manager = "Behtash Fariba"
Which team had an outgoing manager of Behtash Fariba?
CREATE TABLE table_22297140_3 (team VARCHAR, outgoing_manager VARCHAR)
SELECT * FROM Posts WHERE YEAR(CreationDate) = 2012 AND Score > 20
Answers with scores over 20 in 2012.
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress 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 PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId 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 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 PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE CloseReasonTypes ( 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 Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount 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 Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number )
SELECT MAX(crowd) FROM table_name_29 WHERE away_team = "carlton"
What's the highest turnout when carlton was playing as the away team?
CREATE TABLE table_name_29 (crowd INTEGER, away_team VARCHAR)
SELECT team FROM table_22297140_3 WHERE replaced_by = "Faraz Kamalvand"
Which team had a manager who was replaced by Faraz Kamalvand?
CREATE TABLE table_22297140_3 (team VARCHAR, replaced_by VARCHAR)
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code
show me the flights from ATLANTA to BALTIMORE
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int, time_elapsed int, to_airport varchar ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_miles int, pressurized varchar ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text )
SELECT away_team FROM table_name_69 WHERE crowd > 27 OFFSET 463
What away team played when the crowd was over 27,463 people?
CREATE TABLE table_name_69 (away_team VARCHAR, crowd INTEGER)
SELECT outgoing_manager FROM table_22297140_3 WHERE replaced_by = "Jafar Fatahi"
Which outgoing manager was replaced by Jafar Fatahi?
CREATE TABLE table_22297140_3 (outgoing_manager VARCHAR, replaced_by VARCHAR)
SELECT founding_university FROM table_2538117_5 WHERE letters = "ΑΕΦ"
What was the founding university of ?
CREATE TABLE table_2538117_5 ( founding_university VARCHAR, letters VARCHAR )
SELECT marriage FROM table_name_28 WHERE spouse = "antoinette jeanne yvonne boegner"
On waht date did Antoinette Jeanne Yvonne Boegner get married?
CREATE TABLE table_name_28 (marriage VARCHAR, spouse VARCHAR)
SELECT team FROM table_22297140_3 WHERE replaced_by = "Ebrahim Talebi"
Which team had a manager replaced by Ebrahim Talebi?
CREATE TABLE table_22297140_3 (team VARCHAR, replaced_by VARCHAR)
SELECT COUNT("Womens doubles") FROM table_19789 WHERE "Mens singles" = 'Philippe Aulner'
How may women doubles winner were there when Philippe Aulner was mens singles winner?
CREATE TABLE table_19789 ( "Year" real, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text )
SELECT MAX(crowd) FROM table_name_3 WHERE home_team = "north melbourne"
What is the largest Crowd number for the Home team of North Melbourne?
CREATE TABLE table_name_3 (crowd INTEGER, home_team VARCHAR)
SELECT date_of_vacancy FROM table_22297140_3 WHERE outgoing_manager = "Behtash Fariba"
What was the date in which Behtash Fariba left his team?
CREATE TABLE table_22297140_3 (date_of_vacancy VARCHAR, outgoing_manager VARCHAR)
SELECT director, COUNT(*) FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID GROUP BY T1.director ORDER BY COUNT(*) DESC
Show me a bar chart for how many movie reviews does each director get?, and I want to display by the y axis in descending please.
CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date )
SELECT home_team FROM table_name_19 WHERE away_team = "south melbourne"
What home team did South Melbourne play as the away team?
CREATE TABLE table_name_19 (home_team VARCHAR, away_team VARCHAR)
SELECT manner_of_departure FROM table_22297140_3 WHERE team = "Gostaresh Foolad"
What was the manner of leaving the team for the manager of Gostaresh Foolad?
CREATE TABLE table_22297140_3 (manner_of_departure VARCHAR, team VARCHAR)