answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT MAX(time) FROM table_name_35 WHERE country = "spain" AND lane > 8 | Tell me the highest time for spain and lane larger than 8 | CREATE TABLE table_name_35 (time INTEGER, country VARCHAR, lane VARCHAR) |
SELECT AVG("Attendance") FROM table_45717 WHERE "Result" = 'w 23-21' AND "Week" < '5' | Which Attendance has a Result of w 23-21, and a Week smaller than 5? | CREATE TABLE table_45717 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) |
SELECT proto_italo_western_1 FROM table_25401_15 WHERE english = "door" | What is every entry for Proto-Italo-Western 1 when door is English? | CREATE TABLE table_25401_15 (proto_italo_western_1 VARCHAR, english VARCHAR) |
SELECT AVG(heat_rank) FROM table_name_15 WHERE time < 24.02 AND lane = 1 | Tell me the average heat rank for time less than 24.02 and lane of 1 | CREATE TABLE table_name_15 (heat_rank INTEGER, time VARCHAR, lane VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "T5 FRACTURE" AND procedures.icd9_code = "3612" | give me the number of patients whose primary disease is t5 fracture and procedure icd9 code is 3612? | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 COUNT(italian) FROM table_25401_15 WHERE conservative_central_italian_1 = "unu" | How many entries for Italian correspond to the Conservative Central Italian of Unu? | CREATE TABLE table_25401_15 (italian VARCHAR, conservative_central_italian_1 VARCHAR) |
SELECT COUNT(time) FROM table_name_90 WHERE heat_rank = 1 | Tell me the total number of time for heat rank of 1 | CREATE TABLE table_name_90 (time VARCHAR, heat_rank VARCHAR) |
SELECT "02:00 PM" FROM table_39768 WHERE "Time" = 'monday' | Who preforms at 2:00PM on Monday? | CREATE TABLE table_39768 (
"Time" text,
"12:00 PM" text,
"01:00 PM" text,
"02:00 PM" text,
"03:00 PM" text,
"04:00 PM" text,
"05:00 PM" text,
"05:55 PM" text
) |
SELECT latin FROM table_25401_15 WHERE catalan = "mar" | What is every entry for Latin when Catalan is Mar? | CREATE TABLE table_25401_15 (latin VARCHAR, catalan VARCHAR) |
SELECT lcd_screen_size, _pixels FROM table_name_93 WHERE model = "coolpix 5700" | What would the LCD screen size and pixels be for the coolpix 5700? | CREATE TABLE table_name_93 (lcd_screen_size VARCHAR, _pixels VARCHAR, model VARCHAR) |
SELECT Payment_Method_Code, SUM(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code | Please use a pie chart to show the proportion of the total amount of payment by each payment method code. | CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
Policy_Type_Code CHAR(15),
Start_Date DATE,
End_Date DATE
)
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amount_Payment INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
) |
SELECT date FROM table_25428629_1 WHERE stadium = "Thuwunna stadium" | If the stadium name is the Thuwunna Stadium, what is the date? | CREATE TABLE table_25428629_1 (date VARCHAR, stadium 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 SUM("2007") FROM table_75780 WHERE "2000" > '56,6' AND "2006" = '23,2' AND "1998" > '61,1' | How many 2007's have a 2000 greater than 56,6, 23,2 as 2006, and a 1998 greater than 61,1? | CREATE TABLE table_75780 (
"Capital/Region" text,
"1997" real,
"1998" real,
"1999" real,
"2000" real,
"2001" real,
"2002" real,
"2003" real,
"2004" real,
"2005" real,
"2006" real,
"2007" real
) |
SELECT COUNT(opponent) FROM table_25428629_1 WHERE location = "Yangon, Myanmar" | If the location is Yangon, Myanmar, what is the opponent total number? | CREATE TABLE table_25428629_1 (opponent VARCHAR, location VARCHAR) |
SELECT AVG(round) FROM table_name_54 WHERE opponent = "clay guida" | What is the average number of rounds when fighting against Clay Guida? | CREATE TABLE table_name_54 (round INTEGER, opponent VARCHAR) |
SELECT Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Manufacturer | For those products with a price between 60 and 120, visualize a bar chart about the distribution of name and manufacturer , rank from low to high by the Y. | CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) |
SELECT COUNT(iso_) AS № FROM table_254234_1 WHERE chinese_name = "青海省 Qīnghǎi Shěng" | How many provinces are named 青海省 qīnghǎi shěng? | CREATE TABLE table_254234_1 (iso_ VARCHAR, chinese_name VARCHAR) |
SELECT location FROM table_name_63 WHERE opponent = "gray maynard" | Where was the fight against Gray Maynard? | CREATE TABLE table_name_63 (location VARCHAR, opponent VARCHAR) |
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, flight, flight_stop AS FLIGHT_STOP_0, flight_stop AS FLIGHT_STOP_1 WHERE ((CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.city_name = 'DENVER' AND FLIGHT_STOP_0.stop_airport = AIRPORT_SERVICE_2.airport_code AND flight.flight_id = FLIGHT_STOP_0.flight_id) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code | is there a round trip flight from BALTIMORE to DALLAS connecting in DENVER | CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight 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 city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description 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 ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
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 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 month (
month_number int,
month_name text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
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 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 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 airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
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 state (
state_code text,
state_name text,
country_name text
) |
SELECT MAX(area³) FROM table_254234_1 WHERE density² = "533.59" | What is the area of the province with a density of 533.59? | CREATE TABLE table_254234_1 (area³ INTEGER, density² VARCHAR) |
SELECT res FROM table_name_51 WHERE time = "4:27" | What was the result of the 4:27 fight? | CREATE TABLE table_name_51 (res VARCHAR, time VARCHAR) |
SELECT "Swimsuit" FROM table_72915 WHERE "State" = 'Oregon' | Name the swuinsuit for oregon | CREATE TABLE table_72915 (
"State" text,
"Preliminary" text,
"Interview" text,
"Swimsuit" text,
"Evening Gown" text,
"Average" text
) |
SELECT COUNT(iso_) AS № FROM table_254234_1 WHERE density² = "165.81" | How many provinces have a density of 165.81? | CREATE TABLE table_254234_1 (iso_ VARCHAR, density² VARCHAR) |
SELECT record FROM table_name_43 WHERE event = "wec 24" | What was the record at WEC 24? | CREATE TABLE table_name_43 (record VARCHAR, event VARCHAR) |
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 4401) AND icustays.outtime IS NULL) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'd5w' AND d_items.linksto = 'inputevents_cv') ORDER BY inputevents_cv.charttime LIMIT 1 | how many hours has it been since the first time that patient 4401 on the current intensive care unit visit received a d5w intake? | CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom 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 cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto 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 d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
) |
SELECT abbreviation_symbol FROM table_254234_1 WHERE chinese_name = "辽宁省 Liáoníng Shěng" | What is the abbreviation/symbol of 辽宁省 liáoníng shěng? | CREATE TABLE table_254234_1 (abbreviation_symbol VARCHAR, chinese_name VARCHAR) |
SELECT res FROM table_name_16 WHERE round < 3 AND opponent = "gil rael" | What was the result when there were less than 3 rounds against Gil Rael? | CREATE TABLE table_name_16 (res VARCHAR, round VARCHAR, opponent VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'clindamycin') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid) AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.drugstarttime < t2.drugstarttime AND DATETIME(t2.drugstarttime) BETWEEN DATETIME(t1.drugstarttime) AND DATETIME(t1.drugstarttime, '+2 month') GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 5 | what are the top five most common medications that followed within 2 months for those patients who were prescribed clindamycin? | CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
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 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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
) |
SELECT COUNT(gb) FROM table_254234_1 WHERE iso_№ = "CN-65" | How many gb's have an iso number of cn-65? | CREATE TABLE table_254234_1 (gb VARCHAR, iso_№ VARCHAR) |
SELECT SUM(assists) FROM table_name_32 WHERE club = "richmond kickers" AND points > 24 | What is the amount of assists for richmond kickers and points larger than 24 | CREATE TABLE table_name_32 (assists INTEGER, club VARCHAR, points VARCHAR) |
SELECT "Date" FROM table_68334 WHERE "Type" = 'plain stage' | Name the date which has type of plain stage | CREATE TABLE table_68334 (
"Date" text,
"Course" text,
"Distance" text,
"Type" text,
"Winner" text
) |
SELECT chinese_name FROM table_254234_1 WHERE capital = "Hangzhou" | What is the chinese name of the province whose capital is hangzhou? | CREATE TABLE table_254234_1 (chinese_name VARCHAR, capital VARCHAR) |
SELECT AVG(assists) FROM table_name_10 WHERE rank > 6 AND goals = 10 AND scorer = "robert ukrop" | What is the average amount of assists with a rank higher than 6 and goals 10 and the scorer is Robert Ukrop | CREATE TABLE table_name_10 (assists INTEGER, scorer VARCHAR, rank VARCHAR, goals VARCHAR) |
SELECT * FROM table_dev_58 WHERE creatinine_clearance_cl < 60 | creatinine clearance < 60 by cockcroft _ gault calculator | CREATE TABLE table_dev_58 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"intra_aortic_balloon_pump_iabp" bool,
"systemic_arterial_po2" int,
"creatinine_clearance_cl" float,
"supplemental_oxygen" bool,
"age" float,
"NOUSE" float
) |
SELECT MIN(races) FROM table_25421463_1 | What is the fewest amount of races in any season? | CREATE TABLE table_25421463_1 (races INTEGER) |
SELECT tournament FROM table_name_85 WHERE outcome = "winner" AND score = "6–3, 7–5" AND partner = "kimberly po-messerli" | Which Tournament has a winner Outcome with a Score of 6–3, 7–5 with Kimberly Po-Messerli as a Partner? | CREATE TABLE table_name_85 (tournament VARCHAR, partner VARCHAR, outcome VARCHAR, score VARCHAR) |
SELECT "Player" FROM table_80109 WHERE "Year" > '1885' AND "Hits" = '238' | Name the player with 238 hits and years after 1885 | CREATE TABLE table_80109 (
"Hits" real,
"Player" text,
"Team" text,
"Year" real,
"Years Record Stood" text
) |
SELECT MIN(races) FROM table_25421463_1 WHERE points = "38" | How many races were there when Sigachev had 38 points? | CREATE TABLE table_25421463_1 (races INTEGER, points VARCHAR) |
SELECT outcome FROM table_name_8 WHERE tournament = "los angeles" AND partner = "julie halard" | What is the Outcome of the Los Angeles Tournament when the Partner is Julie Halard? | CREATE TABLE table_name_8 (outcome VARCHAR, tournament VARCHAR, partner VARCHAR) |
SELECT "Attendance" FROM table_18026 WHERE "Result" = 'W 24-20' | What was the attendance at the game that resulted in w 24-20? | CREATE TABLE table_18026 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" text
) |
SELECT team_name FROM table_25421463_1 WHERE points = "38" | What team was Sigachev on when he had 38 points? | CREATE TABLE table_25421463_1 (team_name VARCHAR, points VARCHAR) |
SELECT date FROM table_name_46 WHERE partner = "alexandra fusai" AND score = "4–6, 6–3, 6–1" | On what Date is Alexandra Fusai a Partner with a Score of 4–6, 6–3, 6–1? | CREATE TABLE table_name_46 (date VARCHAR, partner VARCHAR, score VARCHAR) |
SELECT MIN(draw) FROM table_name_4 WHERE points < 17 AND lost = 13 | What is the lowest number for draw when the points are less than 17, and the lost is 13? | CREATE TABLE table_name_4 (
draw INTEGER,
points VARCHAR,
lost VARCHAR
) |
SELECT season FROM table_25421463_1 WHERE final_placing = "NC†" AND team_name = "SL Formula Racing" | In what season was the final placing NC† and the team SL Formula Racing? | CREATE TABLE table_25421463_1 (season VARCHAR, final_placing VARCHAR, team_name VARCHAR) |
SELECT home FROM table_name_5 WHERE aggregate = "2-3" | Tell me the home of 2-3 | CREATE TABLE table_name_5 (home VARCHAR, aggregate VARCHAR) |
SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-1337')) AND microlab.culturesite = 'sputum, expectorated' ORDER BY microlab.culturetakentime DESC LIMIT 1 | does patient 031-1337 have any organisms that were found in his last sputum, expectorated microbiology test? | 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 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 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 intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime 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
) |
SELECT COUNT(distance) FROM table_25429986_1 WHERE position = "7th" | what is distance for the 7th position? | CREATE TABLE table_25429986_1 (distance VARCHAR, position VARCHAR) |
SELECT sales__x1000_ FROM table_name_49 WHERE no_of_stores = 282 | How much money did the country with 282 stores make in sales? | CREATE TABLE table_name_49 (sales__x1000_ VARCHAR, no_of_stores VARCHAR) |
SELECT loss FROM table_name_46 WHERE record = "50-54" | What was the Loss when the Record was 50-54? | CREATE TABLE table_name_46 (
loss VARCHAR,
record VARCHAR
) |
SELECT jockey FROM table_25429986_1 WHERE position = "10th" | who isthe jockey in 10th position? | CREATE TABLE table_25429986_1 (jockey VARCHAR, position VARCHAR) |
SELECT MIN(sales_area__m²_) FROM table_name_20 WHERE sales_per_area = "€4,094/m²" AND no_of_stores > 2 | What is the smallest sales area (m²) that has €4,094/m² and more than 2 stores? | CREATE TABLE table_name_20 (sales_area__m²_ INTEGER, sales_per_area VARCHAR, no_of_stores VARCHAR) |
SELECT DISTINCT program_requirement.additional_req, program_requirement.category, program_requirement.min_credit, program.name FROM program, program_requirement WHERE program.name LIKE '%CS-LSA%' AND program.program_id = program_requirement.program_id | Display to me what is required for a CS-LSA degree . | CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
) |
SELECT position FROM table_25429986_1 WHERE number = 22 | what position is number 22? | CREATE TABLE table_25429986_1 (position VARCHAR, number VARCHAR) |
SELECT AVG(spectators) FROM table_name_56 WHERE date = "2006-06-21" AND time_cet_ > 21 | Tell me the average spectators for 2006-06-21 and time more than 21 | CREATE TABLE table_name_56 (spectators INTEGER, date VARCHAR, time_cet_ VARCHAR) |
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-44805')) AND medication.drugname IN ('1000 ml flex cont: sodium chloride 0.9 % iv soln', 'dextrose 5% in water (d5w) iv : 1000 ml bag', 'potassium chloride') AND STRFTIME('%y-%m', medication.drugstarttime) = '2105-12' | had 1000 ml flex cont: sodium chloride 0.9 % iv soln, dextrose 5% in water (d5w) iv : 1000 ml bag or potassium chloride been in 12/2105 prescribed for patient 022-44805? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime 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 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 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 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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
) |
SELECT horse FROM table_25429986_1 WHERE position = "6th" | what horse is in the 6th position? | CREATE TABLE table_25429986_1 (horse VARCHAR, position VARCHAR) |
SELECT SUM(closed) FROM table_name_73 WHERE city = "pittsburgh" AND capacity > 59 OFFSET 000 | Tell me the sum of closed for city of pittsburgh and capacity larger than 59,000 | CREATE TABLE table_name_73 (closed INTEGER, city VARCHAR, capacity VARCHAR) |
SELECT "nation" FROM table_204_320 ORDER BY "gold" DESC LIMIT 1 | which country has the most gold medals ? | CREATE TABLE table_204_320 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) |
SELECT position FROM table_25429986_1 WHERE handicap = "10-2" | what position has a handicap of 10-2? | CREATE TABLE table_25429986_1 (position VARCHAR, handicap VARCHAR) |
SELECT MIN(closed) FROM table_name_34 WHERE capacity = 62 OFFSET 439 | Tell me the lowest closed for capacity of 62,439 | CREATE TABLE table_name_34 (closed INTEGER, capacity VARCHAR) |
SELECT MIN("Played") FROM table_6318 WHERE "Blackpool" < '0' | Which Played is the lowest one that has a Blackpool smaller than 0? | CREATE TABLE table_6318 (
"Competition" text,
"Played" real,
"Blackpool" real,
"Draw" real,
"Preston North End" real
) |
SELECT handicap FROM table_25429986_1 WHERE distance = "9 lengths" | what is the handicap where the distance is 9 lengths? | CREATE TABLE table_25429986_1 (handicap VARCHAR, distance VARCHAR) |
SELECT college_junior_club_team FROM table_name_5 WHERE pick = "16" | Tell me the college/junior club team for pick of 16 | CREATE TABLE table_name_5 (college_junior_club_team VARCHAR, pick VARCHAR) |
SELECT distst FROM sampledata15 WHERE commod = "AP" GROUP BY distst ORDER BY COUNT(*) DESC LIMIT 1 | Which state has the most apple collected? | CREATE TABLE sampledata15 (
sample_pk number,
state text,
year text,
month text,
day text,
site text,
commod text,
source_id text,
variety text,
origin text,
country text,
disttype text,
commtype text,
claim text,
quantity number,
growst text,
packst text,
distst text
)
CREATE TABLE resultsdata15 (
sample_pk number,
commod text,
commtype text,
lab text,
pestcode text,
testclass text,
concen number,
lod number,
conunit text,
confmethod text,
confmethod2 text,
annotate text,
quantitate text,
mean text,
extract text,
determin text
) |
SELECT indonesia_super_series_2008 FROM table_2544694_3 WHERE 780000 = "5040.00" | Which series occurred when the 7800 was 5040.00? | CREATE TABLE table_2544694_3 (indonesia_super_series_2008 VARCHAR) |
SELECT nationality FROM table_name_24 WHERE pick = "18" | Tell me the nationality for pick of 18 | CREATE TABLE table_name_24 (nationality VARCHAR, pick VARCHAR) |
SELECT nationality FROM table_name_68 WHERE nhl_team = "washington capitals" | What is the nationality of the Washington Capitals? | CREATE TABLE table_name_68 (
nationality VARCHAR,
nhl_team VARCHAR
) |
SELECT indonesia_super_series_2008 FROM table_2544694_3 WHERE runner_up = "Semi-Finalist" AND 780000 = "6420.00" | Which series occurred in which the semi-finalist was runner-up and the 7800.00 was 6420.00? | CREATE TABLE table_2544694_3 (indonesia_super_series_2008 VARCHAR, runner_up VARCHAR) |
SELECT player FROM table_name_89 WHERE nhl_team = "mighty ducks of anaheim" | I want the player for NHL team for mighty ducks of anaheim | CREATE TABLE table_name_89 (player VARCHAR, nhl_team VARCHAR) |
SELECT SUM(assists) FROM table_name_45 WHERE games > 25 | How many Assists for the Player with more than 25 Games? | CREATE TABLE table_name_45 (
assists INTEGER,
games INTEGER
) |
SELECT road FROM table_25438110_5 WHERE county = "Carson Valley" | What road is associated with Carson Valley county? | CREATE TABLE table_25438110_5 (road VARCHAR, county VARCHAR) |
SELECT nhl_team FROM table_name_87 WHERE player = "wade belak" | I want the NHL team for wade belak | CREATE TABLE table_name_87 (nhl_team VARCHAR, player VARCHAR) |
SELECT "venue" FROM table_204_913 WHERE id = 1 | what is the top listed venue in the table ? | CREATE TABLE table_204_913 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
) |
SELECT county FROM table_25438110_5 WHERE casinos = 17 | What county has exactly 17 casinos? | CREATE TABLE table_25438110_5 (county VARCHAR, casinos VARCHAR) |
SELECT tournament FROM table_name_90 WHERE outcome = "winner" AND score = "4-6 6-3 10-5" | Tell me the tournament for outcome of winner and score of 4-6 6-3 10-5 | CREATE TABLE table_name_90 (tournament VARCHAR, outcome VARCHAR, score VARCHAR) |
SELECT "Song choice" FROM table_3524 WHERE "Result" = 'Bottom 3' | What song was used resulting in the bottom 3? | CREATE TABLE table_3524 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
) |
SELECT COUNT(casinos) FROM table_25438110_5 WHERE fy09_$millions = "$279" | How many casinos are associated with a FY2009 $mil value of exactly $279? | CREATE TABLE table_25438110_5 (casinos VARCHAR, fy09_$millions VARCHAR) |
SELECT partner FROM table_name_15 WHERE opponents_in_the_final = "anamika bhargava sylvia krywacz" | Tell me the partner for opponents of anamika bhargava sylvia krywacz | CREATE TABLE table_name_15 (partner VARCHAR, opponents_in_the_final VARCHAR) |
SELECT votes FROM table_name_51 WHERE notes = "lost to incumbent vic gilliam" | How many votes were cast when the notes reported lost to incumbent vic gilliam? | CREATE TABLE table_name_51 (
votes VARCHAR,
notes VARCHAR
) |
SELECT fy08_$millions FROM table_25438110_5 WHERE fy07_$millions = "$120" | What is the FY2008 $mil value associated with a FY2007 $mil value of exactly $120? | CREATE TABLE table_25438110_5 (fy08_$millions VARCHAR, fy07_$millions VARCHAR) |
SELECT partner FROM table_name_10 WHERE outcome = "winner" AND score = "7-6 (7) 5-7 10-7" | Tell me the partner for outcome of winner and score of 7-6 (7) 5-7 10-7 | CREATE TABLE table_name_10 (partner VARCHAR, outcome VARCHAR, score VARCHAR) |
SELECT T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Revenue | For those records from the products and each product's manufacturer, give me the comparison about the average of revenue over the name , and group by attribute name by a bar chart, list by the total number in asc. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) |
SELECT country FROM table_25461827_2 WHERE contestant = "Danissa Zurek" | What country was Danissa Zurek from? | CREATE TABLE table_25461827_2 (country VARCHAR, contestant VARCHAR) |
SELECT opponents_in_the_final FROM table_name_90 WHERE score = "6-1 2-6 7-10" | Tell me the opponents for score of 6-1 2-6 7-10 | CREATE TABLE table_name_90 (opponents_in_the_final VARCHAR, score VARCHAR) |
SELECT college FROM table_14650162_1 WHERE position = "Defensive Back" | What college did the defensive back attend? | CREATE TABLE table_14650162_1 (
college VARCHAR,
position VARCHAR
) |
SELECT MIN(height__cm_) FROM table_25461827_2 WHERE country = "Honduras" | What is the smallest height associated with Honduras? | CREATE TABLE table_25461827_2 (height__cm_ INTEGER, country VARCHAR) |
SELECT score FROM table_name_62 WHERE opponents = "misa eguchi eri hozumi" | Tell me the score of misa eguchi eri hozumi | CREATE TABLE table_name_62 (score VARCHAR, opponents VARCHAR) |
SELECT date FROM table_name_92 WHERE opponent = "woking" | When did woking compete? | CREATE TABLE table_name_92 (
date VARCHAR,
opponent VARCHAR
) |
SELECT height__ft_ FROM table_25461827_2 WHERE country = "Paraguay" | What is the height associated with Paraguay? | CREATE TABLE table_25461827_2 (height__ft_ VARCHAR, country VARCHAR) |
SELECT date FROM table_name_46 WHERE outcome = "winner" AND opponents = "dinah pfizenmaier anna zaja" | Tell me the date for dinah pfizenmaier anna zaja and winner | CREATE TABLE table_name_46 (date VARCHAR, outcome VARCHAR, opponents VARCHAR) |
SELECT "Country" FROM table_12500 WHERE "To par" = '+1' AND "Score" = '74-70-70=214' | What is the Country of the Player with a To par of +1 and a Score of 74-70-70=214? | CREATE TABLE table_12500 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) |
SELECT COUNT(contestant) FROM table_25461827_2 WHERE age = 18 | What is the number of contestants who are aged exactly 18? | CREATE TABLE table_25461827_2 (contestant VARCHAR, age VARCHAR) |
SELECT opponents FROM table_name_43 WHERE partner = "mashona washington" AND date = "november 21, 2009" | Tell me the opponents for mashona washington november 21, 2009 | CREATE TABLE table_name_43 (opponents VARCHAR, partner VARCHAR, date VARCHAR) |
SELECT Name, COUNT(Name) FROM Products GROUP BY Name ORDER BY COUNT(Name) DESC | What are the names of all products, and count them by a bar chart, and I want to list y axis in desc order. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) |
SELECT high_points FROM table_25461946_5 WHERE date = "November 17" | Who scored the most points on November 17? | CREATE TABLE table_25461946_5 (high_points VARCHAR, date VARCHAR) |
SELECT MIN(total) FROM table_name_85 WHERE rank < 4 AND silver > 0 AND gold < 2 | What is the smallest total for a rank below 4, 0 silver medals, and 2 gold medals? | CREATE TABLE table_name_85 (total INTEGER, gold VARCHAR, rank VARCHAR, silver VARCHAR) |
SELECT "UK Chart" FROM table_65325 WHERE "Artist" = 'scott fitzgerald' | Where did Scott Fitzgerald rank on the UK charts? | CREATE TABLE table_65325 (
"Year" real,
"Artist" text,
"Song" text,
"UK Chart" text,
"At Eurovision" text
) |
SELECT score FROM table_25461946_5 WHERE team = "Virginia Tech" | What was the final score when the Temple Owls beat Virginia Tech? | CREATE TABLE table_25461946_5 (score VARCHAR, team VARCHAR) |
SELECT AVG(gold) FROM table_name_5 WHERE nation = "italy" AND rank > 4 | How many gold medals on average were earned by Italy when they held the rank of 4? | CREATE TABLE table_name_5 (gold INTEGER, nation VARCHAR, rank VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.