answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT us_viewers__millions_ FROM table_22078972_2 WHERE no_in_series = 103 | How many millions of people in the US saw the episode with series number 103? | CREATE TABLE table_22078972_2 (us_viewers__millions_ VARCHAR, no_in_series 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND flight.arrival_time < 1800 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND flight.departure_time BETWEEN 1200 AND 1800) AND flight.stops = 0 | i'd like to find a nonstop flight from BOSTON to ATLANTA that leaves sometime in the afternoon and arrives in ATLANTA before evening | CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time 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 equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code 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 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 month (
month_number int,
month_name text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_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 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 ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight 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
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type 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 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 city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
) |
SELECT icelandic FROM table_name_47 WHERE norwegian__nynorsk_ = "kvitt/kvit" | Which Icelandic has a Norwegian (nynorsk) of kvitt/kvit? | CREATE TABLE table_name_47 (icelandic VARCHAR, norwegian__nynorsk_ VARCHAR) |
SELECT no_in_series FROM table_22078906_2 WHERE us_viewers__millions_ = "15.89" | What number episode in the series was watched by 15.89 million U.S. viewers? | CREATE TABLE table_22078906_2 (no_in_series VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.formats = "mp3" INTERSECT SELECT song_name FROM song WHERE resolution < 1000 | Return the names of songs for which format is mp3 and resolution is below 1000. | CREATE TABLE genre (
g_name text,
rating text,
most_popular_in text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
rating number,
languages text,
releasedate time,
resolution number
)
CREATE TABLE files (
f_id number,
artist_name text,
file_size text,
duration text,
formats text
)
CREATE TABLE artist (
artist_name text,
country text,
gender text,
preferred_genre text
) |
SELECT faroese FROM table_name_83 WHERE english = "white" | Which Faroese has an English of white? | CREATE TABLE table_name_83 (faroese VARCHAR, english VARCHAR) |
SELECT title FROM table_22078906_2 WHERE directed_by = "William Webb" | What is the title of the episode directed by William Webb? | CREATE TABLE table_22078906_2 (title VARCHAR, directed_by VARCHAR) |
SELECT COUNT("Best UK team") FROM table_22958 WHERE "Class 1-200" = 'University of Birmingham' | Name the best uk team for university of birmingham | CREATE TABLE table_22958 (
"Year" text,
"Location" text,
"Class 1" text,
"Best UK team" text,
"Class 1-200" text,
"Class 3" text,
"Class 1a" text
) |
SELECT norwegian__nynorsk_ FROM table_name_12 WHERE danish = "farvel" | Which Norwegian (nynorsk) has a Danish of farvel? | CREATE TABLE table_name_12 (norwegian__nynorsk_ VARCHAR, danish VARCHAR) |
SELECT result FROM table_2208838_2 WHERE runner_up = "River Plate" | What was the final score when River Plate was the runner-up? | CREATE TABLE table_2208838_2 (result VARCHAR, runner_up VARCHAR) |
SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime 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 = 'ch ob asthma w stat asth')) AS t1 GROUP BY t1.subject_id HAVING MIN(t1.charttime) = t1.charttime) AS t2 JOIN (SELECT patients.subject_id, admissions.hadm_id, patients.dod FROM admissions JOIN patients ON patients.subject_id = admissions.subject_id WHERE NOT patients.dod IS NULL) AS t3 ON t2.subject_id = t3.subject_id WHERE DATETIME(t2.charttime, 'start of month') = DATETIME(t3.dod, 'start of month') | how many patient have died after they were diagnosed with ch ob asthma w stat asth in the same month? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label 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 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 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime 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 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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_diagnoses (
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
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
) |
SELECT english FROM table_name_69 WHERE danish = "rødt/rød" | Which English has a Danish of rødt/rød? | CREATE TABLE table_name_69 (english VARCHAR, danish VARCHAR) |
SELECT spent_per_voter___php__ FROM table_22097588_9 WHERE amount_spent___php__ = "210,280,000" | What was spent per voter when total amount spent was 210,280,000? | CREATE TABLE table_22097588_9 (spent_per_voter___php__ VARCHAR, amount_spent___php__ VARCHAR) |
SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-55503')) AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-1 year') | has patient 028-55503 ever received a diagnosis since 1 year ago? | 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 intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime 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 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 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 microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) |
SELECT congress FROM table_name_97 WHERE _number_of_cosponsors = 44 | What number of Congress has 44 cosponsors? | CREATE TABLE table_name_97 (congress VARCHAR, _number_of_cosponsors VARCHAR) |
SELECT spent_per_voter___php__ FROM table_22097588_9 WHERE spent_per_vote___php__ = "20.07" | What was spent per voter when the spent per vote was 20.07? | CREATE TABLE table_22097588_9 (spent_per_voter___php__ VARCHAR, spent_per_vote___php__ VARCHAR) |
SELECT laps FROM table_name_35 WHERE time_retired = "+8 laps" | Tell me the Laps for time/retired of +8 laps | CREATE TABLE table_name_35 (
laps VARCHAR,
time_retired VARCHAR
) |
SELECT sponsor FROM table_name_43 WHERE date_introduced = "april 22, 2004" | Who was the sponsor on April 22, 2004? | CREATE TABLE table_name_43 (sponsor VARCHAR, date_introduced VARCHAR) |
SELECT shows___sellout FROM table_22123920_4 WHERE sellout___percentage_ = "75%" | Between November 25–30, 2008 the sellout rate was at 75%, indicating that the ration between shows to sellout was what? | CREATE TABLE table_22123920_4 (shows___sellout VARCHAR, sellout___percentage_ VARCHAR) |
SELECT lens__35mm_equiv__zoom, _aperture FROM table_name_79 WHERE model = "coolpix 5400" | What is the lens zoom and aperture for the coolpix 5400? | CREATE TABLE table_name_79 (
lens__35mm_equiv__zoom VARCHAR,
_aperture VARCHAR,
model VARCHAR
) |
SELECT score FROM table_name_98 WHERE home = "new york rangers" | What is the score of the game when the New York Rangers were the home team? | CREATE TABLE table_name_98 (score VARCHAR, home VARCHAR) |
SELECT tickets_sold___available FROM table_22123920_4 WHERE gross_sales = "$2,628,457" | During the period in which gross sales totals for "The Show Girl Must Go On" reached $2,628,457, what did the numbers show for tickets sold/ available at the box office? | CREATE TABLE table_22123920_4 (tickets_sold___available VARCHAR, gross_sales VARCHAR) |
SELECT COUNT("districts") FROM table_204_739 WHERE "population" > 100000 | how many districts have more than 100,000 people in this city ? | CREATE TABLE table_204_739 (
id number,
"districts" text,
"ubigeo" number,
"area\n(km2)" number,
"population" number,
"population density\n(/km2)" number,
"created" text,
"postal\ncode" number
) |
SELECT result FROM table_name_26 WHERE date = "8 october 1961" | What was the result on 8 October 1961? | CREATE TABLE table_name_26 (result VARCHAR, date VARCHAR) |
SELECT dates__mdy_ FROM table_22123920_4 WHERE gross_sales = "$2,877,906" | Which specific dates encompass the time period when "The Show Girl Must Go On" showed a gross sales figure total of $2,877,906? | CREATE TABLE table_22123920_4 (dates__mdy_ VARCHAR, gross_sales VARCHAR) |
SELECT status FROM table_name_84 WHERE authors = "del corro" | What is the status of Author Del Corro? | CREATE TABLE table_name_84 (
status VARCHAR,
authors VARCHAR
) |
SELECT venue FROM table_name_33 WHERE date = "27 april 1964" | What was the venue of the game on 27 April 1964? | CREATE TABLE table_name_33 (venue VARCHAR, date VARCHAR) |
SELECT year__ceremony_ FROM table_22102732_1 WHERE english_title = "Time Out" | What year and the corresponding ceremony was the english titled movie "time out" submitted? | CREATE TABLE table_22102732_1 (year__ceremony_ VARCHAR, english_title VARCHAR) |
SELECT MIN(series__number) FROM table_name_41 WHERE production_code = 717 AND season__number < 17 | Name the least series number with production code of 717 and season number less than 17 | CREATE TABLE table_name_41 (
series__number INTEGER,
production_code VARCHAR,
season__number VARCHAR
) |
SELECT home_team AS score FROM table_name_1 WHERE away_team = "hawthorn" | What is the home team score when the away team was Hawthorn? | CREATE TABLE table_name_1 (home_team VARCHAR, away_team VARCHAR) |
SELECT COUNT(english_title) FROM table_22102732_1 WHERE director = "Carlos Moreno" | How many english titles were directed by carlos moreno? | CREATE TABLE table_22102732_1 (english_title VARCHAR, director VARCHAR) |
SELECT "Away team" FROM table_77788 WHERE "Home team" = 'melbourne' | During melbourne's home game, who was the away team? | CREATE TABLE table_77788 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT score FROM table_name_56 WHERE opponent_in_the_final = "divij sharan" | What was the score of the game against Divij Sharan? | CREATE TABLE table_name_56 (score VARCHAR, opponent_in_the_final VARCHAR) |
SELECT rank_number FROM table_22098274_1 WHERE winning_pitcher = "Kelli Miller" | What is the rank # of kelli miller the winning pitcher? | CREATE TABLE table_22098274_1 (rank_number VARCHAR, winning_pitcher VARCHAR) |
SELECT original_title FROM table_name_36 WHERE film_title_used_in_nomination = "keep smiling" | What was the original title for the film used in nomination of keep smiling? | CREATE TABLE table_name_36 (
original_title VARCHAR,
film_title_used_in_nomination VARCHAR
) |
SELECT score FROM table_name_85 WHERE surface = "hard" AND opponent_in_the_final = "peter gojowczyk" | What was the score of the match that was a played on a hard surface against Peter Gojowczyk? | CREATE TABLE table_name_85 (score VARCHAR, surface VARCHAR, opponent_in_the_final VARCHAR) |
SELECT COUNT(site) FROM table_22098274_1 WHERE date = "May 1, 2004" | How many number of site have May 1, 2004 as the date? | CREATE TABLE table_22098274_1 (site VARCHAR, date VARCHAR) |
SELECT "product" FROM table_204_870 ORDER BY id DESC LIMIT 1 | what is the last product represented in the chart ? | CREATE TABLE table_204_870 (
id number,
"product" text,
"main functionality" text,
"input format" text,
"output format" text,
"platform" text,
"license and cost" text,
"notes" text
) |
SELECT COUNT(attendance) FROM table_name_59 WHERE record = "43-34" | How many attended the game with a record of 43-34? | CREATE TABLE table_name_59 (attendance VARCHAR, record VARCHAR) |
SELECT time FROM table_22098274_1 WHERE site = "USF Softball Field • Tampa, FL" AND result = "W4-0" | At what time is the site usf softball field • tampa, fl and w4-0 is the result? | CREATE TABLE table_22098274_1 (time VARCHAR, site VARCHAR, result VARCHAR) |
SELECT COUNT(appearances) FROM table_name_95 WHERE goals = 5 AND rank < 7 | How many appearances were made by people that had 5 goals and less than 7 rank? | CREATE TABLE table_name_95 (
appearances VARCHAR,
goals VARCHAR,
rank VARCHAR
) |
SELECT opponents FROM table_name_81 WHERE partner = "michelle strebel" | Who was Manuela Maleeva opponent when she played a match partnered with michelle strebel? | CREATE TABLE table_name_81 (opponents VARCHAR, partner VARCHAR) |
SELECT result FROM table_22118197_1 WHERE english_title = "Morning Undersea" | What was the result for the film with the English name of Morning Undersea? | CREATE TABLE table_22118197_1 (result VARCHAR, english_title VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.diagnosis = "CELO-VESSICLE FISTULA" | what is the number of patients whose admission location is clinic referral/premature and primary disease is celo-vessicle fistula? | 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 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) |
SELECT AVG(points) FROM table_name_61 WHERE pct__percentage > 0.685 | When the percent is larger than 0.685, what is the average number of points scored? | CREATE TABLE table_name_61 (points INTEGER, pct__percentage INTEGER) |
SELECT result FROM table_22118197_1 WHERE portuguese_title = "Um Filme Falado" | What was the result of the film with the Portuguese title, Um Filme Falado? | CREATE TABLE table_22118197_1 (result VARCHAR, portuguese_title VARCHAR) |
SELECT COUNT(date) FROM table_27734769_8 WHERE high_assists = "Andre Miller (7)" | How many times was the high assists andre miller (7)? | CREATE TABLE table_27734769_8 (
date VARCHAR,
high_assists VARCHAR
) |
SELECT MIN(pct__percentage) FROM table_name_90 WHERE points < 37 | When less than 37 points are scored, what's the lowest Pct % found? | CREATE TABLE table_name_90 (pct__percentage INTEGER, points INTEGER) |
SELECT portuguese_title FROM table_22118197_1 WHERE english_title = "Belle Toujours" | What is the Portuguese name of the film who's English title is, Belle Toujours? | CREATE TABLE table_22118197_1 (portuguese_title VARCHAR, english_title VARCHAR) |
SELECT place FROM table_name_35 WHERE score = 65 - 70 - 72 = 207 | What was the place when the score was 65-70-72=207? | CREATE TABLE table_name_35 (
place VARCHAR,
score VARCHAR
) |
SELECT round FROM table_name_82 WHERE event = "rings: king of kings 2000 block a" AND record = "6-1" | How many rounds did the event rings: king of kings 2000 block a have with a record of 6-1? | CREATE TABLE table_name_82 (round VARCHAR, event VARCHAR, record VARCHAR) |
SELECT result FROM table_22128871_1 WHERE year__ceremony_ = "2007 (80th)" | What is every result for the ceremony year of 2007 (80th)? | CREATE TABLE table_22128871_1 (result VARCHAR, year__ceremony_ VARCHAR) |
SELECT MAX("Crowd") FROM table_58045 WHERE "Venue" = 'mcg' | What was the highest crowd at the venue MCG? | CREATE TABLE table_58045 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT time FROM table_name_72 WHERE event = "adrenaline mma 3" | How long was the fight 'adrenaline mma 3'? | CREATE TABLE table_name_72 (time VARCHAR, event VARCHAR) |
SELECT english_title FROM table_22128871_1 WHERE result = "Nominee" | What is every English title for the result of nominee? | CREATE TABLE table_22128871_1 (english_title VARCHAR, result VARCHAR) |
SELECT COUNT("name") FROM table_203_298 WHERE "ascended" = 2010 | what is the total number of monarchs that ascended the throne in 2010 ? | CREATE TABLE table_203_298 (
id number,
"rank" number,
"name" text,
"nation(s)" text,
"born" text,
"ascended" text,
"years reigned" text
) |
SELECT record FROM table_name_60 WHERE opponent = "john salter" | What was roberto travern's record when he fought against john salter? | CREATE TABLE table_name_60 (record VARCHAR, opponent VARCHAR) |
SELECT COUNT(director) FROM table_22128871_1 WHERE vietnamese_title = "Gate, gate, paragate" | How many directors have vietnamese titles of Gate, Gate, Paragate? | CREATE TABLE table_22128871_1 (director VARCHAR, vietnamese_title VARCHAR) |
SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T3.number_deaths >= 10 | What are the region names affected by the storm with a number of deaths of least 10? | CREATE TABLE affected_region (
region_id number,
storm_id number,
number_city_affected number
)
CREATE TABLE region (
region_id number,
region_code text,
region_name text
)
CREATE TABLE storm (
storm_id number,
name text,
dates_active text,
max_speed number,
damage_millions_usd number,
number_deaths number
) |
SELECT away_team AS score FROM table_name_16 WHERE venue = "mcg" | What was the score of the away team at the MCG? | CREATE TABLE table_name_16 (away_team VARCHAR, venue VARCHAR) |
SELECT year__ceremony_ FROM table_22128871_1 WHERE result = "Nominee" | What is every ceremony year for the result of nominee? | CREATE TABLE table_22128871_1 (year__ceremony_ VARCHAR, result VARCHAR) |
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-95228') AND NOT patient.unitdischargetime IS NULL ORDER BY patient.unitadmittime LIMIT 1) AND intakeoutput.cellpath LIKE '%output%' ORDER BY intakeoutput.intakeoutputtime DESC LIMIT 1 | tell me the name of the output patient 018-95228 had for the last time on the first icu visit? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime 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 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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime 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 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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
) |
SELECT constructor FROM table_name_1 WHERE grid > 20 AND time_retired = "accident" | Who constructed the car with a grid larger than 20 that got in an accident? | CREATE TABLE table_name_1 (constructor VARCHAR, grid VARCHAR, time_retired VARCHAR) |
SELECT pilot FROM table_221315_3 WHERE max_altitude__miles_ = "55.9" | Who was the pilot of max altitude of 55.9 miles? | CREATE TABLE table_221315_3 (pilot VARCHAR, max_altitude__miles_ VARCHAR) |
SELECT "City" FROM table_40696 WHERE "Region" = 'east' AND "Venue" = 'university hall (university of virginia)' | What city is east region venue University Hall (University of Virginia) in? | CREATE TABLE table_40696 (
"Region" text,
"Host" text,
"Venue" text,
"City" text,
"State" text
) |
SELECT position FROM table_name_6 WHERE cfl_team = "montreal alouettes (via edmonton)" | Which Position has a CFL Team of montreal alouettes (via edmonton)? | CREATE TABLE table_name_6 (position VARCHAR, cfl_team VARCHAR) |
SELECT MAX(fai_space_flights) FROM table_221315_3 WHERE max_mach = "5.65" | What is the highest number of fai space flights when max mach is 5.65? | CREATE TABLE table_221315_3 (fai_space_flights INTEGER, max_mach VARCHAR) |
SELECT date FROM table_name_29 WHERE league_position = "1st" AND result_f___a = "5 – 0" | What date that was the league position was 1st, and the result F A was 5 0? | CREATE TABLE table_name_29 (
date VARCHAR,
league_position VARCHAR,
result_f___a VARCHAR
) |
SELECT player FROM table_name_23 WHERE cfl_team = "montreal alouettes (via hamilton via winnipeg)" | Which Player has a CFL Team of montreal alouettes (via hamilton via winnipeg)? | CREATE TABLE table_name_23 (player VARCHAR, cfl_team VARCHAR) |
SELECT max_altitude__miles_ FROM table_221315_3 WHERE pilot = "Neil Armstrong" | What was the maximum altitude for Neil Armstrong? | CREATE TABLE table_221315_3 (max_altitude__miles_ VARCHAR, pilot VARCHAR) |
SELECT "Score" FROM table_36709 WHERE "Date" = '1/22' | What score has 1/22 as the date? | CREATE TABLE table_36709 (
"Date" text,
"Opponent" text,
"Score" text,
"Record" text,
"Television" text
) |
SELECT position FROM table_name_35 WHERE player = "patrick macdonald" | Which Position has a Player of patrick macdonald? | CREATE TABLE table_name_35 (position VARCHAR, player VARCHAR) |
SELECT COUNT(max_speed__mph_) FROM table_221315_3 WHERE usaf_space_flights = 1 AND total_flights = 34 | How many numbers were recorded under max speed for 1 USAF space flight and total flights 34? | CREATE TABLE table_221315_3 (max_speed__mph_ VARCHAR, usaf_space_flights VARCHAR, total_flights VARCHAR) |
SELECT * FROM table_train_77 WHERE (gender = 'male' OR gender = 'female') AND (age >= 50 AND age <= 90) | male or female 50 to 90 of age inclusive. | CREATE TABLE table_train_77 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"language" string,
"hiv_aids" bool,
"age" float,
"NOUSE" float
) |
SELECT SUM(series) FROM table_name_54 WHERE sixth_place = "joan tena" | What series had Joan Tena in sixth place? | CREATE TABLE table_name_54 (series INTEGER, sixth_place VARCHAR) |
SELECT usaf_space_flights FROM table_221315_3 WHERE max_speed__mph_ = 3822 | What were all USAF space flights when the aximum speed was 3822? | CREATE TABLE table_221315_3 (usaf_space_flights VARCHAR, max_speed__mph_ VARCHAR) |
SELECT COUNT("No.") FROM table_31089 WHERE "Written by" = 'Jim Barnes' AND "U.S. viewers (million)" = '1.82' | Name the number of episodes that jim barnes wrote for 1.82 million viewers | CREATE TABLE table_31089 (
"No." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
) |
SELECT sixth_place FROM table_name_34 WHERE series = 7 | Who was in sixth place in series 7? | CREATE TABLE table_name_34 (sixth_place VARCHAR, series VARCHAR) |
SELECT max_mach FROM table_221315_3 WHERE max_speed__mph_ = 3887 | What was the max mach when the maximum speed was 3887? | CREATE TABLE table_221315_3 (max_mach VARCHAR, max_speed__mph_ VARCHAR) |
SELECT "Gas storage" FROM table_24565 WHERE "Alternative fuel" = 'Yes' | What was the gas storage status for the nation that had 'yes' for alternative fuel? | CREATE TABLE table_24565 (
"Country" text,
"% of imports from Russia" text,
"% cut" text,
"Diversification" text,
"Gas storage" text,
"Alternative fuel" text
) |
SELECT sixth_place FROM table_name_19 WHERE fifth_place = "hugo salazar" | Who was sixth place when Hugo Salazar was fifth place? | CREATE TABLE table_name_19 (sixth_place VARCHAR, fifth_place VARCHAR) |
SELECT away_leg FROM table_2214582_1 WHERE round = 1 AND aggregate = "2-0" | What is the record for the away leg in round 1 and aggregate 2-0? | CREATE TABLE table_2214582_1 (away_leg VARCHAR, round VARCHAR, aggregate VARCHAR) |
SELECT MAX(number_one_s_) FROM table_19542477_8 | What is the highest overall number one(s)? | CREATE TABLE table_19542477_8 (
number_one_s_ INTEGER
) |
SELECT third_place FROM table_name_78 WHERE fifth_place = "fran dieli" | Who was third place when Fran Dieli was fifth place? | CREATE TABLE table_name_78 (third_place VARCHAR, fifth_place VARCHAR) |
SELECT COUNT(parishes) FROM table_221375_1 WHERE province_of_1936 = "Beira Baixa Province" | Name the parishes for beira baixa province | CREATE TABLE table_221375_1 (parishes VARCHAR, province_of_1936 VARCHAR) |
SELECT "Base Fares" FROM table_54999 WHERE "Fare Categories" = 'senior/disabled' | What is the Base Fare in the senior/disabled category? | CREATE TABLE table_54999 (
"Fare Categories" text,
"Base Fares" text,
"Day Pass" text,
"7-Day Pass" text,
"30-Day Pass" text
) |
SELECT order_and_title FROM table_name_88 WHERE elevated = "1261, december 17" AND faction = "angevin" | What is the Order and Title with an Elevated with 1261, december 17, and a Faction with angevin? | CREATE TABLE table_name_88 (order_and_title VARCHAR, elevated VARCHAR, faction VARCHAR) |
SELECT MAX(municipalities) FROM table_221375_1 WHERE province_of_1936 = "Alto Alentejo Province (partly Ribatejo)" | Name the most municipalities for alto alentejo province (partly ribatejo) | CREATE TABLE table_221375_1 (municipalities INTEGER, province_of_1936 VARCHAR) |
SELECT MAX("Played") FROM table_61253 WHERE "Goals Scored" < '18' AND "Lost" > '10' | Name the highest Played of Goals Scored smaller than 18 and a Lost larger than 10? | CREATE TABLE table_61253 (
"Team" text,
"Played" real,
"Draw" real,
"Lost" real,
"Goals Scored" real,
"Goals Conceded" real,
"Points" text
) |
SELECT elector FROM table_name_5 WHERE nationality = "roman" AND elevator = "urban iv" AND elevated = "1261, december 17" | What is the Elector with a Nationality with roman, and an Elevator of urban iv, and an Elevated with 1261, december 17? | CREATE TABLE table_name_5 (elector VARCHAR, elevated VARCHAR, nationality VARCHAR, elevator VARCHAR) |
SELECT province_of_1936 FROM table_221375_1 WHERE district = "Viana do Castelo" | Name province of 1936 viana do castelo | CREATE TABLE table_221375_1 (province_of_1936 VARCHAR, district VARCHAR) |
SELECT "03-04" FROM table_40392 WHERE "95-96" = '337,660' | What is 03-04, when 95-96 is 337,660? | CREATE TABLE table_40392 (
"School year" text,
"95-96" text,
"99-00" text,
"00-01" text,
"01-02" text,
"02-03" text,
"03-04" text,
"04-05" text,
"05-06" text,
"06-07" text
) |
SELECT nationality FROM table_name_36 WHERE elector = "bertrand de saint-martin" | What is the Nationality with an Elector with bertrand de saint-martin? | CREATE TABLE table_name_36 (nationality VARCHAR, elector VARCHAR) |
SELECT score FROM table_2215159_2 WHERE partner = "Rafael Osuna" | What was the score when the partner is Rafael Osuna? | CREATE TABLE table_2215159_2 (score VARCHAR, partner VARCHAR) |
SELECT launched FROM table_name_31 WHERE date_of_commission = "3 may 2001" | What is the Launched which is on 3 may 2001? | CREATE TABLE table_name_31 (
launched VARCHAR,
date_of_commission VARCHAR
) |
SELECT order_and_title FROM table_name_6 WHERE nationality = "roman" AND elector = "matteo orsini rosso" | What is the Order and Title with a Nationality with roman, and an Elector with matteo orsini rosso? | CREATE TABLE table_name_6 (order_and_title VARCHAR, nationality VARCHAR, elector VARCHAR) |
SELECT outcome FROM table_2215159_2 WHERE partner = "Rafael Osuna" | What was the outcome of the game when the partner is Rafael Osuna? | CREATE TABLE table_2215159_2 (outcome VARCHAR, partner VARCHAR) |
SELECT Id AS "post_link", Tags, ViewCount, CreationDate FROM Posts WHERE ParentId IS NULL AND AnswerCount = 0 AND Tags LIKE '<batch-file>' ORDER BY ViewCount LIMIT 100 | Unanswered Inactive Questions for a Specific Tag. Inactive questions with no answers for a specific tag (ViewCount ASC) | CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId 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 ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense 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 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 ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
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 ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId 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 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 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 PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
) |
SELECT elector FROM table_name_56 WHERE faction = "roman" AND elevated = "1244, may 28" | What is the Elector with a Faction of roman, and an Elevated with 1244, may 28? | CREATE TABLE table_name_56 (elector VARCHAR, faction VARCHAR, elevated VARCHAR) |
SELECT surface FROM table_2215159_2 WHERE championship = "French championships" | What is the surface of the French Championships? | CREATE TABLE table_2215159_2 (surface VARCHAR, championship VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.