context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE Patient (
SSN INTEGER,
Name VARCHAR(30),
Address VARCHAR(30),
Phone VARCHAR(30),
InsuranceID INTEGER,
PCP INTEGER
)
CREATE TABLE Appointment (
AppointmentID INTEGER,
Patient INTEGER,
PrepNurse INTEGER,
Physician INTEGER,
Start DATETIME,
End DATETIME,
Exa... | What are the names of all the physicians who took appointments, and count them by a bar chart, and could you order by the names in desc please? | SELECT Name, COUNT(Name) FROM Appointment AS T1 JOIN Physician AS T2 ON T1.Physician = T2.EmployeeID GROUP BY Name ORDER BY Name DESC | nvbench |
CREATE TABLE table_66582 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Score" text,
"Record" text
) | Who was the opponent at the game with a score of 42-28 after week 4? | SELECT "Opponent" FROM table_66582 WHERE "Week" > '4' AND "Score" = '42-28' | wikisql |
CREATE TABLE table_60933 (
"Player" text,
"Country" text,
"Year won" real,
"Total" real,
"To par" text,
"Finish" text
) | What was the To Par of Tiger Woods who won in 1988? | SELECT "To par" FROM table_60933 WHERE "Year won" = '1988' | wikisql |
CREATE TABLE table_64909 (
"Rank" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" real
) | What's the lowest rank of Lane 3? | SELECT MIN("Rank") FROM table_64909 WHERE "Lane" = '3' | wikisql |
CREATE TABLE table_27501971_2 (
country VARCHAR,
año VARCHAR
) | When the a o was 2012, who was the county? | SELECT country FROM table_27501971_2 WHERE año = 2012 | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREA... | did patient 027-101472 have a alkaline phos. test? | SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-101472')) AND lab.labname = 'alkaline phos.' | eicu |
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 prescription... | how many patients whose admission location is clinic referral/premature and primary disease is abdominal abscess? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.diagnosis = "ABDOMINAL ABSCESS" | mimicsql_data |
CREATE TABLE DEPARTMENT (
DName VARCHAR,
Division VARCHAR,
Building VARCHAR
) | Find the names of departments that are either in division AS or in division EN and in Building NEB. | SELECT DName FROM DEPARTMENT WHERE Division = "AS" UNION SELECT DName FROM DEPARTMENT WHERE Division = "EN" AND Building = "NEB" | sql_create_context |
CREATE TABLE table_30286 (
"English word" text,
"Slovak" text,
"Czech" text,
"Rusyn" text,
"Ukrainian" text,
"Belarusian" text,
"Polish" text,
"Serbo-Croatian" text,
"Bulgarian" text
) | How many words are there in rusyn for the bulgarian word (kupuva)? | SELECT COUNT("Rusyn") FROM table_30286 WHERE "Bulgarian" = 'купува (kupuva)' | wikisql |
CREATE TABLE table_train_204 (
"id" int,
"systolic_blood_pressure_sbp" int,
"plasma_glucose_concentration" int,
"fasting_plasma_glucose_fpg" float,
"increase_risk_of_intervention" bool,
"diastolic_blood_pressure_dbp" int,
"life_span" bool,
"body_mass_index_bmi" float,
"NOUSE" float
) | fpg > 126 mg / dl* | SELECT * FROM table_train_204 WHERE fasting_plasma_glucose_fpg > 126 | criteria2sql |
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
... | What are the average ages for male and female students. | SELECT Sex, AVG(Age) FROM Student GROUP BY Sex | nvbench |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
... | what is the number of patients born before 1821 who have bladder cancer/sda primary disease? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BLADDER CANCER/SDA" AND demographic.dob_year < "1821" | mimicsql_data |
CREATE TABLE table_1473672_9 (
nhl_team VARCHAR,
college_junior_club_team VARCHAR
) | what's the nhl team with college/junior/club team being brandon wheat kings (wchl) | SELECT nhl_team FROM table_1473672_9 WHERE college_junior_club_team = "Brandon Wheat Kings (WCHL)" | sql_create_context |
CREATE TABLE band (
id number,
firstname text,
lastname text
)
CREATE TABLE performance (
songid number,
bandmate number,
stageposition text
)
CREATE TABLE songs (
songid number,
title text
)
CREATE TABLE instruments (
songid number,
bandmateid number,
instrument text
)
C... | Find all the songs whose name contains the word 'the'. | SELECT title FROM songs WHERE title LIKE '% the %' | spider |
CREATE TABLE table_name_21 (
losses INTEGER,
wins VARCHAR,
matches VARCHAR
) | What is the highest Losses, when Wins is '1', and when Matches is less than 2? | SELECT MAX(losses) FROM table_name_21 WHERE wins = 1 AND matches < 2 | sql_create_context |
CREATE TABLE table_21660 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | How many were won when the points were 12? | SELECT COUNT("Won") FROM table_21660 WHERE "Points" = '12' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 自零三年四月九日至一九年十一月二十四日8739090这家医院所有的记录里个人账户支出比上全部的医疗费用的平均比值 | SELECT AVG(t_kc24.PER_ACC_PAY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '8739090' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2003-04-09' AND '2019-11-24' UNION SELECT AVG(t_kc24.PER_ACC_PAY) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHE... | css |
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,
... | 开出检验报告单85054686577的科室编码以及名称能不能说一下? | SELECT zyjybgb.KSBM, zyjybgb.KSMC FROM zyjybgb WHERE zyjybgb.BGDH = '85054686577' UNION SELECT mzjybgb.KSBM, mzjybgb.KSMC FROM mzjybgb WHERE mzjybgb.BGDH = '85054686577' | css |
CREATE TABLE table_46185 (
"Fin. Pos" text,
"Car No." text,
"Driver" text,
"Team" text,
"Laps" text,
"Time/Retired" text,
"Grid" text,
"Laps Led" text,
"Points" text
) | How many laps did the car do that had a final position of 17? | SELECT "Laps" FROM table_46185 WHERE "Fin. Pos" = '17' | wikisql |
CREATE TABLE table_name_92 (
studio_s_ VARCHAR,
year VARCHAR,
director VARCHAR
) | What studio did Paul Greengrass direct in 2007? | SELECT studio_s_ FROM table_name_92 WHERE year = 2007 AND director = "paul greengrass" | sql_create_context |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
... | Tags that have a plus sign. | SELECT Id, TagName FROM Tags WHERE TagName LIKE '%+%' | sede |
CREATE TABLE table_11602313_4 (
fsb VARCHAR,
part_number_s_ VARCHAR
) | What is the FSB of the model with part number lf80537ge0251mn? | SELECT fsb FROM table_11602313_4 WHERE part_number_s_ = "LF80537GE0251MN" | sql_create_context |
CREATE TABLE table_60187 (
"Year" real,
"Champion" text,
"Finalist" text,
"Score" text,
"Place" text
) | What is Place, when Year is greater than 2006, and when Champion is 'Asvel'? | SELECT "Place" FROM table_60187 WHERE "Year" > '2006' AND "Champion" = 'asvel' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | give me the number of patients whose diagnosis icd9 code is 25060 and blood was taken as the lab test fluid. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "25060" AND lab.fluid = "Blood" | mimicsql_data |
CREATE TABLE table_21843 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | Name the points aginst when drawn is 1 and points is 51 | SELECT "Points against" FROM table_21843 WHERE "Drawn" = '1' AND "Points" = '51' | wikisql |
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,
... | how many patients on iv bolus route of drug administration have the diagnoses of personal history of antineoplastic chemotherapy? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Personal history of antineoplastic chemotherapy" AND prescriptions.route = "IV BOLUS" | mimicsql_data |
CREATE TABLE table_25773116_2 (
round VARCHAR,
date VARCHAR
) | How many rounds were played on May 8? | SELECT COUNT(round) FROM table_25773116_2 WHERE date = "May 8" | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | what is the number of patients whose primary disease is hypertension;rule out coronary artery disease\cardiac cath? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HYPERTENSION;RULE OUT CORONARY ARTERY DISEASE\CARDIAC CATH" | mimicsql_data |
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER
)
CREATE TABLE Product_Suppliers (
product_id INTEGER,
supplier_id INTEGER,
date_supplied_from DATETIME,
date_supplied_to DATETIME,
total_amount_purchased VARCHAR(80),
total_value_purchased DECIMA... | Give the minimum product price for each product type in a bar chart. | SELECT product_type_code, MIN(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code | nvbench |
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
) | How many different products are produced in each headquarter city Visualize by bar chart, I want to list by the y axis in descending. | SELECT Headquarter, COUNT(DISTINCT T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code ORDER BY COUNT(DISTINCT T1.Name) DESC | nvbench |
CREATE TABLE table_10379 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | When the home team of st kilda was playing, what was the away team score? | SELECT "Away team score" FROM table_10379 WHERE "Home team" = 'st kilda' | wikisql |
CREATE TABLE table_74887 (
"Year" real,
"Location" text,
"Gold" text,
"Silver" text,
"Bronze" text
) | What's the lowest Year with the Location of Bangkok? | SELECT MIN("Year") FROM table_74887 WHERE "Location" = 'bangkok' | wikisql |
CREATE TABLE table_28413 (
"Institution" text,
"Location" text,
"Nickname" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Football?" text,
"Joined" real
) | What is every institution with the nickname of Wildcats? | SELECT "Institution" FROM table_28413 WHERE "Nickname" = 'WildCats' | wikisql |
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 drug name of subject name kelly gallardo? | SELECT prescriptions.drug FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Kelly Gallardo" | mimicsql_data |
CREATE TABLE table_name_83 (
comp VARCHAR,
ryds VARCHAR
) | What is the comp when the ryds is 2? | SELECT comp FROM table_name_83 WHERE ryds = "2" | sql_create_context |
CREATE TABLE table_30512 (
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | How many players were drafted by the Edmonton Oilers? | SELECT COUNT("Player") FROM table_30512 WHERE "NHL team" = 'Edmonton Oilers' | wikisql |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,... | [Microsoft AAD B2C] Average answer response time in hours MoM. | SELECT P.Id AS PostID, P.Title, P.Body FROM Posts AS P INNER JOIN Posts AS A ON P.AcceptedAnswerId = A.Id INNER JOIN PostTags AS PT ON P.Id = PT.PostId INNER JOIN Tags AS T ON T.Id = PT.TagId WHERE T.TagName LIKE 'azure-ad-b2c' AND P.Score > -1 AND P.PostTypeId = 1 | sede |
CREATE TABLE table_27319183_7 (
official_itv_rating__millions_ VARCHAR,
episode VARCHAR
) | What were the official itv ratings in millions for semi-final 5? | SELECT official_itv_rating__millions_ FROM table_27319183_7 WHERE episode = "Semi-final 5" | sql_create_context |
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 varch... | Do you know of any upper level classes that are 17 credits ? | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 17 AND program_course.category LIKE 'ULCS' | advising |
CREATE TABLE table_21184 (
"Show" text,
"Last Aired" real,
"Previous Network" text,
"Retitled as/Same" text,
"New/Returning/Same Network" text,
"Returning" text
) | Did the name change for the program last aired in 1958? | SELECT "Retitled as/Same" FROM table_21184 WHERE "Last Aired" = '1958' | wikisql |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
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,
... | give me the flights from WASHINGTON to PHILADELPHIA for 12 2 | 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND date_day.day_number = 2 AND date_day.month_number = 12 ... | atis |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREAT... | when was the first time patient 017-20711 had a output (ml)-urethral catheter double-lumen 14 fr. output on last month/12. | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-20711')) AND intakeoutput.cellpath LIKE '%output%... | eicu |
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 diagnoses (
... | provide the number of patients whose primary disease is angioedema and admission year is less than 2190? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ANGIOEDEMA" AND demographic.admityear < "2190" | mimicsql_data |
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 hours has it been since the admission of patient 017-45919 to the hospital? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.hospitaladmittime)) FROM patient WHERE patient.uniquepid = '017-45919' AND patient.hospitaldischargetime IS NULL | eicu |
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... | 统计一下医院3816229的入院诊断为急性根尖周炎的医疗记录中最少的和最多的医疗费总额分别是多少 | SELECT MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.MED_SER_ORG_NO = '3816229' AND qtb.IN_DIAG_DIS_NM = '急性根尖周炎' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.MED_SER_ORG_NO = '3816229' AND gyb.IN_DIAG_DIS_NM = '急性根尖周炎' UNION SEL... | css |
CREATE TABLE table_13741576_4 (
won VARCHAR,
try_bonus VARCHAR
) | Name the won for try bonus of 10 | SELECT won FROM table_13741576_4 WHERE try_bonus = "10" | sql_create_context |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE 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,
... | 医院3111269全部医疗就诊的记录里,不同科室接诊的患者和有不同入院诊断的患者就诊的平均岁数是多少 | SELECT gwyjzb.MED_ORG_DEPT_NM, gwyjzb.IN_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '3111269' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.IN_DIAG_DIS_NM UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.IN_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '31112... | css |
CREATE TABLE Catalog_Structure (
catalog_level_number INTEGER,
catalog_id INTEGER,
catalog_level_name VARCHAR(50)
)
CREATE TABLE Catalogs (
catalog_id INTEGER,
catalog_name VARCHAR(50),
catalog_publisher VARCHAR(80),
date_of_publication DATETIME,
date_of_latest_revision DATETIME
)
CREA... | Find the names and publication dates of all catalogs that have catalog level numbers greater than 5 Bin publication dates into Year interval, and count catalog as a bar chart, display by the Y from low to high. | SELECT date_of_publication, COUNT(date_of_publication) FROM Catalogs AS t1 JOIN Catalog_Structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5 ORDER BY COUNT(date_of_publication) | nvbench |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE 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,
... | 给病患33250252开出均价不足3095.33元的药品在哪几次医疗记录中?分别列出医疗就诊编号分别是多少? | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '33250252' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 3095.33) | css |
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous... | 10000 ios questions more commented. | SELECT Id, Tags, CommentCount, AnswerCount, ViewCount, FavoriteCount, Score FROM Posts AS Question WHERE Question.Tags LIKE '%<ios%' ORDER BY CommentCount DESC LIMIT 10000 | sede |
CREATE TABLE table_32256 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the home team score when south melbourne was the home team? | SELECT "Home team score" FROM table_32256 WHERE "Home team" = 'south melbourne' | wikisql |
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 prescriptions (
row_id number,
subject_id number,
h... | when was the first time patient 1561 had their temperature c (calc) measured or taken on this month/30? | SELECT chartevents.charttime 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 = 1561)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'temperatu... | mimic_iii |
CREATE TABLE table_name_52 (
goals INTEGER,
position VARCHAR,
first_appearance VARCHAR,
last_appearance VARCHAR,
appearances VARCHAR
) | What is the average goals when the last appearance was before 1984, there were more than 17 appearances, the first appearance was before 1961 and the position was mf? | SELECT AVG(goals) FROM table_name_52 WHERE last_appearance < 1984 AND appearances > 17 AND first_appearance < 1961 AND position = "mf" | sql_create_context |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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,
C... | 以前这位患者82162201有什么疾病? | SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '82162201' | css |
CREATE TABLE table_15624586_2 (
uranium_required_2006_08 VARCHAR,
country VARCHAR
) | How much uranium did Russia use in 2006 to 2008? | SELECT uranium_required_2006_08 FROM table_15624586_2 WHERE country = "Russia" | sql_create_context |
CREATE TABLE table_24231638_3 (
date_of_appointment VARCHAR,
team VARCHAR
) | what is the date of appointment for the team osasuna? | SELECT date_of_appointment FROM table_24231638_3 WHERE team = "Osasuna" | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | provide the number of patients who were tested for renal epithelial cells in the lab tests. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Renal Epithelial Cells" | mimicsql_data |
CREATE TABLE table_77017 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
) | What were the notes when his position was 10th? | SELECT "Notes" FROM table_77017 WHERE "Position" = '10th' | wikisql |
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adul... | What are the name of rooms booked by customers whose first name has 'ROY' in part, and count them by a bar chart | SELECT roomName, COUNT(roomName) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE FirstName LIKE '%ROY%' GROUP BY roomName | nvbench |
CREATE TABLE table_name_65 (
tournament VARCHAR
) | What shows for 2006 when 2000 is 1r, 1996 is A, and Tournament is Cincinnati Masters? | SELECT 2006 FROM table_name_65 WHERE 2000 = "1r" AND 1996 = "a" AND tournament = "cincinnati masters" | 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 patient (
uniquep... | until 1 year ago how many patients were diagnosed with cardiac arrest - initial rhythm: unknown within 2 months after having undergone pulmonary artery catheter placement? | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'pulmonary artery catheter placement' AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-1 y... | eicu |
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(... | For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by weekday, and could you order in descending by the y-axis? | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY COUNT(HIRE_DATE) DESC | nvbench |
CREATE TABLE table_36320 (
"Episode" text,
"Season" real,
"Production code" text,
"Original air date" text,
"Directed by" text
) | Which episode was directed by Bob Anderson with a production code of KABF16 and a season before than 25? | SELECT "Episode" FROM table_36320 WHERE "Season" < '25' AND "Directed by" = 'bob anderson' AND "Production code" = 'kabf16' | wikisql |
CREATE TABLE table_204_373 (
id number,
"wager" text,
"winner" text,
"loser" text,
"location" text,
"date" text
) | how many total fights took place in mexico city , mexico ? | SELECT COUNT(*) FROM table_204_373 WHERE "location" = 'mexico city, mexico' | squall |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE cost (
ro... | how many patients were diagnosed with dmii wo cmp nt st uncntr within 2 months after having been diagnosed with portal vein thrombosis since 2101. | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'dmii wo cmp nt st ... | mimic_iii |
CREATE TABLE Events (
Event_ID INTEGER,
Service_ID INTEGER,
Event_Details VARCHAR(255)
)
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Participants (
Participant_ID... | Give me a bar chart, that just lists the participant ids as Y and their details as X-axis, and display bars from low to high order. | SELECT Participant_Details, Participant_ID FROM Participants ORDER BY Participant_Details | nvbench |
CREATE TABLE table_name_63 (
agg VARCHAR,
team_1 VARCHAR
) | What is Agg., when Team 1 is CD El Nguema? | SELECT agg FROM table_name_63 WHERE team_1 = "cd elá nguema" | sql_create_context |
CREATE TABLE table_69384 (
"Name" text,
"League" real,
"FA Cup" real,
"League Cup" real,
"Other" real,
"Total" real
) | What is the greatest Total, when the FA Cup is 0, when the Name is Robbie Williams Category:Articles with hCards, and when the League Cup is less than 0? | SELECT MAX("Total") FROM table_69384 WHERE "FA Cup" = '0' AND "Name" = 'robbie williams category:articles with hcards' AND "League Cup" < '0' | wikisql |
CREATE TABLE table_15643 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Crowd" text,
"Record" text
) | Name the loss with record of 71-33 | SELECT "Loss" FROM table_15643 WHERE "Record" = '71-33' | wikisql |
CREATE TABLE table_name_59 (
release_date VARCHAR,
title VARCHAR
) | What is the release date of The Blow Out? | SELECT release_date FROM table_name_59 WHERE title = "the blow out" | sql_create_context |
CREATE TABLE table_59846 (
"Date" text,
"Ship" text,
"Nationality" text,
"Tonnage" real,
"Fate" text
) | What was the tonnage on 30 march 1943? | SELECT AVG("Tonnage") FROM table_59846 WHERE "Date" = '30 march 1943' | wikisql |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END... | Show me a bar chart, that simply displays the last name of the employee and the corresponding department's location id, and display bar in asc order. | SELECT LAST_NAME, LOCATION_ID FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T1.EMPLOYEE_ID = T2.MANAGER_ID ORDER BY LAST_NAME | nvbench |
CREATE TABLE table_name_6 (
name VARCHAR,
location VARCHAR,
current_status VARCHAR,
line VARCHAR
) | What is the name of the station that is currently demolished with the Shepparton line in Tabilk? | SELECT name FROM table_name_6 WHERE current_status = "demolished" AND line = "shepparton line" AND location = "tabilk" | sql_create_context |
CREATE TABLE table_22597626_2 (
surface VARCHAR,
championship VARCHAR,
year VARCHAR
) | What is the surface made of if the year is 1979 and the championship is US Open? | SELECT surface FROM table_22597626_2 WHERE championship = "US Open" AND year = 1979 | sql_create_context |
CREATE TABLE table_2679061_12 (
college_junior_club_team VARCHAR,
player VARCHAR
) | Which school did harold duvall attend? | SELECT college_junior_club_team FROM table_2679061_12 WHERE player = "Harold Duvall" | sql_create_context |
CREATE TABLE table_13362 (
"Player" text,
"Games" real,
"Comp" real,
"Yards" real,
"Rating" real
) | What is the sum rating with more than 1 comp for mark miller? | SELECT COUNT("Rating") FROM table_13362 WHERE "Player" = 'mark miller' AND "Comp" > '1' | wikisql |
CREATE TABLE table_name_68 (
score VARCHAR,
loss VARCHAR
) | What was the score of the game that had a loss of Chad Fox (3 3)? | SELECT score FROM table_name_68 WHERE loss = "chad fox (3–3)" | sql_create_context |
CREATE TABLE table_name_88 (
mcintosh VARCHAR,
paul_mccartney VARCHAR,
whitten VARCHAR,
stuart VARCHAR
) | Which McIntosh has a Whitten of drums, and a Stuart of bass, and a Paul McCartney of electric guitar? | SELECT mcintosh FROM table_name_88 WHERE whitten = "drums" AND stuart = "bass" AND paul_mccartney = "electric guitar" | sql_create_context |
CREATE TABLE Student_Tests_Taken (
test_result VARCHAR
) | How many tests have result 'Fail'? | SELECT COUNT(*) FROM Student_Tests_Taken WHERE test_result = "Fail" | 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... | Draw a bar chart about the distribution of ACC_Road and the sum of Team_ID , and group by attribute ACC_Road, and list by the total number in desc. | SELECT ACC_Road, SUM(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY SUM(Team_ID) DESC | nvbench |
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,... | 在2010年12月16日到2016年2月20日内医院6312732所有姓鲁的患者的医疗就诊记录都是哪些? | SELECT * FROM t_kc21 WHERE MED_SER_ORG_NO = '6312732' AND IN_HOSP_DATE BETWEEN '2010-12-16' AND '2016-02-20' AND PERSON_NM LIKE '鲁%' | css |
CREATE TABLE table_name_9 (
opponent_in_the_final VARCHAR,
surface VARCHAR,
score_in_the_final VARCHAR
) | Who is the Opponent in the final of the match played on Clay Surface with a Score in the final of 4 6, 3 6? | SELECT opponent_in_the_final FROM table_name_9 WHERE surface = "clay" AND score_in_the_final = "4–6, 3–6" | sql_create_context |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
hig... | what do you have going from ATLANTA to PHILADELPHIA serving BREAKFAST | 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, food_service WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND fo... | atis |
CREATE TABLE table_name_4 (
crowd INTEGER,
away_team VARCHAR
) | How many people attended Melbourne's away game? | SELECT SUM(crowd) FROM table_name_4 WHERE away_team = "melbourne" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | how many patients whose days of hospital stay is greater than 26 and drug name is lorazepam? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "26" AND prescriptions.drug = "Lorazepam" | mimicsql_data |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 列出云越彬病患的医疗记录中医疗费总额高于395.33元的出院诊断疾病名称和编码都是啥? | SELECT t_kc24.t_kc21_OUT_DIAG_DIS_CD, t_kc24.t_kc21_OUT_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '云越彬' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 395.33) | css |
CREATE TABLE table_train_267 (
"id" int,
"pregnancy_or_lactation" bool,
"smoking" bool,
"allergy_to_nuts" bool,
"body_mass_index_bmi" float,
"age" float,
"NOUSE" float
) | smoker | SELECT * FROM table_train_267 WHERE smoking = 1 | criteria2sql |
CREATE TABLE Bookings (
Booking_ID INTEGER,
Customer_ID INTEGER,
Workshop_Group_ID VARCHAR(100),
Status_Code CHAR(15),
Store_ID INTEGER,
Order_Date DATETIME,
Planned_Delivery_Date DATETIME,
Actual_Delivery_Date DATETIME,
Other_Order_Details VARCHAR(255)
)
CREATE TABLE Ref_Payment_Me... | Show all the actual delivery dates and bin by year in a line chart, and rank in descending by the x-axis. | SELECT Actual_Delivery_Date, COUNT(Actual_Delivery_Date) FROM Bookings ORDER BY Actual_Delivery_Date DESC | nvbench |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
H... | 患者华鹏运曾经都做过哪些治疗项目 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_NM = '华鹏运' AND t_kc22.MED_INV_ITEM_TYPE = '治疗费' | css |
CREATE TABLE table_19184 (
"Cast" text,
"1951 ( BBC )" text,
"1957 (BBC)" text,
"1968 (BBC)" text,
"1970 (film)" text,
"2000 ( Carlton Television )" text
) | Name the 1968 bbc for 1957 bbc anneke wills | SELECT "1968 (BBC)" FROM table_19184 WHERE "1957 (BBC)" = 'Anneke Wills' | wikisql |
CREATE TABLE table_203_711 (
id number,
"name" text,
"age" number,
"hometown" text,
"occupation" text,
"culinary p.o.v." text,
"eliminated" text
) | who was eliminated first , nikki dinki or viet pham ? | SELECT "name" FROM table_203_711 WHERE "name" IN ('nikki dinki', 'viet pham') ORDER BY "eliminated" LIMIT 1 | squall |
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_offering (
offering_id int,
course_id int,
semes... | In which semester will 183 be offered next ? | SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 183 AND course_offering.semester = semester.semester_id AND semester.semester_id > (SELECT SEMESTERalias1.semester_id FROM semeste... | advising |
CREATE TABLE aircraft (
aid number,
name text,
distance number
)
CREATE TABLE certificate (
eid number,
aid number
)
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
departure_date time,
arrival_date time,
price number,
aid number
)... | What is the average price for flights from LA to Honolulu? | SELECT AVG(price) FROM flight WHERE origin = "Los Angeles" AND destination = "Honolulu" | spider |
CREATE TABLE table_203_273 (
id number,
"name" text,
"japanese" text,
"distance\n(km)" number,
"connections" text,
"location" text
) | which has the most distance , hattori or kibitsu ? | SELECT "name" FROM table_203_273 WHERE "name" IN ('hattori', 'kibitsu') ORDER BY "distance\n(km)" DESC LIMIT 1 | squall |
CREATE TABLE table_74798 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Of matches that had a home team score of 13.13 (91), which one had the largest crowd? | SELECT MAX("Crowd") FROM table_74798 WHERE "Home team score" = '13.13 (91)' | wikisql |
CREATE TABLE table_19744915_17 (
vote_percentage VARCHAR,
couple VARCHAR
) | For couple Todd and Susie, what was the vote percentage? | SELECT vote_percentage FROM table_19744915_17 WHERE couple = "Todd and Susie" | sql_create_context |
CREATE TABLE table_name_33 (
soap_opera VARCHAR,
years VARCHAR
) | What soap opera was on 1960 1965, 1965 1983, 1984 2010? | SELECT soap_opera FROM table_name_33 WHERE years = "1960–1965, 1965–1983, 1984–2010" | sql_create_context |
CREATE TABLE table_28421 (
"No." real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. viewers (million)" text,
"Rank (week)" real,
"Original air date" text,
"Production code" text
) | What is the production code for the episode that had 18.07 million viewers? | SELECT "Production code" FROM table_28421 WHERE "U.S. viewers (million)" = '18.07' | wikisql |
CREATE TABLE Staff (
staff_id INTEGER,
gender VARCHAR(1),
first_name VARCHAR(80),
last_name VARCHAR(80),
email_address VARCHAR(255),
phone_number VARCHAR(80)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_type_code VARCHAR(20),
address_line_1 VARCHAR(80),
address_line_... | A pie chart about the average price of products that have each category code. | SELECT product_category_code, AVG(product_price) FROM Products GROUP BY product_category_code | nvbench |
CREATE TABLE table_name_87 (
laps INTEGER,
grid VARCHAR
) | What is the average laps for Grid 9? | SELECT AVG(laps) FROM table_name_87 WHERE grid = 9 | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.