answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT bonus_points FROM table_27293285_2 WHERE lost = "18" | How many bonus points did the club who had 18 losses have? | CREATE TABLE table_27293285_2 (bonus_points VARCHAR, lost VARCHAR) |
SELECT "Candidates" FROM table_74012 WHERE "Incumbent" = 'John Boyle' | Name the candidates for john boyle | CREATE TABLE table_74012 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
) |
SELECT vehicle FROM table_24620684_2 WHERE epa_rated_combined_fuel_economy = "102 mpg-e (33kW-hrs/100mi)" | When 102 mpg-e (33kw-hrs/100mi) is the epa rated combined fuel economy what is the vehicle type? | CREATE TABLE table_24620684_2 (vehicle VARCHAR, epa_rated_combined_fuel_economy VARCHAR) |
SELECT points_for FROM table_27293285_2 WHERE club = "Munster" | How many points for did Munster have? | CREATE TABLE table_27293285_2 (points_for VARCHAR, club VARCHAR) |
SELECT "Still Open?" FROM table_63666 WHERE "Restaurant Name" = 'locavore' | is the restaurant locavore still open? | CREATE TABLE table_63666 (
"Restaurant Name" text,
"Original Name" text,
"Location" text,
"Chef" text,
"Designer" text,
"Still Open?" text
) |
SELECT COUNT(vehicle) FROM table_24620684_2 WHERE clean_electric_grid_california__san_francisco_ = "100 g/mi (62 g/km)" | When 100 g/mi (62 g/km) is the clean electric grid california (san francisco) how many vehicles are there? | CREATE TABLE table_24620684_2 (vehicle VARCHAR, clean_electric_grid_california__san_francisco_ VARCHAR) |
SELECT points_against FROM table_27293285_2 WHERE points_for = "353" | How many points against did the club who had 353 points for have? | CREATE TABLE table_27293285_2 (points_against VARCHAR, points_for VARCHAR) |
SELECT finish FROM table_name_95 WHERE year = "1954" | What was Jack McGrath's finish number in 1954? | CREATE TABLE table_name_95 (
finish VARCHAR,
year VARCHAR
) |
SELECT us_national_average_electric_mix FROM table_24620684_2 WHERE dirty_electric_grid_rocky_mountains__denver_ = "380 g/mi (236 g/km)" | When 380 g/mi (236 g/km) is the dirty electric grid rocky mountains (denver) what is the u.s national average electric mix? | CREATE TABLE table_24620684_2 (us_national_average_electric_mix VARCHAR, dirty_electric_grid_rocky_mountains__denver_ VARCHAR) |
SELECT team FROM table_27312918_5 WHERE game = 4 | What was the team the Suns played against in game number 4? | CREATE TABLE table_27312918_5 (team VARCHAR, game VARCHAR) |
SELECT constructor FROM table_name_50 WHERE driver = "heinz-harald frentzen" | What is the constructor of the driver Heinz-Harald Frentzen? | CREATE TABLE table_name_50 (
constructor VARCHAR,
driver VARCHAR
) |
SELECT us_national_average_electric_mix FROM table_24620684_2 WHERE vehicle = "BMW ActiveE" | When bmw activee is the vehicle type what is the u.s national average electric mix? | CREATE TABLE table_24620684_2 (us_national_average_electric_mix VARCHAR, vehicle VARCHAR) |
SELECT high_points FROM table_27312918_5 WHERE game = 5 | Who got the most points in game number 5? | CREATE TABLE table_27312918_5 (high_points VARCHAR, game VARCHAR) |
SELECT * FROM table_train_38 WHERE left_ventricular_ejection_fraction_lvef < 30 | left ventricular ejection fraction less than 30 % | CREATE TABLE table_train_38 (
"id" int,
"left_ventricular_ejection_fraction_lvef" int,
"child_pugh_class" string,
"systolic_blood_pressure_sbp" int,
"heart_disease" bool,
"acute_hepatitis" bool,
"liver_disease" bool,
"heart_rate" int,
"NOUSE" float
) |
SELECT COUNT(operating_mode) FROM table_24620684_2 WHERE epa_rated_combined_fuel_economy = "87 mpg-e (39kW-hrs/100mi)" | When 87 mpg-e (39kw-hrs/100mi) is the epa rated combined fuel economy how many operating modes are there? | CREATE TABLE table_24620684_2 (operating_mode VARCHAR, epa_rated_combined_fuel_economy VARCHAR) |
SELECT default_desktop_environment FROM table_27329061_2 WHERE code_base = "Ubuntu 8.04" AND edition = "Fluxbox CE" | What is the default desktop environment when the code base is ubuntu 8.04 and edition is fluxbox ce? | CREATE TABLE table_27329061_2 (default_desktop_environment VARCHAR, code_base VARCHAR, edition VARCHAR) |
SELECT Statement_Details, AVG(Account_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details ORDER BY AVG(Account_Details) | Show the average of account details for different statement details in a bar chart, and order by the Y in ascending. | CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
) |
SELECT opponents FROM table_24638867_6 WHERE score = "6–2, 3–6, 6–3" | Name the opponents for 6–2, 3–6, 6–3 | CREATE TABLE table_24638867_6 (opponents VARCHAR, score VARCHAR) |
SELECT compatible_repository FROM table_27329061_2 WHERE version = "Old version, no longer supported: 9" AND default_desktop_environment = "LXDE" | What is the compatible repository when the version is old version, no longer supported: 9 and default desktop environment is lxde? | CREATE TABLE table_27329061_2 (compatible_repository VARCHAR, version VARCHAR, default_desktop_environment VARCHAR) |
SELECT method FROM table_name_68 WHERE opponent = "travis fulton" | Which method had Travis Fulton as an opponent? | CREATE TABLE table_name_68 (
method VARCHAR,
opponent VARCHAR
) |
SELECT championship FROM table_24638867_6 WHERE outcome = "Winner" AND score = "7–5, 4–6, 6–1" | Name the championship for outcome being winner for 7–5, 4–6, 6–1 | CREATE TABLE table_24638867_6 (championship VARCHAR, outcome VARCHAR, score VARCHAR) |
SELECT codename FROM table_27329061_2 WHERE code_base = "Ubuntu 8.04" AND edition = "Fluxbox CE" | What is the the codename when the code base is ubuntu 8.04 and the edition is fluxbox ce? | CREATE TABLE table_27329061_2 (codename VARCHAR, code_base VARCHAR, edition VARCHAR) |
SELECT floors FROM table_name_43 WHERE location = "aston" | How many floors did the tallest building in Aston have? | CREATE TABLE table_name_43 (
floors VARCHAR,
location VARCHAR
) |
SELECT score FROM table_24638867_6 WHERE outcome = "Winner" AND opponents = "Julie Halard-Decugis Ai Sugiyama" | Name the score for winner and julie halard-decugis ai sugiyama | CREATE TABLE table_24638867_6 (score VARCHAR, outcome VARCHAR, opponents VARCHAR) |
SELECT default_desktop_environment FROM table_27329061_2 WHERE edition = "KDE" AND compatible_repository = "Ubuntu 13.04" | What is the default desktop environment when the edition is kde and the compatible repository is ubuntu 13.04? | CREATE TABLE table_27329061_2 (default_desktop_environment VARCHAR, edition VARCHAR, compatible_repository VARCHAR) |
SELECT DISTINCT city FROM addresses | List all the distinct cities | CREATE TABLE order_items (
order_id number,
product_id number,
order_quantity text
)
CREATE TABLE customer_addresses (
customer_id number,
address_id number,
date_address_from time,
address_type text,
date_address_to time
)
CREATE TABLE products (
product_id number,
product_details text
)
CREATE TABLE addresses (
address_id number,
address_content text,
city text,
zip_postcode text,
state_province_county text,
country text,
other_address_details text
)
CREATE TABLE customer_orders (
order_id number,
customer_id number,
order_status text,
order_date time,
order_details text
)
CREATE TABLE customers (
customer_id number,
payment_method text,
customer_name text,
date_became_customer time,
other_customer_details text
)
CREATE TABLE customer_contact_channels (
customer_id number,
channel_code text,
active_from_date time,
active_to_date time,
contact_number text
) |
SELECT championship FROM table_24638867_6 WHERE score = "7–5, 6–4" AND surface = "Hard" | Name the championship for hard surface 7–5, 6–4 | CREATE TABLE table_24638867_6 (championship VARCHAR, score VARCHAR, surface VARCHAR) |
SELECT version FROM table_27329061_2 WHERE codename = "Ada" | What is the version when the codename is ada? | CREATE TABLE table_27329061_2 (version VARCHAR, codename VARCHAR) |
SELECT name FROM wrestler ORDER BY days_held LIMIT 1 | What is the name of the wrestler with the fewest days held? | CREATE TABLE wrestler (
wrestler_id number,
name text,
reign text,
days_held text,
location text,
event text
)
CREATE TABLE elimination (
elimination_id text,
wrestler_id text,
team text,
eliminated_by text,
elimination_move text,
time text
) |
SELECT surface FROM table_24638867_6 WHERE partner = "Nathalie Tauziat" | Name the surface for nathalie tauziat | CREATE TABLE table_24638867_6 (surface VARCHAR, partner VARCHAR) |
SELECT version FROM table_27329061_2 WHERE compatible_repository = "Xubuntu 10.04" | What is the version when the compatible reposityory is xubuntu 10.04 | CREATE TABLE table_27329061_2 (version VARCHAR, compatible_repository VARCHAR) |
SELECT semi_finalists FROM table_name_43 WHERE week_of = "12 june" AND runner_up = "lori mcneil" | Who are the semi finalists on the week of 12 june, when the runner-up is listed as Lori McNeil? | CREATE TABLE table_name_43 (
semi_finalists VARCHAR,
week_of VARCHAR,
runner_up VARCHAR
) |
SELECT MAX(year) FROM table_24642706_1 WHERE money_list_rank = 74 | Name the most year for money list rank is 74 | CREATE TABLE table_24642706_1 (year INTEGER, money_list_rank VARCHAR) |
SELECT MAX(population__2001_) FROM table_27366772_3 | What is the highest population in 2001? | CREATE TABLE table_27366772_3 (population__2001_ INTEGER) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "10" AND prescriptions.route = "BOTH EYES" | among patients who remained admitted in hospital for more than 10 days, how many of them got drug administered in both eyes? | 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 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
) |
SELECT team_s_ FROM table_2463383_2 WHERE avg_start = "20.5" | Name the team for avg start being 20.5 | CREATE TABLE table_2463383_2 (team_s_ VARCHAR, avg_start VARCHAR) |
SELECT district FROM table_27366772_3 WHERE armenian = "Քանաքեր-Զեյթուն" | What district is known in Armenian as քանաքեր-զեյթուն? | CREATE TABLE table_27366772_3 (district VARCHAR, armenian VARCHAR) |
SELECT AVG("Year") FROM table_13598 WHERE "Title" = 'faces' | What is the average year for Faces? | CREATE TABLE table_13598 (
"Year" real,
"Title" text,
"Singapore 987FM Top Position" text,
"Singapore Power98 Top Position" text,
"Album" text
) |
SELECT team_s_ FROM table_2463383_2 WHERE wins = 0 AND top_5 = 0 AND poles = 0 AND avg_start = "37.0" | Name the team for wins being 0 and top 5 is 0 and poles is 0 and avg start is 37.0 | CREATE TABLE table_2463383_2 (team_s_ VARCHAR, avg_start VARCHAR, poles VARCHAR, wins VARCHAR, top_5 VARCHAR) |
SELECT armenian FROM table_27366772_3 WHERE area__km²_ = "8.37" | What is the Armenian name of the district that is 8.37 km² large? | CREATE TABLE table_27366772_3 (armenian VARCHAR, area__km²_ VARCHAR) |
SELECT All_Neutral, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent | Show me about the distribution of All_Neutral and All_Games_Percent in a bar chart, I want to display by the total number in ascending. | CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
) |
SELECT winnings FROM table_2463383_2 WHERE position = "23rd" | Name the winnings for 23rd position | CREATE TABLE table_2463383_2 (winnings VARCHAR, position VARCHAR) |
SELECT soccer_stadium FROM table_27369069_1 WHERE province = "NL" | What is the name of the soccer stadium in NL providence? | CREATE TABLE table_27369069_1 (soccer_stadium VARCHAR, province VARCHAR) |
SELECT home_captain FROM table_name_25 WHERE result = "aus by 4 wkts" | Who was the Home Captain and the Result for AUS by 4 wkts? | CREATE TABLE table_name_25 (
home_captain VARCHAR,
result VARCHAR
) |
SELECT winnings FROM table_2463383_2 WHERE year = 2004 | Name the winnings for 2004 | CREATE TABLE table_2463383_2 (winnings VARCHAR, year VARCHAR) |
SELECT province FROM table_27369069_1 WHERE founded = 2005 | which providence's soccer stadium was founded in 2005? | CREATE TABLE table_27369069_1 (province VARCHAR, founded VARCHAR) |
SELECT "Original airdate" FROM table_29634 WHERE "#" = '6' | What is the original air date of # 6? | CREATE TABLE table_29634 (
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Viewers" real,
"Original airdate" text,
"Prod. code" real
) |
SELECT COUNT(top_10) FROM table_2463383_2 WHERE avg_start = "37.3" | Name the total number of top 10 for avg start being 37.3 | CREATE TABLE table_2463383_2 (top_10 VARCHAR, avg_start VARCHAR) |
SELECT varsity_name FROM table_27369069_1 WHERE city = "Charlottetown" | What is the team mascot for the soccer team in Charlottetown? | CREATE TABLE table_27369069_1 (varsity_name VARCHAR, city VARCHAR) |
SELECT SUM("Game") FROM table_9378 WHERE "Date" = 'december 5' | How many games were on December 5? | CREATE TABLE table_9378 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT method_of_elimination FROM table_24628683_2 WHERE time = "24:02" | What was the method of elimination in the chamber with a time of 24:02? | CREATE TABLE table_24628683_2 (method_of_elimination VARCHAR, time VARCHAR) |
SELECT province FROM table_27369069_1 WHERE stadium_capacity = "4,000" | Which province has the soccer stadium that holds 4,000 people? | CREATE TABLE table_27369069_1 (province VARCHAR, stadium_capacity VARCHAR) |
SELECT COUNT("Round") FROM table_68340 WHERE "Method" = 'tko (punches)' AND "Time" = '0:40' | what is the total number of rounds when method is tko (punches) and time is 0:40? | CREATE TABLE table_68340 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) |
SELECT COUNT(wrestler) FROM table_24628683_2 WHERE method_of_elimination = "Pinned after being hit by a lead pipe" | How many wrestlers are recorded for the chamber that's method of elimination was pinned after being hit by a lead pipe? | CREATE TABLE table_24628683_2 (wrestler VARCHAR, method_of_elimination VARCHAR) |
SELECT university FROM table_27369069_1 WHERE soccer_stadium = "Moncton Stadium" | Which University's soccer stadium in named Moncton Stadium? | CREATE TABLE table_27369069_1 (university VARCHAR, soccer_stadium VARCHAR) |
SELECT COUNT("Blocks") FROM table_27553 WHERE "Points" = '89' | How many players 89 points? | CREATE TABLE table_27553 (
"Player" text,
"Games Played" real,
"Rebounds" real,
"Assists" real,
"Steals" real,
"Blocks" real,
"Points" real
) |
SELECT method_of_elimination FROM table_24628683_2 WHERE wrestler = "Kofi Kingston" | What was the method of elimination for Kofi Kingston/ | CREATE TABLE table_24628683_2 (method_of_elimination VARCHAR, wrestler VARCHAR) |
SELECT current_womens_lacrosse_conference FROM table_27378582_1 WHERE enrollment = 6000 | Name the current womens lacrosse conference for 6000 enrollment | CREATE TABLE table_27378582_1 (current_womens_lacrosse_conference VARCHAR, enrollment VARCHAR) |
SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Self Pay" AND demographic.diagnosis = "STEMI" | what is maximum age of patients whose insurance is self pay and primary disease is stemi? | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE 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
) |
SELECT championship FROM table_24638867_4 WHERE surface = "Clay" AND opponent = "Virginia Ruano Pascual Paola Suárez" | What championships were played on clay and the opponent was virginia ruano pascual paola suárez? | CREATE TABLE table_24638867_4 (championship VARCHAR, surface VARCHAR, opponent VARCHAR) |
SELECT city FROM table_27378582_1 WHERE enrollment = 19900 | Name the city for enrollment being 19900 | CREATE TABLE table_27378582_1 (city VARCHAR, enrollment VARCHAR) |
SELECT "Year (Ceremony)" FROM table_76393 WHERE "Original title" = 'zona sur' | What year was Zona Sur nominated? | CREATE TABLE table_76393 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Original title" text,
"Language(s)" text,
"Director" text,
"Result" text
) |
SELECT championship FROM table_24638867_4 WHERE partner = "Natasha Zvereva" | What championships had a match where Natasha Zvereva played as partner? | CREATE TABLE table_24638867_4 (championship VARCHAR, partner VARCHAR) |
SELECT current_womens_lacrosse_conference FROM table_27378582_1 WHERE nickname = "Bison" | Name the current womens lacrosse conference for bison | CREATE TABLE table_27378582_1 (current_womens_lacrosse_conference VARCHAR, nickname VARCHAR) |
SELECT "Record" FROM table_42209 WHERE "Date" = 'may 20, 1961' | What is the Record with a Date that is may 20, 1961? | CREATE TABLE table_42209 (
"Record" text,
"Athlete" text,
"Nation" text,
"Venue" text,
"Date" text
) |
SELECT original_air_date FROM table_24648983_1 WHERE № = 4 | What day did episode number 4 air originally? | CREATE TABLE table_24648983_1 (original_air_date VARCHAR, № VARCHAR) |
SELECT MAX(founded) FROM table_27378582_1 WHERE nickname = "Bison" | Name the most founded for bison | CREATE TABLE table_27378582_1 (founded INTEGER, nickname VARCHAR) |
SELECT MIN(total) FROM table_name_42 WHERE gold = 11 AND bronze > 2 | What is the smallest total that has 11 golds and bronzes over 2? | CREATE TABLE table_name_42 (
total INTEGER,
gold VARCHAR,
bronze VARCHAR
) |
SELECT written_by FROM table_24648983_1 WHERE us_viewers__million_ = "8.61" | Who wrote the episode with 8.61 million U.S. viewers? | CREATE TABLE table_24648983_1 (written_by VARCHAR, us_viewers__million_ VARCHAR) |
SELECT MAX(weeks_at__number1) FROM table_27441210_12 WHERE artist = "K.Maro" | How many weeks was K.Maro at #1? | CREATE TABLE table_27441210_12 (weeks_at__number1 INTEGER, artist VARCHAR) |
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'hormonal therapy (for varices)')) AND DATETIME(cost.chargetime) >= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY cost.patienthealthsystemstayid) AS t1 | what is the minimum hospital cost that includes a procedure known as hormonal therapy (for varices) since 3 years 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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime 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 cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
) |
SELECT original_air_date FROM table_24648983_1 WHERE us_viewers__million_ = "8.61" | What date did the episode with 8.61 million U.S. viewers originally air? | CREATE TABLE table_24648983_1 (original_air_date VARCHAR, us_viewers__million_ VARCHAR) |
SELECT MAX(weeks_at__number1) FROM table_27441210_12 WHERE country = "France" | How many weeks was France at #1? | CREATE TABLE table_27441210_12 (weeks_at__number1 INTEGER, country VARCHAR) |
SELECT MAX(points) FROM table_name_56 WHERE grid > 7 AND driver = "alex tagliani" AND laps < 85 | Which Points have a Grid larger than 7, and a Driver of alex tagliani, and a Lapse smaller than 85? | CREATE TABLE table_name_56 (
points INTEGER,
laps VARCHAR,
grid VARCHAR,
driver VARCHAR
) |
SELECT title FROM table_24648983_1 WHERE us_viewers__million_ = "9.89" | What is the name of the episode that had 9.89 million U.S. viewers? | CREATE TABLE table_24648983_1 (title VARCHAR, us_viewers__million_ VARCHAR) |
SELECT number_one_single_s_ FROM table_27441210_20 WHERE weeks_at__number1 = 5 | Name the number one singles for week 1 being 5 | CREATE TABLE table_27441210_20 (number_one_single_s_ VARCHAR, weeks_at__number1 VARCHAR) |
SELECT prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Diltiazem" | what is drug type and drug route of drug name diltiazem? | 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 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
) |
SELECT model__list_ FROM table_2467150_2 WHERE processor = "Kentsfield" AND brand_name = "Xeon" | What is the value for model if processor is Kentsfield and brand name is Xeon? | CREATE TABLE table_2467150_2 (model__list_ VARCHAR, processor VARCHAR, brand_name VARCHAR) |
SELECT number_one_single_s_ FROM table_27441210_5 WHERE artist = "Desvarieux, Jacob" | Name the number one singles for desvarieux, jacob | CREATE TABLE table_27441210_5 (number_one_single_s_ VARCHAR, artist VARCHAR) |
SELECT "Record" FROM table_18753 WHERE "Date" = 'January 21' | what are all the record where date is january 21 | CREATE TABLE table_18753 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT tdp FROM table_2467150_2 WHERE model__list_ = "X53xx" | What is every value for TDP if model is x53xx? | CREATE TABLE table_2467150_2 (tdp VARCHAR, model__list_ VARCHAR) |
SELECT MIN(weeks_at__number1) FROM table_27441210_5 WHERE year = 1988 | Name the least weeks at number 1 for 1988 | CREATE TABLE table_27441210_5 (weeks_at__number1 INTEGER, year VARCHAR) |
SELECT MIN("Snatch") FROM table_61195 WHERE "Total (kg)" < '318' AND "Clean & Jerk" > '175' | WHAT IS THE SNATCH WITH TOTAL KG SMALLER THAN 318, AND CLEAN JERK LARGER THAN 175? | CREATE TABLE table_61195 (
"Name" text,
"Bodyweight" real,
"Snatch" real,
"Clean & Jerk" real,
"Total (kg)" real
) |
SELECT cores FROM table_2467150_2 WHERE tdp = "17 W" | What is every value for cores if TDP is 17 W? | CREATE TABLE table_2467150_2 (cores VARCHAR, tdp VARCHAR) |
SELECT title FROM table_27450976_1 WHERE written_by = "Scott M. Gimple" | What is the name of the episode that was written by Scott M. Gimple? | CREATE TABLE table_27450976_1 (title VARCHAR, written_by VARCHAR) |
SELECT "pts." FROM table_200_4 WHERE "team" = 'portugal' | how many points did portugal score in the 1994 europeans men 's handball championship preliminary round ? | CREATE TABLE table_200_4 (
id number,
"team" text,
"p" number,
"w" number,
"t" number,
"l" number,
"gf" number,
"ga" number,
"gd" number,
"pts." number
) |
SELECT production_code FROM table_24649082_1 WHERE written_by = "J. H. Wyman & Jeff Pinkner" | What is the production code for the episode written by J. H. Wyman & Jeff Pinkner? | CREATE TABLE table_24649082_1 (production_code VARCHAR, written_by VARCHAR) |
SELECT title FROM table_27450976_1 WHERE production_code = "2J5504" | What is the title of the episode with a production code of 2j5504? | CREATE TABLE table_27450976_1 (title VARCHAR, production_code VARCHAR) |
SELECT COUNT(*) FROM has_allergy AS T1 JOIN allergy_type AS T2 ON T1.allergy = T2.allergy WHERE T2.allergytype = "food" | How many students have a food allergy? | CREATE TABLE allergy_type (
allergy text,
allergytype text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE has_allergy (
stuid number,
allergy text
) |
SELECT title FROM table_24649082_1 WHERE directed_by = "Charles Beeson" | What is the title of the episode directed by Charles Beeson? | CREATE TABLE table_24649082_1 (title VARCHAR, directed_by VARCHAR) |
SELECT COUNT(written_by) FROM table_27450976_1 WHERE production_code = "2J5507" | How many people wrote the episode with a production code of 2j5507? | CREATE TABLE table_27450976_1 (written_by VARCHAR, production_code VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 's/p thoracoscopic procedure - pleurodesis' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.drugstarttime AND DATETIME(t1.diagnosistime, 'start of month') = DATETIME(t2.drugstarttime, 'start of month') GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 3 | during the last year, what were the three most frequent drugs that were prescribed to patients during the same month after being diagnosed with s/p thoracoscopic procedure - pleurodesis? | 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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime 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
)
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 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 cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
) |
SELECT COUNT(original_air_date) FROM table_24649082_1 WHERE written_by = "David H. Goodman & Andrew Kreisberg" | How many original air dates for the episode written by David H. Goodman & Andrew Kreisberg? | CREATE TABLE table_24649082_1 (original_air_date VARCHAR, written_by VARCHAR) |
SELECT MAX(no_in_series) FROM table_27491610_2 WHERE directed_by = "Skip Sudduth" | What was the latest number in series that was directed by Skip Sudduth? | CREATE TABLE table_27491610_2 (no_in_series INTEGER, directed_by VARCHAR) |
SELECT handicap FROM table_2896329_1 WHERE prize_money = "120s" | What was the handicap when the prize money was 120s? | CREATE TABLE table_2896329_1 (
handicap VARCHAR,
prize_money VARCHAR
) |
SELECT MAX(_number) FROM table_24649082_1 WHERE written_by = "Matthew Pitts" | What is the most recent episode number written by Matthew Pitts? | CREATE TABLE table_24649082_1 (_number INTEGER, written_by VARCHAR) |
SELECT no_in_season FROM table_27491610_2 WHERE us_viewers__millions_ = "10.18" | What number in season had 10.18 million US viewers? | CREATE TABLE table_27491610_2 (no_in_season VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT SUM("Week") FROM table_61657 WHERE "Attendance" < '26,048' | How many weeks have an attendance less than 26,048? | CREATE TABLE table_61657 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
) |
SELECT COUNT(viewers__millions_) FROM table_24689168_5 WHERE episode = 8 | How many records for number of viewers is listed for episode number 8? | CREATE TABLE table_24689168_5 (viewers__millions_ VARCHAR, episode VARCHAR) |
SELECT original_air_date FROM table_27491610_2 WHERE directed_by = "Alex Zakrzewski" | What was the original air date of the episode that was directed by Alex Zakrzewski? | CREATE TABLE table_27491610_2 (original_air_date VARCHAR, directed_by VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.