context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
... | what is the two year survival rate for fracture patella-closed patients who were prescribed with pantoprazole sodium? | SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd... | mimic_iii |
CREATE TABLE table_name_44 (
time VARCHAR,
show_name VARCHAR
) | What Time has a Show Name of mornings with neil mitchell? | SELECT time FROM table_name_44 WHERE show_name = "mornings with neil mitchell" | sql_create_context |
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 microlab (
microlabid number,
... | when did patient 035-2205 last have a diagnosis of respiratory arrest since 2105? | SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-2205')) AND diagnosis.diagnosisname = 'respiratory arrest' AN... | eicu |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
... | For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a line chart about the change of commission_pct over hire_date , and sort from high to low by the X please. | SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE DESC | nvbench |
CREATE TABLE table_65041 (
"Actor" text,
"Character" text,
"Soap Opera" text,
"Years" text,
"Duration" text
) | How long did the soap opera run in which Nadine Spru acted in? | SELECT "Character" FROM table_65041 WHERE "Actor" = 'nadine spruß' | wikisql |
CREATE TABLE table_name_39 (
losses INTEGER,
wins VARCHAR,
south_west_dfl VARCHAR
) | Which Losses have Wins smaller than 6, and a South West DFL of sandford? | SELECT MIN(losses) FROM table_name_39 WHERE wins < 6 AND south_west_dfl = "sandford" | sql_create_context |
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 demographic (
subject_id text,
hadm_id t... | provide the number of patients who were aadmitted before the year 2125 and their drug route is neb. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2125" AND prescriptions.route = "NEB" | mimicsql_data |
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 (... | what is ethnicity of subject id 55094? | SELECT demographic.ethnicity FROM demographic WHERE demographic.subject_id = "55094" | mimicsql_data |
CREATE TABLE table_37459 (
"Team" text,
"Car(s)" text,
"Driver(s)" text,
"Primary Sponsor(s)" text,
"Crew Chief" text
) | Which team has Peak Fitness as the primary sponsor? | SELECT "Team" FROM table_37459 WHERE "Primary Sponsor(s)" = 'peak fitness' | wikisql |
CREATE TABLE table_54381 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the size of the crowd at the game where Fitzroy was the home team? | SELECT "Crowd" FROM table_54381 WHERE "Home team" = 'fitzroy' | wikisql |
CREATE TABLE table_203_528 (
id number,
"year" number,
"political rights" number,
"civil liberties" number,
"status" text,
"president" text
) | who ruled longer , ali saibou or mamadou tandja ? | SELECT "president" FROM table_203_528 WHERE "president" IN ('ali saibou', 'mamadou tandja') GROUP BY "president" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_67791 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
) | Name the start with Laps of 199 with qual of 224.838 | SELECT "Start" FROM table_67791 WHERE "Laps" = '199' AND "Qual" = '224.838' | wikisql |
CREATE TABLE table_59956 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | What is the score when the tie number is 8? | SELECT "Score" FROM table_59956 WHERE "Tie no" = '8' | wikisql |
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 (
allergy... | what is the two year survival rate of a person with vascular insufficiency of intestine - due to low cardiac output? | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI... | eicu |
CREATE TABLE table_32108 (
"Year" real,
"Play" text,
"Role" text,
"Theatre" text,
"Location" text
) | Tell me the role of festival theatre | SELECT "Role" FROM table_32108 WHERE "Theatre" = 'festival theatre' | wikisql |
CREATE TABLE table_4541 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the away team that scored 8.15 (63)? | SELECT "Away team" FROM table_4541 WHERE "Away team score" = '8.15 (63)' | wikisql |
CREATE TABLE table_name_35 (
time VARCHAR,
round INTEGER
) | What was the time for a round less than 3? | SELECT time FROM table_name_35 WHERE round < 3 | sql_create_context |
CREATE TABLE table_10334 (
"Year" real,
"Park" text,
"Artist" text,
"Mintage" real,
"Issue Price" text
) | What is the lowest mintage in a year earlier than 2005? | SELECT MIN("Mintage") FROM table_10334 WHERE "Year" < '2005' | wikisql |
CREATE TABLE table_name_15 (
result VARCHAR,
home_away VARCHAR,
date VARCHAR
) | What is the result of the away game played on August 4? | SELECT result FROM table_name_15 WHERE home_away = "away" AND date = "august 4" | sql_create_context |
CREATE TABLE table_2433 (
"Date" text,
"Tournament" text,
"Location" text,
"Purse ( $ )" real,
"Winner" text,
"Score" text,
"1st Prize ( $ )" text
) | How many tournaments were held at Alabama? | SELECT COUNT("Score") FROM table_2433 WHERE "Location" = 'Alabama' | wikisql |
CREATE TABLE table_name_97 (
capacity VARCHAR,
vehicle VARCHAR
) | How much Capacity has a Vehicle of 2003 holden commodore ute? | SELECT COUNT(capacity) FROM table_name_97 WHERE vehicle = "2003 holden commodore ute" | sql_create_context |
CREATE TABLE table_name_15 (
laps INTEGER,
time VARCHAR,
grid VARCHAR
) | Which Laps have a Time of +39.476, and a Grid larger than 11? | SELECT AVG(laps) FROM table_name_15 WHERE time = "+39.476" AND grid > 11 | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
... | what was the last heart rate in patient 15794's body on the current icu visit? | SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15794) AND icustays.outtime IS NULL) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHE... | mimic_iii |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | 二零一九年十二月十二日到二零年一月二十日,放射科门诊的就诊数量是多少 | SELECT COUNT(*) FROM mzjzjlb WHERE JZKSMC = '放射科' AND JZKSRQ BETWEEN '2019-12-12' AND '2020-01-20' | css |
CREATE TABLE table_14693 (
"Name" text,
"Years" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) | What is the average roll of a school with state authority and a decile of 9? | SELECT AVG("Roll") FROM table_14693 WHERE "Authority" = 'state' AND "Decile" = '9' | wikisql |
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,
... | what are the top three most frequent procedures patients had received during the same hospital visit after they were diagnosed with metabolic acidosis - increased anion gap until 2104? | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'metab... | eicu |
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,
... | how many patients in the 285 ward? | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 285 | eicu |
CREATE TABLE table_name_49 (
points INTEGER,
place VARCHAR,
draw VARCHAR
) | What is the average number of points for places over 7 and having a draw order of 4? | SELECT AVG(points) FROM table_name_49 WHERE place > 7 AND draw = 4 | sql_create_context |
CREATE TABLE addresses (
address_id number,
line_1_number_building text,
city text,
zip_postcode text,
state_province_county text,
country text
)
CREATE TABLE customer_payments (
customer_id number,
datetime_payment time,
payment_method_code text,
amount_payment number
)
CREATE... | What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000? | SELECT phone_number, email_address FROM customers WHERE amount_outstanding > 2000 | spider |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 编号48451516947的检验报告单属于什么检验类型 | SELECT zyjybgb.JYLX FROM zyjybgb WHERE zyjybgb.BGDH = '48451516947' UNION SELECT mzjybgb.JYLX FROM mzjybgb WHERE mzjybgb.BGDH = '48451516947' | css |
CREATE TABLE table_name_8 (
organisation VARCHAR,
award VARCHAR,
year VARCHAR,
result VARCHAR
) | What is the organisation in 2011 that was nominated and the award of best info-ed programme host? | SELECT organisation FROM table_name_8 WHERE year = 2011 AND result = "nominated" AND award = "best info-ed programme host" | sql_create_context |
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,
... | Count the number of patients who underwent other open incisional hernia repair with graft or prosthesis and died in or before the year 2131. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2131.0" AND procedures.short_title = "Open incis hern-grft NEC" | mimicsql_data |
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,
... | what is item id and lab test value of subject id 3343? | SELECT lab.itemid, lab.value_unit FROM lab WHERE lab.subject_id = "3343" | mimicsql_data |
CREATE TABLE budget (
School_id int,
Year int,
Budgeted int,
total_budget_percent_budgeted real,
Invested int,
total_budget_percent_invested real,
Budget_invested_percent text
)
CREATE TABLE endowment (
endowment_id int,
School_id int,
donator_name text,
amount real
)
CREAT... | Compare the total enrollment in each county with a bar chart, and list by the names from low to high please. | SELECT County, SUM(Enrollment) FROM School GROUP BY County ORDER BY County | nvbench |
CREATE TABLE table_45707 (
"Date" text,
"Opponent" text,
"Site" text,
"Result" text,
"Attendance" text
) | What is the date for 45,000 in attendance? | SELECT "Date" FROM table_45707 WHERE "Attendance" = '45,000' | wikisql |
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 ... | provide the number of patients who have the procedure long title as hemodialysis. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Hemodialysis" | mimicsql_data |
CREATE TABLE table_14789 (
"Date" text,
"Location" text,
"Lineup" text,
"Assist/pass" text,
"Score" text,
"Result" text,
"Competition" text
) | Name the date for faro | SELECT "Date" FROM table_14789 WHERE "Location" = 'faro' | wikisql |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name te... | what was the name of the first intake of patient 23070 that they had on last month/30? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid 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 = 23070)) AND DATETIME(inputevents_cv.... | mimic_iii |
CREATE TABLE table_11989 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the lowest metal total when the Bronze metals are larger than 0, the Gold medals are smaller than 1, and the nation is Switzerland? | SELECT MIN("Total") FROM table_11989 WHERE "Bronze" > '0' AND "Nation" = 'switzerland' AND "Gold" < '1' | wikisql |
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,
h... | how many days have it been since the time patient 015-59552 was admitted to hospital? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '015-59552' AND patient.hospitaldischargetime IS NULL | eicu |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE procedures_icd (
row_id number,
su... | indicate the daily average amount of arterial bp [systolic] for patient 9474. | SELECT AVG(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9474)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arter... | mimic_iii |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ tim... | 自二零一八年十月一日开始,截止到二零二零年八月二十三日,看看病人韦英秀到医院看病的次数是多少 | SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '韦英秀' AND mzjzjlb.JZKSRQ BETWEEN '2018-10-01' AND '2020-08-23') + (SELECT COUNT(*) FROM person_info J... | css |
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 prescriptions (
subject_id text,
hadm_id... | Count the number of patients who died on or before 2158 with complete heart block as the primary disease. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COMPLETE HEART BLOCK" AND demographic.dod_year <= "2158.0" | mimicsql_data |
CREATE TABLE table_24431348_20 (
status VARCHAR,
new_points VARCHAR
) | How many times is the new points 2690? | SELECT COUNT(status) FROM table_24431348_20 WHERE new_points = 2690 | sql_create_context |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationD... | Users with most answers in a given tag. | SELECT a.OwnerUserId AS "user_link", a.OwnerDisplayName, COUNT(a.Id) AS "question_count", SUM(a.Score) AS "total_score" FROM Posts AS a INNER JOIN Posts AS q ON a.ParentId = q.Id WHERE (a.PostTypeId = 2) AND (q.PostTypeId = 1) AND (q.Tags LIKE '%<##tagName?data-explorer##>%') GROUP BY a.OwnerUserId, a.OwnerDisplayName ... | sede |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... | what was the marital status of patient 85169 during their first hospital visit? | SELECT admissions.marital_status FROM admissions WHERE admissions.subject_id = 85169 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
CREATE TABLE table_name_32 (
status VARCHAR,
artist VARCHAR
) | What Status does Freddie Jackson have? | SELECT status FROM table_name_32 WHERE artist = "freddie jackson" | sql_create_context |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code v... | what are the flights available in the morning between BOSTON and DENVER | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER... | atis |
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 te... | how many patients who had bradycardia had stayed in the hospital for more than 27 days? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BRADYCARDIA" AND demographic.days_stay > "27" | mimicsql_data |
CREATE TABLE table_204_413 (
id number,
"medal" text,
"name" text,
"sport" text,
"event" text,
"date" text
) | how many more silver medals were handed out than gold ? | SELECT (SELECT COUNT(*) FROM table_204_413 WHERE "medal" = 'silver') - (SELECT COUNT(*) FROM table_204_413 WHERE "medal" = 'gold') | squall |
CREATE TABLE apartments (
apt_id number,
building_id number,
apt_type_code text,
apt_number text,
bathroom_count number,
bedroom_count number,
room_count text
)
CREATE TABLE apartment_bookings (
apt_booking_id number,
apt_id number,
guest_id number,
booking_status_code text,... | Return the apartment numbers of the apartments with type code 'Flat'. | SELECT apt_number FROM apartments WHERE apt_type_code = "Flat" | spider |
CREATE TABLE table_name_89 (
losing_bonus VARCHAR,
played VARCHAR,
points_for VARCHAR
) | What was the losing bonus for the 20 played, and 353 points? | SELECT losing_bonus FROM table_name_89 WHERE played = "20" AND points_for = "353" | sql_create_context |
CREATE TABLE table_48111 (
"Province" text,
"Largest city" text,
"2nd Largest" text,
"3rd Largest" text,
"4th largest" text
) | What is the 4th largest where the 2nd largest is Minab? | SELECT "4th largest" FROM table_48111 WHERE "2nd Largest" = 'minab' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE txmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
K... | 列出患者70892680所有检验结果指标记录中的检测方法在2012年3月29日到2020年7月23日之间都是什么? | SELECT jyjgzbb.JCFF FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH... | css |
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 TA... | how many times did a cardiology consultation procedure last year be done? | SELECT COUNT(*) FROM treatment WHERE treatment.treatmentname = 'cardiology consultation' AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | eicu |
CREATE TABLE table_49525 (
"Year" text,
"Designated Grand Prix" text,
"Track" text,
"250 cc" text,
"350 cc" text,
"500 cc" text,
"Report" text
) | What track was used in 1926? | SELECT "Track" FROM table_49525 WHERE "Year" = '1926' | wikisql |
CREATE TABLE driverStandings (
driverStandingsId INTEGER,
raceId INTEGER,
driverId INTEGER,
points REAL,
position INTEGER,
positionText TEXT,
wins INTEGER
)
CREATE TABLE lapTimes (
raceId INTEGER,
driverId INTEGER,
lap INTEGER,
position INTEGER,
time TEXT,
millisecon... | A bar chart for what are the number of the names of all races held between 2009 and 2011? | SELECT name, COUNT(name) FROM races WHERE year BETWEEN 2009 AND 2011 GROUP BY name | nvbench |
CREATE TABLE table_48934 (
"Opposing Team" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
) | Which Venue has an Against of 25? | SELECT "Venue" FROM table_48934 WHERE "Against" = '25' | wikisql |
CREATE TABLE table_29812 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Who was the high rebounds of team @ Detroit? | SELECT "High rebounds" FROM table_29812 WHERE "Team" = '@ Detroit' | wikisql |
CREATE TABLE table_5858 (
"District" real,
"Incumbent" text,
"Party" text,
"Elected" real,
"Status" text
) | What year was Incumbent Ed Towns elected with a district smaller than 10? | SELECT AVG("Elected") FROM table_5858 WHERE "Incumbent" = 'ed towns' AND "District" < '10' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),... | For those employees who do not work in departments with managers that have ids between 100 and 200, find first_name and employee_id , and visualize them by a bar chart. | SELECT FIRST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE table_name_57 (
gold INTEGER,
nation VARCHAR,
total VARCHAR
) | What is the number of gold medals for Lithuania (ltu), when the total is more than 1? | SELECT MAX(gold) FROM table_name_57 WHERE nation = "lithuania (ltu)" AND total > 1 | sql_create_context |
CREATE TABLE table_63262 (
"City of license" text,
"Identifier" text,
"Frequency" text,
"Power" text,
"Class" text,
"RECNet" text
) | what is the frequency when the city of license is belleville? | SELECT "Frequency" FROM table_63262 WHERE "City of license" = 'belleville' | wikisql |
CREATE TABLE table_9454 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | What event did Soa Palelei fight against son hai suk? | SELECT "Event" FROM table_9454 WHERE "Opponent" = 'son hai suk' | wikisql |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH ... | 在医疗就诊13021515758中,哪些编号的检验报告单是由名称不包含手术的科室开出的 | SELECT BGDH FROM jybgb WHERE JZLSH = '13021515758' AND NOT KSMC LIKE '%手术%' | css |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwner... | Rep:Answer ratio for users with rep between x,y. | SELECT Posts.Id, Posts.AnswerCount, Users.Reputation FROM Posts, Users WHERE Users.Id = Posts.Id AND Users.Reputation > '##x##' AND Users.Reputation < '##y##' LIMIT 100 | sede |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | 经过住院的患者81313263168其出院状态代码是多少呢? | SELECT wdmzjzjlb.CYZTDM FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '81313263168' UNION SELECT bdmzjzjlb.CYZTDM FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '81313263168' | css |
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,... | what was the name of the procedure that until 18 months ago patient 005-16601 has received two times? | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, COUNT(treatment.treatmenttime) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ... | eicu |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 28140515这个病人的检验报告单结果指标均异常的有哪些?看看检验报告的单号 | SELECT jybgb.BGDH FROM hz_info JOIN wdmzjzjlb JOIN jybgb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '28140515' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FRO... | css |
CREATE TABLE table_25539 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. viewers (million)" text,
"Rank (week)" text,
"Original air date" text
) | What is the # when u.s. viewers (million) is 17.44? | SELECT COUNT("#") FROM table_25539 WHERE "U.S. viewers (million)" = '17.44' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
c... | when was the first time patient 028-45936 sao2 was measured greater than 99.0 until 94 days ago. | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-45936')) AND vitalperiodic.sao2 > 99.0 AND NOT ... | eicu |
CREATE TABLE table_name_11 (
driver VARCHAR,
grid VARCHAR
) | Which driver had a grid number of 10? | SELECT driver FROM table_name_11 WHERE grid = 10 | sql_create_context |
CREATE TABLE table_204_443 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"game site" text,
"attendance" number,
"bye" text
) | name the game site with the highest number of attendance . | SELECT "game site" FROM table_204_443 ORDER BY "attendance" DESC LIMIT 1 | squall |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | 凤红艳这位参保人住院费金额正好是证书的次数有多少 | SELECT COUNT(*) FROM t_kc21 WHERE PERSON_NM = '凤红艳' AND CLINIC_TYPE = '住院' AND MOD(MED_AMOUT, 1) = 0 | css |
CREATE TABLE table_name_53 (
island VARCHAR,
airportname VARCHAR
) | On which island is Esperadinha airport located? | SELECT island FROM table_name_53 WHERE airportname = "esperadinha airport" | sql_create_context |
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,... | look for the number of patients with private health insurance who were admitted before year 2173. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.admityear < "2173" | mimicsql_data |
CREATE TABLE table_29960651_5 (
episode VARCHAR,
no_for_series VARCHAR
) | What is the episode name for series number 45? | SELECT episode FROM table_29960651_5 WHERE no_for_series = 45 | sql_create_context |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_typ... | tell me the amount of d5w patient 15447 was given on the current icu visit. | SELECT SUM(inputevents_cv.amount) 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 = 15447) AND icustays.outtime IS NULL) AND inputevents_cv.itemid IN (SELECT d_items.itemid F... | mimic_iii |
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE DE... | Show the number of courses each instructor taught in a bar chart, show in asc by the X. | SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE GROUP BY EMP_FNAME ORDER BY EMP_FNAME | nvbench |
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | 医疗机构9923455使用次数前12名的项目有哪些 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '9923455' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 12 UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_I... | css |
CREATE TABLE Teachers (
teacher_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(80),
last_name VARCHAR(80),
gender VARCHAR(1),
cell_mobile_number VARCHAR(40),
email_address VARCHAR(40),
other_details VARCHAR(255)
)
CREATE TABLE Ref_Detention_Type (
de... | A scatter chart shows the correlation between address_id and monthly_rental . | SELECT address_id, monthly_rental FROM Student_Addresses ORDER BY monthly_rental DESC | nvbench |
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 ... | how many hours have there been since when patient 92788 was first diagnosed with old myocardial infarct on the current hospital encounter? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnoses_icd.charttime)) FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'old myocardial infarct') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admi... | mimic_iii |
CREATE TABLE table_12030612_9 (
title VARCHAR,
written_by VARCHAR
) | Name the number of titles written by adam i. lapidus | SELECT COUNT(title) FROM table_12030612_9 WHERE written_by = "Adam I. Lapidus" | sql_create_context |
CREATE TABLE ftxmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZD... | 门诊诊断患者戚飞翼为疾病V25.625的类风湿因子的结果定量及其单位都是什么? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE table_name_54 (
a_score VARCHAR,
b_score VARCHAR,
total VARCHAR
) | What is the A Score when the B Score is more than 9.05, and the total is less than 16.525? | SELECT COUNT(a_score) FROM table_name_54 WHERE b_score > 9.05 AND total < 16.525 | sql_create_context |
CREATE TABLE table_name_83 (
tournament VARCHAR,
date VARCHAR,
location VARCHAR
) | What tournament located is mississippi was nov 5 | SELECT tournament FROM table_name_83 WHERE date = "nov 5" AND location = "mississippi" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | among those with age 40s until 2102, what are the top three most frequent lab tests? | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) AND STRFTIME('%y', lab.labresulttime) <= '2102' GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 3 | eicu |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction 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... | Which courses besides 218 are available with Prof. Jorge Martinez ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.number <> 218 AND instructor.name LIKE '%Jorge Martinez%' AND offering_instructor.instructor_id = instructor.instructor_id AND offerin... | advising |
CREATE TABLE table_42900 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | What is the greatest lost where played is less than 9? | SELECT MAX("Lost") FROM table_42900 WHERE "Played" < '9' | wikisql |
CREATE TABLE table_18508 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | What was the result in the election where Hale Boggs was the incumbent? | SELECT "Result" FROM table_18508 WHERE "Incumbent" = 'Hale Boggs' | wikisql |
CREATE TABLE table_57096 (
"car plates (since 1937)" text,
"Voivodeship Separate city" text,
"Capital" text,
"Area in 1000km\u00b2 (1930)" text,
"Population in 1000 (1931)" text
) | tell me the name of the capital with an area of 20,4. | SELECT "Capital" FROM table_57096 WHERE "Area in 1000km\u00b2 (1930)" = '20,4' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 在11-12-13到19-01-19期间内,患者凤飞尘被开出的所有检验报告单中的标本采集部位需要列出来 | SELECT jybgb.BBCJBW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJL... | css |
CREATE TABLE table_64681 (
"Outcome" text,
"Year" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
) | What year had a score of 4 6, 7 6, 7 5? | SELECT "Year" FROM table_64681 WHERE "Score" = '4–6, 7–6, 7–5' | wikisql |
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amount_Payment INTEGER
)
CREATE TABLE Customer_Policies (
Policy_ID INTEGER,
Customer_ID INTEGER,
Policy_Type_Code CHAR(15),
Start_Date DATE,
End_Date DAT... | Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date, and count them by a bar chart, order by the Y-axis in asc. | SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) ORDER BY COUNT(Date_Claim_Made) | nvbench |
CREATE TABLE table_37248 (
"Goal" real,
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | What is the score of the match on June 4, 2008? | SELECT "Score" FROM table_37248 WHERE "Date" = 'june 4, 2008' | wikisql |
CREATE TABLE table_name_37 (
week VARCHAR,
date VARCHAR
) | What was the Week on September 5, 1993? | SELECT week FROM table_name_37 WHERE date = "september 5, 1993" | sql_create_context |
CREATE TABLE table_name_81 (
laps INTEGER,
manufacturer VARCHAR,
grid VARCHAR
) | What was the lowest lab for Gilera with a grid less than 12? | SELECT MIN(laps) FROM table_name_81 WHERE manufacturer = "gilera" AND grid < 12 | sql_create_context |
CREATE TABLE staff (
staff_id number,
staff_address_id number,
nickname text,
first_name text,
middle_name text,
last_name text,
date_of_birth time,
date_joined_staff time,
date_left_staff time
)
CREATE TABLE lessons (
lesson_id number,
customer_id number,
lesson_status_... | What is the city with the most customers? | SELECT T2.city FROM customers AS T1 JOIN addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY COUNT(*) DESC LIMIT 1 | spider |
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
) | For those records from the products and each product's manufacturer, find name and the average of revenue , and group by attribute name, and visualize them by a bar chart, display x axis in asc order please. | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name | nvbench |
CREATE TABLE table_204_863 (
id number,
"state" text,
"city/county" text,
"population served" number,
"charter type" text,
"station name" text,
"web site" text
) | which station name has the same amount of population served as lincoln university ? | SELECT "station name" FROM table_204_863 WHERE "station name" <> 'lincoln university' AND "population served" = (SELECT "population served" FROM table_204_863 WHERE "station name" = 'lincoln university') | squall |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.