context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(... | Just show the first name of the employee and list their manager's id in the Y-axis of the bar chart, could you sort in asc by the x-axis? | SELECT FIRST_NAME, MANAGER_ID FROM employees ORDER BY FIRST_NAME | nvbench |
CREATE TABLE table_77131 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School/Club Team" text
) | Which Round has a School/Club Team of cal-poly slo, and a Pick smaller than 238? | SELECT MAX("Round") FROM table_77131 WHERE "School/Club Team" = 'cal-poly slo' AND "Pick" < '238' | wikisql |
CREATE TABLE table_name_42 (
date VARCHAR,
result VARCHAR
) | Which Date has a Result of 0 0? | SELECT date FROM table_name_42 WHERE result = "0–0" | sql_create_context |
CREATE TABLE table_name_11 (
to_par VARCHAR,
score VARCHAR
) | What is the to par for the score 72-69-68=209? | SELECT to_par FROM table_name_11 WHERE score = 72 - 69 - 68 = 209 | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 在2000年10月16日到2016年8月23日期间医疗机构5648027中公务员医疗就诊记录有多少个? | SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '5648027' AND IN_HOSP_DATE BETWEEN '2000-10-16' AND '2016-08-23' AND SERVANT_FLG = '公务员' | css |
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 admission type and diagnoses short title of subject id 91588? | SELECT demographic.admission_type, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "91588" | mimicsql_data |
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... | 沈志诚作为检测人在2001年7月4日到2009年2月9日期间为病患袁晶辉检验的结果指标记录的检验指标流水号都是多少? | SELECT jyjgzbb.JYZBLSH 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.JZLSH_MZJZJLB AND jyb... | css |
CREATE TABLE table_name_34 (
laps VARCHAR,
time_retired VARCHAR
) | How many laps have a +0.4865 time/retired? | SELECT laps FROM table_name_34 WHERE time_retired = "+0.4865" | sql_create_context |
CREATE TABLE table_name_53 (
vote__percentage INTEGER,
election VARCHAR
) | Name the most vote % with election of 1946 | SELECT MAX(vote__percentage) FROM table_name_53 WHERE election = "1946" | sql_create_context |
CREATE TABLE medicine_enzyme_interaction (
enzyme_id int,
medicine_id int,
interaction_type text
)
CREATE TABLE medicine (
id int,
name text,
Trade_Name text,
FDA_approved text
)
CREATE TABLE enzyme (
id int,
name text,
Location text,
Product text,
Chromosome text,
... | what is the id and trade name of the medicines can interact with at least 3 enzymes?, and I want to show by the x axis from high to low. | SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id ORDER BY Trade_Name DESC | nvbench |
CREATE TABLE host (
Host_ID int,
Name text,
Nationality text,
Age text
)
CREATE TABLE party_host (
Party_ID int,
Host_ID int,
Is_Main_in_Charge bool
)
CREATE TABLE party (
Party_ID int,
Party_Theme text,
Location text,
First_year text,
Last_year text,
Number_of_host... | Create a bar chart showing how many location across location | SELECT Location, COUNT(Location) FROM party GROUP BY Location | nvbench |
CREATE TABLE table_75609 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Save" text
) | Name the opponent with loss of sanderson (9-8) | SELECT "Opponent" FROM table_75609 WHERE "Loss" = 'sanderson (9-8)' | wikisql |
CREATE TABLE table_name_49 (
away_team VARCHAR,
home_team VARCHAR
) | When the Home team of collingwood played, what was the opposing Away team score? | SELECT away_team AS score FROM table_name_49 WHERE home_team = "collingwood" | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | how many patients whose insurance is government and lab test name is po2? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "pO2" | mimicsql_data |
CREATE TABLE table_name_10 (
player VARCHAR,
to_par VARCHAR,
score VARCHAR
) | What Player has a To par of +1 and the Score 75-70-71-73=289? | SELECT player FROM table_name_10 WHERE to_par = "+1" AND score = 75 - 70 - 71 - 73 = 289 | sql_create_context |
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,
... | how many treatment of hyperkalemia - insulin / glucose procedures have occurred since 2100? | SELECT COUNT(*) FROM treatment WHERE treatment.treatmentname = 'treatment of hyperkalemia - insulin / glucose' AND STRFTIME('%y', treatment.treatmenttime) >= '2100' | eicu |
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 CL... | Show the number of courses each instructor taught in a stacked bar chart The x-axis is the instructor's first name and group by course code, and show by the bars from low to high please. | SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM GROUP BY CRS_CODE, EMP_FNAME ORDER BY EMP_FNAME | nvbench |
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,
... | had patient 032-4849 when they visited the hospital first time been admitted to an er? | SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '032-4849' AND patient.hospitaladmitsource = 'emergency department' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
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
)
CREATE TABLE university (
Scho... | Give me the comparison about All_Games_Percent over the All_Neutral by a bar chart, I want to order by the x axis in desc. | SELECT All_Neutral, All_Games_Percent FROM basketball_match ORDER BY All_Neutral DESC | nvbench |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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 o... | when was patient 62977 in 2101 admitted for the first time to the hospital? | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 62977 AND STRFTIME('%y', admissions.admittime) = '2101' ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
CREATE TABLE table_54660 (
"Name" text,
"Scotland career" text,
"Caps" real,
"Goals" real,
"Average" real
) | What is the low goal for kenny miller with an average smaller than 0.261? | SELECT MIN("Goals") FROM table_54660 WHERE "Name" = 'kenny miller' AND "Average" < '0.261' | wikisql |
CREATE TABLE table_dev_35 (
"id" int,
"white_blood_cell_count_wbc" int,
"platelets" int,
"neutrophil_count" int,
"serum_creatinine" float,
"albumin" float,
"NOUSE" float
) | platelets >= 100000 / mm3 | SELECT * FROM table_dev_35 WHERE platelets >= 100000 | criteria2sql |
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | Return a scatter chart about the correlation between People_ID and Height , and group by attribute Sex. | SELECT People_ID, Height FROM people GROUP BY Sex | nvbench |
CREATE TABLE table_name_19 (
civilian_deaths VARCHAR,
total_deaths__not_including_foreigners_ VARCHAR
) | How many civilians died in the conflict that left 178, excluding foreigners, dead? | SELECT civilian_deaths FROM table_name_19 WHERE total_deaths__not_including_foreigners_ = "178" | sql_create_context |
CREATE TABLE table_name_76 (
away_team VARCHAR,
tie_no VARCHAR
) | In Tie #18, who was the away team? | SELECT away_team FROM table_name_76 WHERE tie_no = "18" | sql_create_context |
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
) | Draw a bar chart showing the total number of every ship type by categorizing by nationality, could you sort bars in asc order? | SELECT Type, COUNT(Type) FROM ship GROUP BY Nationality, Type ORDER BY Type | nvbench |
CREATE TABLE table_204_375 (
id number,
"#" number,
"season" number,
"competition" text,
"date" text,
"round" text,
"opponent" text,
"h / a" text,
"result" text,
"scorer (s)" text
) | what was the total number of points scored in the game held on 2013-05-21 ? | SELECT "result" + "result" FROM table_204_375 WHERE "date" = '2013-05-21' | squall |
CREATE TABLE table_name_34 (
season VARCHAR,
score VARCHAR
) | Can you tell me the Season that has the Score of 1-0? | SELECT season FROM table_name_34 WHERE score = "1-0" | sql_create_context |
CREATE TABLE payment (
payment_id SMALLINT UNSIGNED,
customer_id SMALLINT UNSIGNED,
staff_id TINYINT UNSIGNED,
rental_id INT,
amount DECIMAL(5,2),
payment_date DATETIME,
last_update TIMESTAMP
)
CREATE TABLE film_actor (
actor_id SMALLINT UNSIGNED,
film_id SMALLINT UNSIGNED,
last... | What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa, and count them by a bar chart, I want to display by the Y in descending. | SELECT payment_date, COUNT(payment_date) FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' ORDER BY COUNT(payment_date) DESC | nvbench |
CREATE TABLE table_245 (
"Model" text,
"Engine make/Capacity" text,
"Power kW@rpm" text,
"Torque Nm@rpm" text,
"Transmission Make/Type/Speed" text,
"GVM (kg) Technical Capacity" text,
"GCM (kg) Technical Capacity" text
) | When the transmission make/type/speed is eaton fs 5306-a manual synchromesh 6 speed, what is the value of the gcm (kg) technical capacity? | SELECT "GCM (kg) Technical Capacity" FROM table_245 WHERE "Transmission Make/Type/Speed" = 'Eaton FS 5306-A Manual Synchromesh 6 Speed' | wikisql |
CREATE TABLE table_name_62 (
points VARCHAR,
year INTEGER
) | with year greater than 1988 what is the total number of points? | SELECT COUNT(points) FROM table_name_62 WHERE year > 1988 | sql_create_context |
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 t... | What is the number of hispanic or latino-puerto rican patients who had ventriculo puncture through previously implanted catheter? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND procedures.long_title = "Ventriculopuncture through previously implanted catheter" | mimicsql_data |
CREATE TABLE table_44634 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What was the par for the t5 place player Steve Jones? | SELECT "To par" FROM table_44634 WHERE "Place" = 't5' AND "Player" = 'steve jones' | wikisql |
CREATE TABLE table_11690135_1 (
interview VARCHAR,
evening_gown VARCHAR
) | Who had an evening gown score of 9.78? | SELECT interview FROM table_11690135_1 WHERE evening_gown = "9.78" | sql_create_context |
CREATE TABLE table_name_56 (
enrollment VARCHAR,
school VARCHAR
) | How much Enrollment has a School of shakamak? | SELECT COUNT(enrollment) FROM table_name_56 WHERE school = "shakamak" | sql_create_context |
CREATE TABLE table_2861364_1 (
executed_person VARCHAR,
under_president VARCHAR,
crime VARCHAR
) | who was executed during president charles de gaulle's reign for thr crime of child murder after rape? | SELECT executed_person FROM table_2861364_1 WHERE under_president = "Charles de Gaulle" AND crime = "Child murder after rape" | sql_create_context |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_descriptio... | what airlines fly into SALT LAKE CITY | SELECT DISTINCT airline.airline_code FROM airline, airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'SALT LAKE CITY' AND flight.airline_code = airline.airline_code AND flight.from_airport = airport_service.airport_code | atis |
CREATE TABLE manufacturer (
name VARCHAR,
open_year VARCHAR,
num_of_shops VARCHAR,
Num_of_Factories VARCHAR
) | Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops. | SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10 | sql_create_context |
CREATE TABLE table_64899 (
"Elector" text,
"Place of birth" text,
"Cardinalatial title" text,
"Elevated" text,
"Elevator" text
) | What Elector has the Place of Birth listed as Bavaria? | SELECT "Elector" FROM table_64899 WHERE "Place of birth" = 'bavaria' | wikisql |
CREATE TABLE table_45195 (
"Rank" real,
"Title" text,
"Studio" text,
"Director(s)" text,
"Worldwide Gross" text
) | Sum of m. night shyamalan ranks? | SELECT SUM("Rank") FROM table_45195 WHERE "Director(s)" = 'm. night shyamalan' | wikisql |
CREATE TABLE table_train_179 (
"id" int,
"systolic_blood_pressure_sbp" int,
"fasting_plasma_glucose_fpg" float,
"diastolic_blood_pressure_dbp" int,
"diabetes" bool,
"body_mass_index_bmi" float,
"triglyceride_tg" float,
"hypertension" bool,
"age" float,
"NOUSE" float
) | uncontrolled diabetes defined as a fpg level of > 240 mg / dl at screening | SELECT * FROM table_train_179 WHERE diabetes = 1 OR fasting_plasma_glucose_fpg > 240 | criteria2sql |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id ... | what does patient 13686 age be in their first hospital visit? | SELECT admissions.age FROM admissions WHERE admissions.subject_id = 13686 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE cite (
cited int,... | return me the authors who have papers in VLDB conference before 2002 after 1995 . | SELECT author.name FROM author, conference, publication, writes WHERE conference.name = 'VLDB' AND publication.cid = conference.cid AND publication.year < 2002 AND publication.year > 1995 AND writes.aid = author.aid AND writes.pid = publication.pid | academic |
CREATE TABLE table_38657 (
"Discipline" text,
"Peter" real,
"Adam" real,
"Jade" real,
"Plat'num" real
) | What's Adam's score when Jade's score is greater than 5 and Peter's score is less than 0? | SELECT AVG("Adam") FROM table_38657 WHERE "Jade" > '5' AND "Peter" < '0' | wikisql |
CREATE TABLE table_54517 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Event" text
) | What was the venue where the result was 12th? | SELECT "Venue" FROM table_54517 WHERE "Result" = '12th' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
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... | 13年10月30号到21年6月3号,患者07524990的苯巴比妥是怎样的 | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info ON 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_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.... | css |
CREATE TABLE table_name_85 (
turbine_vendor VARCHAR,
wind_farm VARCHAR,
size__mw_ VARCHAR,
turbines VARCHAR,
county VARCHAR
) | Who is the turbine vendor for Meenadreen in Donegal county with less than 6 turbines with a size of 0.85 MW? | SELECT turbine_vendor FROM table_name_85 WHERE turbines < 6 AND county = "donegal" AND size__mw_ = "0.85" AND wind_farm = "meenadreen" | sql_create_context |
CREATE TABLE table_46409 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" real,
"Year named" real
) | What's the total diameter when longitude is 357.8e later than 1985? | SELECT COUNT("Diameter (km)") FROM table_46409 WHERE "Longitude" = '357.8e' AND "Year named" > '1985' | wikisql |
CREATE TABLE table_name_4 (
result VARCHAR,
date VARCHAR
) | What is the Result with a Date with 4 september 2013? | SELECT result FROM table_name_4 WHERE date = "4 september 2013" | sql_create_context |
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 patient (
uniquepid text,
... | tell me the change in bedside glucose levels of patient 027-178495 measured at 2102-06-02 12:25:17 compared to the value measured at 2102-06-02 00:23:17? | SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-178495')) AND lab.labname = 'bedside glucose' AND lab.labresulttime = '2102... | eicu |
CREATE TABLE wdmzjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH number,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZD... | 列出在2003年10月24日到2017年4月14日内患者曹诗蕾被开出多少检验报告单的检验报告单号? | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '曹诗蕾' AND jybg... | css |
CREATE TABLE table_25421463_1 (
season VARCHAR,
final_placing VARCHAR,
team_name VARCHAR
) | In what season was the final placing NC and the team SL Formula Racing? | SELECT season FROM table_25421463_1 WHERE final_placing = "NC†" AND team_name = "SL Formula Racing" | sql_create_context |
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
)
CREATE TABLE university (
Scho... | Show me about the distribution of Team_Name and Team_ID in a bar chart, and order Y-axis in asc order. | SELECT Team_Name, Team_ID FROM basketball_match ORDER BY Team_ID | nvbench |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | Posts which had given tag in the past. | SELECT DISTINCT PostHistory.PostId AS "post_link", url = 'site://posts/' + CAST(PostHistory.PostId AS TEXT) + '/revisions', Posts.OwnerUserId AS "user_link", Posts.Score, Posts.Tags, Posts.CreationDate, Posts.LastActivityDate FROM PostHistory INNER JOIN Posts ON PostHistory.PostId = Posts.Id WHERE PostHistoryTypeId IN ... | sede |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 73598639069入院就诊时,诊断出的疾病编号及名称是什么 | SELECT gwyjzb.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '73598639069' UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '73598639069' | css |
CREATE TABLE table_25162 (
"Year" real,
"Date" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text
) | What was the date if the driver was Robert Pressley? | SELECT "Date" FROM table_25162 WHERE "Driver" = 'Robert Pressley' | wikisql |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number ... | Which upper level classes do not require 496 ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, program_course WHERE NOT COURSE_1.course_id IN (SELECT course_prerequisite.pre_course_id FROM course AS COURSE_0, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.cours... | advising |
CREATE TABLE apartment_facilities (
apt_id number,
facility_code text
)
CREATE TABLE apartment_bookings (
apt_booking_id number,
apt_id number,
guest_id number,
booking_status_code text,
booking_start_date time,
booking_end_date time
)
CREATE TABLE apartments (
apt_id number,
b... | Give me the minimum and maximum bathroom count among all the apartments. | SELECT MIN(bathroom_count), MAX(bathroom_count) FROM apartments | spider |
CREATE TABLE table_204_833 (
id number,
"game" number,
"date" text,
"team" text,
"score" text,
"high points" text,
"high rebounds" text,
"high assists" text,
"location\nattendance" text,
"record" text
) | what is the next date after april 8 ? | SELECT "date" FROM table_204_833 WHERE "game" = (SELECT "game" FROM table_204_833 WHERE "date" = 'april 8') + 1 | squall |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number ... | For CEE 650 next semester , are there any sections not on Monday ? | SELECT DISTINCT course_offering.section_number FROM course, course_offering, semester WHERE course_offering.monday = 'N' AND course.course_id = course_offering.course_id AND course.department = 'CEE' AND course.number = 650 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.ye... | advising |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | count the number of patients whose marital status is single and lab test category is blood gas? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "SINGLE" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
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 founder and the average of revenue , and group by attribute founder, and visualize them by a bar chart, I want to list X in descending order please. | SELECT Founder, AVG(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC | nvbench |
CREATE TABLE table_name_29 (
rank INTEGER,
source VARCHAR,
year VARCHAR
) | What is the average rank that has cia world factbook as the source and a year prior to 2005? | SELECT AVG(rank) FROM table_name_29 WHERE source = "cia world factbook" AND year < 2005 | sql_create_context |
CREATE TABLE table_name_76 (
player VARCHAR,
place VARCHAR,
score VARCHAR
) | Who placed in t5 and scored 73-69-68=210? | SELECT player FROM table_name_76 WHERE place = "t5" AND score = 73 - 69 - 68 = 210 | sql_create_context |
CREATE TABLE table_203_594 (
id number,
"canal" text,
"length (miles)" number,
"locks" number,
"max length (ft)" number,
"width (ft)" number,
"year opened" number,
"year abandoned" number,
"year restored" number
) | which was the last canal opened in scotland ? | SELECT "canal" FROM table_203_594 WHERE "year opened" = (SELECT MAX("year opened") FROM table_203_594) | squall |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
... | show me all flights from SAN FRANCISCO to 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | atis |
CREATE TABLE table_203_349 (
id number,
"no. in\nseries" number,
"no. in\nseason" number,
"title" text,
"directed by" text,
"written by" text,
"original air date" text,
"production\ncode" text,
"u.s. viewers\n(millions)" number
) | how many episodes were shown in season 1 ? | SELECT COUNT("title") FROM table_203_349 | squall |
CREATE TABLE table_200_35 (
id number,
"party" text,
"active voters" number,
"inactive voters" number,
"total voters" number,
"percentage" text
) | as of october 25 , 2005 , how many voters are either democratic or republican ? | SELECT SUM("total voters") FROM table_200_35 WHERE "party" IN ('democratic', 'republican') | squall |
CREATE TABLE table_name_33 (
silver INTEGER,
bronze VARCHAR,
total VARCHAR
) | What is the lowest silver that has 2 as the bronze, with a total greater than 4? | SELECT MIN(silver) FROM table_name_33 WHERE bronze = 2 AND total > 4 | sql_create_context |
CREATE TABLE table_name_75 (
bronze INTEGER,
nation VARCHAR
) | How many Bronzes that has a Nation of italy? | SELECT MAX(bronze) FROM table_name_75 WHERE nation = "italy" | sql_create_context |
CREATE TABLE table_16941304_4 (
driver___passenger VARCHAR,
points VARCHAR
) | Name the driver passenger for 394 points | SELECT driver___passenger FROM table_16941304_4 WHERE points = 394 | sql_create_context |
CREATE TABLE table_31326 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
) | Who is the director when the title is 'believers'? | SELECT "Directed by" FROM table_31326 WHERE "Title" = 'Believers' | wikisql |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | My answers on Stack Exchange. | SELECT * FROM Posts WHERE OwnerUserId = 3422261 | sede |
CREATE TABLE table_name_46 (
lost INTEGER,
games INTEGER
) | How many games lost for teams with over 6 games? | SELECT MIN(lost) FROM table_name_46 WHERE games > 6 | sql_create_context |
CREATE TABLE table_23098 (
"Year" text,
"Marriages between men" real,
"Marriages between women" real,
"Same-sex marriages" real,
"Total marriages" real,
"% same-sex marriages" text
) | How many marriages between women have % same-sex marriages of 1.06? | SELECT "Marriages between women" FROM table_23098 WHERE "% same-sex marriages" = '1.06' | wikisql |
CREATE TABLE club (
Club_ID int,
Club_name text,
Region text,
Start_year int
)
CREATE TABLE coach (
Coach_ID int,
Coach_name text,
Gender text,
Club_ID int,
Rank int
)
CREATE TABLE player (
Player_ID int,
Sponsor_name text,
Player_name text,
Gender text,
Residen... | Show different occupations along with the number of players in each occupation with a bar chart. | SELECT Occupation, COUNT(*) FROM player GROUP BY Occupation | nvbench |
CREATE TABLE table_203_300 (
id number,
"year" number,
"tournament" text,
"venue" text,
"result" text,
"extra" text
) | was there a result of 1st place after the year 2006 ? | SELECT (SELECT COUNT(*) FROM table_203_300 WHERE "result" = 1 AND "year" > 2006) > 0 | squall |
CREATE TABLE table_name_4 (
date VARCHAR,
record VARCHAR
) | Which Date has a Record of 29 47? | SELECT date FROM table_name_4 WHERE record = "29–47" | sql_create_context |
CREATE TABLE table_9712 (
"Province" text,
"Skip" text,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
) | How many ends lost for Alberta when stolen ends are greater than 7? | SELECT SUM("Ends Lost") FROM table_9712 WHERE "Province" = 'alberta' AND "Stolen Ends" > '7' | wikisql |
CREATE TABLE table_53769 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | what is the result when the competition is friendly on 8 october 2009? | SELECT "Result" FROM table_53769 WHERE "Competition" = 'friendly' AND "Date" = '8 october 2009' | wikisql |
CREATE TABLE table_12002388_1 (
year INTEGER,
reg_season VARCHAR
) | What year did they finish 1st, southern? | SELECT MAX(year) FROM table_12002388_1 WHERE reg_season = "1st, Southern" | sql_create_context |
CREATE TABLE table_30594 (
"Version" text,
"Release" text,
"Release date" text,
"End of maintenance" text,
"Requirement" text
) | What's the number of the 1.0.12 release version? | SELECT COUNT("Version") FROM table_30594 WHERE "Release" = '1.0.12' | wikisql |
CREATE TABLE table_21058823_1 (
result VARCHAR,
opponent VARCHAR
) | What did they do against Memphis? | SELECT result FROM table_21058823_1 WHERE opponent = "Memphis" | sql_create_context |
CREATE TABLE table_31153 (
"Name/ designation" text,
"Year of intro" real,
"Country of origin" text,
"Primary cartridge" text,
"Major users" text
) | Who are all the major users of the Saturn Machine Pistol? | SELECT "Major users" FROM table_31153 WHERE "Name/ designation" = 'Saturn machine pistol' | wikisql |
CREATE TABLE table_203_535 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | what is the total amount of medals spain has won ? | SELECT "total" FROM table_203_535 WHERE "nation" = 'spain' | squall |
CREATE TABLE table_name_3 (
surface VARCHAR,
date VARCHAR
) | Name the surface for 12 september 2006 | SELECT surface FROM table_name_3 WHERE date = "12 september 2006" | sql_create_context |
CREATE TABLE table_16402 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | How many players played for adams state school? | SELECT COUNT("Player") FROM table_16402 WHERE "College" = 'Adams State' | wikisql |
CREATE TABLE table_74055 (
"English" text,
"Proto-Semitic" text,
"Akkadian" text,
"Arabic" text,
"Aramaic" text,
"Hebrew" text,
"Geez" text,
"Mehri" text
) | If in arabic it is sal m-, what is it in proto-semitic? | SELECT "Proto-Semitic" FROM table_74055 WHERE "Arabic" = 'salām-' | wikisql |
CREATE TABLE table_6945 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" real
) | What away team has tottenham hotspur as the home team? | SELECT "Away team" FROM table_6945 WHERE "Home team" = 'tottenham hotspur' | wikisql |
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... | what is the minimum total cost of a hospital involving a laboratory test for peak airway/pressure last year? | 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 lab.patientunitstayid FROM lab WHERE lab.labname = 'peak airway/pressure')) AND DATETIME(cost.chargetime, 'start of year... | eicu |
CREATE TABLE table_203_239 (
id number,
"year" number,
"title" text,
"chinese title" text,
"role" text,
"notes" text
) | which year did she work on the most films ? | SELECT "year" FROM table_203_239 GROUP BY "year" ORDER BY COUNT("title") DESC LIMIT 1 | squall |
CREATE TABLE table_56135 (
"Nation" text,
"Gold" text,
"Silver" text,
"Bronze" text,
"Total" real
) | Tell me the gold for netherlands | SELECT "Gold" FROM table_56135 WHERE "Nation" = 'netherlands' | wikisql |
CREATE TABLE table_14309 (
"Date" text,
"Opponent" text,
"City" text,
"Result" text,
"Score" text
) | Who was Milwaukee's opponent? | SELECT "Opponent" FROM table_14309 WHERE "City" = 'milwaukee' | wikisql |
CREATE TABLE table_53507 (
"Name" text,
"Years" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) | What is the total number on roll for Shelly Park school? | SELECT COUNT("Roll") FROM table_53507 WHERE "Name" = 'shelly park school' | wikisql |
CREATE TABLE table_name_56 (
publisher VARCHAR,
release_title VARCHAR
) | Who was the publisher of Martial Law: Dead Ringers? | SELECT publisher FROM table_name_56 WHERE release_title = "martial law: dead ringers" | sql_create_context |
CREATE TABLE table_28885977_1 (
location VARCHAR,
stadium VARCHAR
) | What is the location of the Moorabbin Oval stadium? | SELECT location FROM table_28885977_1 WHERE stadium = "Moorabbin Oval" | sql_create_context |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagn... | what was the name of the drug prescription that patient 030-53717 was last prescribed in their first hospital encounter? | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-53717' AND NOT patient.hospitaldischargetime IS NULL ORDER BY p... | eicu |
CREATE TABLE table_203_726 (
id number,
"year" number,
"national champion" text,
"score" text,
"runner-up" text,
"host or site" text
) | how many times was ucla national champion ? | SELECT COUNT(*) FROM table_203_726 WHERE "national champion" = 'ucla' | squall |
CREATE TABLE table_42816 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
) | Who was the Home captain that played at the venue Oval? | SELECT "Home captain" FROM table_42816 WHERE "Venue" = 'oval' | wikisql |
CREATE TABLE table_204_735 (
id number,
"rank" number,
"team" text,
"names" text,
"time" text,
"qualification" text
) | how many teams finished better than spain in cycling at the 1996 summer olympics men 's team pursuit ? | SELECT COUNT("team") FROM table_204_735 WHERE "rank" < (SELECT "rank" FROM table_204_735 WHERE "team" = 'spain') | squall |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.