answer
stringlengths
6
3.91k
question
stringlengths
7
766
context
stringlengths
27
7.14k
SELECT COUNT(stanier), _3_cylinder FROM table_20142629_2 WHERE fowler = 16
When the Fowler is 16, what is the number of cylinders?
CREATE TABLE table_20142629_2 (_3_cylinder VARCHAR, stanier VARCHAR, fowler VARCHAR)
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) <= '2100'
what was the number of patients that were discharged from hospital until 2100?
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 ) 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 lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) 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 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 treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time )
SELECT record FROM table_22862203_2 WHERE opp_points = 50
What were the records when the opponents had 50 points?
CREATE TABLE table_22862203_2 (record VARCHAR, opp_points VARCHAR)
SELECT MAX(fowler) FROM table_20142629_2
What is tops for Folwer?
CREATE TABLE table_20142629_2 (fowler INTEGER)
SELECT "Home team" FROM table_57838 WHERE "Away team score" = '16.11 (107)'
What was the home score when the away team scored 16.11 (107)?
CREATE TABLE table_57838 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT terps_points FROM table_22862203_2 WHERE date = "Nov. 25/05"
What are the terps points for the nov. 25/05 game?
CREATE TABLE table_22862203_2 (terps_points VARCHAR, date VARCHAR)
SELECT grid FROM table_20159025_1 WHERE part_1 = "1:31.063"
On what grid was the time for part 1 1:31.063?
CREATE TABLE table_20159025_1 (grid VARCHAR, part_1 VARCHAR)
SELECT MIN("Rank (night)") FROM table_16579 WHERE "Viewers (millions)" = '5.25'
What is the lowest rank (night) for having viewers (millions) 5.25?
CREATE TABLE table_16579 ( "#" real, "Episode" text, "Rating" text, "Share" real, "Rating/Share (18-49)" text, "Viewers (millions)" text, "Rank (timeslot)" real, "Rank (night)" real, "Rank (week)" text )
SELECT location FROM table_22862203_2 WHERE record = "9-1"
Where were games played when the record was 9-1?
CREATE TABLE table_22862203_2 (location VARCHAR, record VARCHAR)
SELECT driver FROM table_20159025_1 WHERE no = "2‡"
Which driver was number 2‡?
CREATE TABLE table_20159025_1 (driver VARCHAR, no VARCHAR)
SELECT MAX(year) FROM table_name_30 WHERE reg_season = "3rd, western" AND division > 2
Which Year is the highest one that has a Reg Season of 3rd, western, and a Division larger than 2?
CREATE TABLE table_name_30 ( year INTEGER, reg_season VARCHAR, division VARCHAR )
SELECT MAX(terps_points) FROM table_22862203_2 WHERE opp_points = 53
What is the highest number of terps points in games where the opponent made 53 points?
CREATE TABLE table_22862203_2 (terps_points INTEGER, opp_points VARCHAR)
SELECT driver FROM table_20159025_1 WHERE grid = "01 1"
Who was the driver in grid 01 1?
CREATE TABLE table_20159025_1 (driver VARCHAR, grid 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CINCINNATI' AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'MEMPHIS' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code
what are the flights between MEMPHIS and CINCINNATI on wednesday
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) 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 city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) 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 food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) 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 compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE code_description ( code varchar, description text ) 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_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 class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE state ( state_code text, state_name text, country_name text ) 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 ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) 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 )
SELECT location FROM table_22862203_2 WHERE date = "Jan. 16/06"
Where was the game on jan. 16/06 played?
CREATE TABLE table_22862203_2 (location VARCHAR, date VARCHAR)
SELECT part_3 FROM table_20159025_1 WHERE driver = "Heikki Kovalainen"
What was the time in part 3 when Heikki Kovalainen was the driver?
CREATE TABLE table_20159025_1 (part_3 VARCHAR, driver VARCHAR)
SELECT AVG("Round") FROM table_9931 WHERE "Position" = 'ot' AND "College" = 'tulane' AND "Overall" > '38'
What's the average round for the OT position from tulane college with an overall over 38?
CREATE TABLE table_9931 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
SELECT COUNT(high_points) FROM table_22871239_9 WHERE record = "21-45"
Name the high points for 21-45 record
CREATE TABLE table_22871239_9 (high_points VARCHAR, record VARCHAR)
SELECT driver FROM table_20159025_1 WHERE part_1 = "1:31.386"
Who was the driver when the time in part 3 was 1:31.386?
CREATE TABLE table_20159025_1 (driver VARCHAR, part_1 VARCHAR)
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'tobacco use disorder') AND STRFTIME('%y', diagnoses_icd.charttime) = '2105') AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE admissions.subject_id IN (SELECT patients.subject_id FROM patients WHERE patients.gender = 'm') AND admissions.age BETWEEN 50 AND 59 AND STRFTIME('%y', prescriptions.startdate) = '2105') AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND t1.hadm_id = t2.hadm_id GROUP BY t2.drug) AS t3 WHERE t3.c1 <= 4
what are the four most commonly prescribed drugs that were prescribed to male patients in their 50s in the same hospital encounter after they were diagnosed with tobacco use disorder in 2105?
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto 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 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 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 cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost 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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) 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 ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_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 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 )
SELECT visitor FROM table_22871239_9 WHERE date = "March 23"
Name the visitor for march 23
CREATE TABLE table_22871239_9 (visitor VARCHAR, date VARCHAR)
SELECT part_3 FROM table_20159025_1 WHERE driver = "Nick Heidfeld"
What was the time in part 3 when Nick Heidfeld was the driver?
CREATE TABLE table_20159025_1 (part_3 VARCHAR, driver VARCHAR)
SELECT "Surface" FROM table_73921 WHERE "Score in the final" = '2–6, 6–2, 6–0'
The score in the final is 2 6, 6 2, 6 0, on what surface?
CREATE TABLE table_73921 ( "Outcome" text, "No." text, "Date" text, "Championship" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
SELECT high_rebounds FROM table_22871239_9 WHERE arena_attendance = "TD Garden 18,624"
Name the high rebounds for td garden 18,624
CREATE TABLE table_22871239_9 (high_rebounds VARCHAR, arena_attendance VARCHAR)
SELECT COUNT(title) FROM table_20345624_2 WHERE original_airdate = "5 August 1967"
Name the title that aired on 5 august 1967
CREATE TABLE table_20345624_2 (title VARCHAR, original_airdate VARCHAR)
SELECT "Tournament" FROM table_46640 WHERE "Week" = 'november 23'
What is Tournament, when Week is November 23?
CREATE TABLE table_46640 ( "Tournament" text, "Surface" text, "Week" text, "Winners" text, "Finalists" text, "Semifinalists" text )
SELECT record FROM table_22871239_9 WHERE date = "March 16"
Name the record for march 16
CREATE TABLE table_22871239_9 (record VARCHAR, date VARCHAR)
SELECT COUNT(director) FROM table_20345624_2 WHERE no = 6
Name the total number of directors for number 6
CREATE TABLE table_20345624_2 (director VARCHAR, no VARCHAR)
SELECT "Location" FROM table_63502 WHERE "Theme" = 'my pacific'
What is the Location of the 'My Pacific' Theme?
CREATE TABLE table_63502 ( "Iteration" text, "Year" real, "Dates" text, "Location" text, "Theme" text )
SELECT COUNT(_number) FROM table_22871239_8 WHERE score = "L 110-112"
Name the total number for score l 110-112
CREATE TABLE table_22871239_8 (_number VARCHAR, score VARCHAR)
SELECT original_airdate FROM table_20345624_2 WHERE director = "Guy Verney"
Name the original airdate for guy verney
CREATE TABLE table_20345624_2 (original_airdate VARCHAR, director VARCHAR)
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo
Show student ids who don't have any sports.
CREATE TABLE Sportsinfo ( StuID VARCHAR ) CREATE TABLE Student ( StuID VARCHAR )
SELECT team FROM table_22871239_8 WHERE score = "W 125-115"
Name the team for w 125-115 score
CREATE TABLE table_22871239_8 (team VARCHAR, score VARCHAR)
SELECT COUNT(writer) FROM table_20345624_2 WHERE original_airdate = "15 July 1967"
Name the number of writers for airdate of 15 july 1967
CREATE TABLE table_20345624_2 (writer VARCHAR, original_airdate VARCHAR)
SELECT "Tournament location" FROM table_46089 WHERE "Country" = 'south korea'
What tournament location has south korea as the country?
CREATE TABLE table_46089 ( "Year" real, "Dates" text, "Champion" text, "Country" text, "Winning score" text, "To par" text, "Margin of victory" text, "Tournament location" text, "Purse ( $ )" text, "Winner's share ($)" text )
SELECT high_assists FROM table_22871239_8 WHERE location_attendance = "American Airlines Center 19,585"
Name the high assists for american airlines center 19,585
CREATE TABLE table_22871239_8 (high_assists VARCHAR, location_attendance VARCHAR)
SELECT abbr FROM table_20354_5 WHERE transcription = "kumphaphan"
What's the abbreviation for the month whose transcription is Kumphaphan?
CREATE TABLE table_20354_5 (abbr VARCHAR, transcription VARCHAR)
SELECT "Crystal structure" FROM table_15972 WHERE "Formula" = 'YBa 2 Cu 3 O 7'
What is the crystal structure for the formula yba 2 cu 3 o 7?
CREATE TABLE table_15972 ( "Formula" text, "Notation" text, "T c (K)" real, "No. of Cu-O planes in unit cell" real, "Crystal structure" text )
SELECT high_points FROM table_22871316_11 WHERE series = "3-2"
Who has the high points when 3-2 is the series?
CREATE TABLE table_22871316_11 (high_points VARCHAR, series VARCHAR)
SELECT zodiac_sign FROM table_20354_5 WHERE thai_name = "มกราคม"
What's the zodiac sign for the month with Thai name มกราคม?
CREATE TABLE table_20354_5 (zodiac_sign VARCHAR, thai_name VARCHAR)
SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, equipment_sequence, flight WHERE (((((flight.arrival_time < 41 OR flight.time_elapsed >= 60) AND flight.departure_time > flight.arrival_time) AND date_day.day_number = 6 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code) OR (date_day.day_number = 7 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.flight_days = days.days_code AND NOT ((flight.arrival_time < 41 OR flight.time_elapsed >= 60) AND flight.departure_time > flight.arrival_time))) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND aircraft.capacity = (SELECT MIN(AIRCRAFTalias1.capacity) FROM aircraft AS AIRCRAFTalias1, airport_service AS AIRPORT_SERVICEalias2, airport_service AS AIRPORT_SERVICEalias3, city AS CITYalias2, city AS CITYalias3, date_day AS DATE_DAYalias1, days AS DAYSalias1, equipment_sequence AS EQUIPMENT_SEQUENCEalias1, flight AS FLIGHTalias1 WHERE (((((FLIGHTalias1.arrival_time < 41 OR FLIGHTalias1.time_elapsed >= 60) AND FLIGHTalias1.departure_time > FLIGHTalias1.arrival_time) AND DATE_DAYalias1.day_number = 6 AND DATE_DAYalias1.month_number = 5 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code) OR (DATE_DAYalias1.day_number = 7 AND DATE_DAYalias1.month_number = 5 AND DATE_DAYalias1.year = 1991 AND DAYSalias1.day_name = DATE_DAYalias1.day_name AND FLIGHTalias1.flight_days = DAYSalias1.days_code AND NOT ((FLIGHTalias1.arrival_time < 41 OR FLIGHTalias1.time_elapsed >= 60) AND FLIGHTalias1.departure_time > FLIGHTalias1.arrival_time))) AND CITYalias3.city_code = AIRPORT_SERVICEalias3.city_code AND CITYalias3.city_name = 'BALTIMORE' AND FLIGHTalias1.to_airport = AIRPORT_SERVICEalias3.airport_code) AND CITYalias2.city_code = AIRPORT_SERVICEalias2.city_code AND CITYalias2.city_name = 'PITTSBURGH' AND EQUIPMENT_SEQUENCEalias1.aircraft_code = AIRCRAFTalias1.aircraft_code AND FLIGHTalias1.aircraft_code_sequence = EQUIPMENT_SEQUENCEalias1.aircraft_code_sequence AND FLIGHTalias1.from_airport = AIRPORT_SERVICEalias2.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND equipment_sequence.aircraft_code = aircraft.aircraft_code AND flight.aircraft_code_sequence = equipment_sequence.aircraft_code_sequence AND flight.from_airport = AIRPORT_SERVICE_0.airport_code
what is the smallest aircraft available flying from PITTSBURGH to BALTIMORE arriving on 5 7
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 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 class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) 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 ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE code_description ( code varchar, description text ) 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 compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE month ( month_number int, month_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 dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE days ( days_code varchar, day_name 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 time_interval ( period text, begin_time int, end_time int )
SELECT high_assists FROM table_22871316_11 WHERE series = "0-1"
Who has the high assists when 0-1 is the series?
CREATE TABLE table_22871316_11 (high_assists VARCHAR, series VARCHAR)
SELECT zodiac_sign FROM table_20354_5 WHERE transcription = "karakadakhom"
What's the zodiac sing for the month whose transcription is Karakadakhom?
CREATE TABLE table_20354_5 (zodiac_sign VARCHAR, transcription VARCHAR)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.admityear < "2194"
Give the number of patients whose marital status is married and were admitted before the year 2194.
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text )
SELECT COUNT(high_rebounds) FROM table_22871316_11 WHERE series = "3-3"
How many high rebounds are in series 3-3?
CREATE TABLE table_22871316_11 (high_rebounds VARCHAR, series VARCHAR)
SELECT transcription FROM table_20354_5 WHERE thai_name = "พฤษภาคม"
What's the transcription for the Thai name พฤษภาคม?
CREATE TABLE table_20354_5 (transcription VARCHAR, thai_name VARCHAR)
SELECT "Year Built" FROM table_40341 WHERE "Venue" = 'transamerica field'
What year was transamerica field built in?
CREATE TABLE table_40341 ( "Venue" text, "Location" text, "Capacity" text, "Owner" text, "Environment" text, "Year Built" text )
SELECT MIN(game) FROM table_22871316_11 WHERE date = "April 30"
How many games are on the date of April 30?
CREATE TABLE table_22871316_11 (game INTEGER, date VARCHAR)
SELECT sanskrit_word FROM table_20354_5 WHERE thai_name = "มกราคม"
What's the Sanskrit word for month with Thai name มกราคม?
CREATE TABLE table_20354_5 (sanskrit_word VARCHAR, thai_name VARCHAR)
SELECT affiliation FROM table_16381914_1 WHERE location = "Erie, Pennsylvania"
What affiliation is Erie, Pennsylvania?
CREATE TABLE table_16381914_1 ( affiliation VARCHAR, location VARCHAR )
SELECT high_points FROM table_22871316_6 WHERE date = "December 18"
Who did the high points in the game played on December 18?
CREATE TABLE table_22871316_6 (high_points VARCHAR, date VARCHAR)
SELECT COUNT(transcription) FROM table_20354_5 WHERE thai_name = "พฤษภาคม"
How many different transcriptions are there for the Thai name พฤษภาคม?
CREATE TABLE table_20354_5 (transcription VARCHAR, thai_name VARCHAR)
SELECT "location" FROM table_204_498 ORDER BY "km" DESC LIMIT 1
which location has the most km ?
CREATE TABLE table_204_498 ( id number, "location" text, "building" text, "year" number, "km" number, "monument" number )
SELECT high_points FROM table_22871316_6 WHERE date = "December 2"
Who did the high points in the game played on December 2?
CREATE TABLE table_22871316_6 (high_points VARCHAR, date VARCHAR)
SELECT MAX(innings) FROM table_20367820_16 WHERE average = "36.48"
What is the innings when the average is 36.48?
CREATE TABLE table_20367820_16 (innings INTEGER, average VARCHAR)
SELECT AVG(drawn) FROM table_name_79 WHERE goals_for < 36 AND lost > 21
For entries with lost larger than 21 and goals for smaller than 36, what is the average drawn?
CREATE TABLE table_name_79 ( drawn INTEGER, goals_for VARCHAR, lost VARCHAR )
SELECT record FROM table_22871316_6 WHERE high_points = "Carlos Delfino (17)"
What's the record of the game in which Carlos Delfino (17) did the most high points?
CREATE TABLE table_22871316_6 (record VARCHAR, high_points VARCHAR)
SELECT not_out FROM table_20367820_16 WHERE average = "43.70"
How many no outs are there for an average of 43.70?
CREATE TABLE table_20367820_16 (not_out VARCHAR, average VARCHAR)
SELECT COUNT("Season") FROM table_25981 WHERE "Team" = 'Motopark'
How many seasons have motopark team?
CREATE TABLE table_25981 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" text, "Position" text )
SELECT high_rebounds FROM table_22871316_6 WHERE high_assists = "Brandon Jennings (8)"
Who did the high rebounds in the game in which Brandon Jennings (8) did the high assists?
CREATE TABLE table_22871316_6 (high_rebounds VARCHAR, high_assists VARCHAR)
SELECT COUNT(not_out) FROM table_20367820_16 WHERE average = "56.38"
How many no outs for an average of 56.38?
CREATE TABLE table_20367820_16 (not_out VARCHAR, average VARCHAR)
SELECT dubose_porter FROM table_name_16 WHERE roy_barnes = "54%"
What is the DuBose Porter with Roy Barnes at 54%?
CREATE TABLE table_name_16 ( dubose_porter VARCHAR, roy_barnes VARCHAR )
SELECT player FROM table_22875514_3 WHERE field_goals = "18-50 .360"
Which player has 18-50 .360 field goals?
CREATE TABLE table_22875514_3 (player VARCHAR, field_goals VARCHAR)
SELECT COUNT(poles) FROM table_20396_1 WHERE points = "78"
How many poles had 78 points?
CREATE TABLE table_20396_1 (poles VARCHAR, points VARCHAR)
WITH closed_cte AS (SELECT t.TagName AS tag, COUNT(q.Id) AS totalcount, COUNT(q.ClosedDate) AS closedcount, ROUND(COUNT(q.ClosedDate) * 100.0 / COUNT(q.Id), 2) AS percentage FROM Posts AS q INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE q.PostTypeId = 1 GROUP BY t.TagName) SELECT tag, totalcount, closedcount, percentage FROM closed_cte WHERE totalcount >= '##num?5000##' ORDER BY percentage DESC
Percentage of closed question per tag (among the posts that were not deleted).
CREATE TABLE FlagTypes ( 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 ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId 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 PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResultTypes ( 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, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE 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 PostTags ( PostId number, TagId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CREATE TABLE 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 PostTypes ( Id number, Name 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 PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) 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 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 PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time )
SELECT MAX(assists) FROM table_22875514_3 WHERE points = "129-3.9"
What is the most assists for points 129-3.9?
CREATE TABLE table_22875514_3 (assists INTEGER, points VARCHAR)
SELECT COUNT(poles) FROM table_20396_1 WHERE points = "72"
How many poles had 72 points?
CREATE TABLE table_20396_1 (poles VARCHAR, points VARCHAR)
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
For those employees who did not have any job in the past, a bar chart shows the distribution of hire_date and the average of employee_id bin hire_date by time.
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 job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) )
SELECT date FROM table_22875369_3 WHERE irish_points = 89
Name the date for irish points being 89
CREATE TABLE table_22875369_3 (date VARCHAR, irish_points VARCHAR)
SELECT poles FROM table_20396_1 WHERE season = 2000
How many poles were there in season 2000?
CREATE TABLE table_20396_1 (poles VARCHAR, season VARCHAR)
SELECT "Pennant" FROM table_462 WHERE "Laid Down" = '4 May 1943'
What is the pennant for 4 may 1943?
CREATE TABLE table_462 ( "Name" text, "Pennant" text, "Builder" text, "Laid Down" text, "Launched" text, "Commissioned" text, "Fate" text )
SELECT COUNT(location) FROM table_22875369_3 WHERE record = "22-1"
Name the number of location for 22-1
CREATE TABLE table_22875369_3 (location VARCHAR, record VARCHAR)
SELECT team FROM table_20396_1 WHERE points = "4"
What team scored 4 points?
CREATE TABLE table_20396_1 (team VARCHAR, points VARCHAR)
SELECT COUNT(status) FROM table_1341522_36 WHERE incumbent = "Alex McMillan"
How many districts are respresented by Alex McMillan?
CREATE TABLE table_1341522_36 ( status VARCHAR, incumbent VARCHAR )
SELECT opponent FROM table_22875369_3 WHERE date = "2-27-10"
Name the opponent for 2-27-10
CREATE TABLE table_22875369_3 (opponent VARCHAR, date VARCHAR)
SELECT winner FROM table_20462111_1 WHERE date = "30.11.2008"
Who won the cup on 30.11.2008?
CREATE TABLE table_20462111_1 (winner VARCHAR, date VARCHAR)
SELECT "Home team score" FROM table_38752 WHERE "Home team" = 'essendon'
What was the home team score for essendon?
CREATE TABLE table_38752 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text, "Report" text )
SELECT MAX(irish_points) FROM table_22875369_3 WHERE opponent = "Eastern Michigan"
Name the max irish points for eastern michigan
CREATE TABLE table_22875369_3 (irish_points INTEGER, opponent VARCHAR)
SELECT 3 AS rd_place FROM table_20462111_1 WHERE date = "01.02.2009"
Who got the 3rd place in the cup on 01.02.2009?
CREATE TABLE table_20462111_1 (date VARCHAR)
SELECT demographic.dod, demographic.admittime FROM demographic WHERE demographic.subject_id = "15898"
what is date of death and admission time of subject id 15898?
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text )
SELECT irish_points FROM table_22875369_3 WHERE record = "23-1"
Name the irish points for 23-1 record
CREATE TABLE table_22875369_3 (irish_points VARCHAR, record VARCHAR)
SELECT location FROM table_20462111_1 WHERE date = "07.02.2009"
Where was the cup on 07.02.2009 held?
CREATE TABLE table_20462111_1 (location VARCHAR, date VARCHAR)
SELECT meter_500, ID FROM swimmer ORDER BY meter_500 DESC
A bar chart shows the distribution of meter_500 and ID , list by the X-axis in descending.
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text )
SELECT COUNT(high_rebounds) FROM table_22879262_14 WHERE score = "L 92–96 (OT)"
Name the number of high rebounds for l 92–96 (ot)
CREATE TABLE table_22879262_14 (high_rebounds VARCHAR, score VARCHAR)
SELECT MIN(population__may), _2000_ FROM table_2051288_1 WHERE location = "coastal" AND barangay = "Isio"
What was the population of the coastal location Isio in May of 2000?
CREATE TABLE table_2051288_1 (_2000_ VARCHAR, population__may INTEGER, location VARCHAR, barangay VARCHAR)
SELECT grid FROM table_name_53 WHERE laps = 6
What grid features 6 laps?
CREATE TABLE table_name_53 ( grid VARCHAR, laps VARCHAR )
SELECT date FROM table_22879262_7 WHERE game = 29
what ist he date of game 29?
CREATE TABLE table_22879262_7 (date VARCHAR, game VARCHAR)
SELECT MAX(share) FROM table_20522228_2 WHERE rank__overall_ = "54"
What was the share for rank 54?
CREATE TABLE table_20522228_2 (share INTEGER, rank__overall_ VARCHAR)
SELECT "Passing Yards per Game" FROM table_29554 WHERE "Rushing Yards per Game" = '113.6'
What is every value for passing yards per game if rushing yards per game is 113.6?
CREATE TABLE table_29554 ( "Season" text, "Points per Game" text, "Total Yards per Game" text, "Rushing Yards per Game" text, "Passing Yards per Game" text, "Sacks" text, "Interceptions" text )
SELECT location_attendance FROM table_22879262_7 WHERE game = 27
what is the location attendance for game 27?
CREATE TABLE table_22879262_7 (location_attendance VARCHAR, game VARCHAR)
SELECT rating / SHARE(18 - 49) FROM table_20522228_2 WHERE viewers__millions_ = "5.50"
What are the ratings/share ratio when viewers are 5.50 Million?
CREATE TABLE table_20522228_2 (rating VARCHAR, viewers__millions_ VARCHAR)
SELECT COUNT(DISTINCT uid) FROM tweets
Find the number of users who posted some tweets.
CREATE TABLE tweets ( id number, uid number, text text, createdate time ) CREATE TABLE user_profiles ( uid number, name text, email text, partitionid number, followers number ) CREATE TABLE follows ( f1 number, f2 number )
SELECT COUNT(high_rebounds) FROM table_22879262_7 WHERE team = "Minnesota"
what is the total number of high rebounds for minnesota?
CREATE TABLE table_22879262_7 (high_rebounds VARCHAR, team VARCHAR)
SELECT rank__timeslot_ FROM table_20522228_2 WHERE rating = "4.1"
What are the rank timeslots where ratings are 4.1?
CREATE TABLE table_20522228_2 (rank__timeslot_ VARCHAR, rating VARCHAR)
SELECT "Method" FROM table_69979 WHERE "Race" = 'native american' AND "Date of Execution" = 'july 1836'
How was the native american executed in July 1836?
CREATE TABLE table_69979 ( "Name" text, "Date of Execution" text, "Crime" text, "Method" text, "Race" text )
SELECT high_rebounds FROM table_22879323_10 WHERE date = "April 4"
What were the high rebounds on April 4?
CREATE TABLE table_22879323_10 (high_rebounds VARCHAR, date VARCHAR)
SELECT rank__overall_ FROM table_20522228_2 WHERE viewers__millions_ = "6.59"
What is overall rank when viewers are at 6.59 million?
CREATE TABLE table_20522228_2 (rank__overall_ VARCHAR, viewers__millions_ VARCHAR)
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'nephritis nos in oth dis') AND DATETIME(diagnoses_icd.charttime) >= DATETIME(CURRENT_TIME(), '-5 year')) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE admissions.subject_id IN (SELECT patients.subject_id FROM patients WHERE patients.gender = 'f') AND admissions.age BETWEEN 20 AND 29 AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-5 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME(t2.startdate) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 month') GROUP BY t2.drug) AS t3 WHERE t3.c1 <= 5
what were the five most common drugs prescribed to the female patients 20s within 2 months after being diagnosed with nephritis nos in oth dis since 5 years ago?
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 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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name 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 outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) 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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title 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 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_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 )
SELECT score FROM table_22879323_10 WHERE game = 80
What was the score when the game was 80?
CREATE TABLE table_22879323_10 (score VARCHAR, game VARCHAR)
SELECT episode FROM table_20522228_2 WHERE share = 8
What was the episode name when share was 8?
CREATE TABLE table_20522228_2 (episode VARCHAR, share VARCHAR)