context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_32 (
notes VARCHAR,
venue VARCHAR
) | What were the notes in Toronto, Canada? | SELECT notes FROM table_name_32 WHERE venue = "toronto, canada" | sql_create_context |
CREATE TABLE table_name_48 (
date VARCHAR,
result VARCHAR
) | When was the result 0 3? | SELECT date FROM table_name_48 WHERE result = "0–3" | sql_create_context |
CREATE TABLE table_2362 (
"Round" real,
"Choice" real,
"Player" text,
"Position" text,
"Height" text,
"Weight" text,
"College" text
) | What is the height of the cornerback position? | SELECT COUNT("Height") FROM table_2362 WHERE "Position" = 'Cornerback' | wikisql |
CREATE TABLE table_name_54 (
division VARCHAR,
season VARCHAR,
goals VARCHAR
) | What's the total number of all divisions during the 2006/07 season where they scored more than 1 goal? | SELECT COUNT(division) FROM table_name_54 WHERE season = "2006/07" AND goals > 1 | sql_create_context |
CREATE TABLE table_38732 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
) | What is the date of the Sydney, Australia tournament with a hard surface? | SELECT "Date" FROM table_38732 WHERE "Surface" = 'hard' AND "Tournament" = 'sydney, australia' | wikisql |
CREATE TABLE table_256286_18 (
meas_num VARCHAR,
type VARCHAR
) | what is the measure number for the init type? | SELECT meas_num FROM table_256286_18 WHERE type = "Init" | sql_create_context |
CREATE TABLE table_72642 (
"Year" real,
"Championship" text,
"54 holes" text,
"Winning score" text,
"Margin" text,
"Runner-up" text
) | HOW MANY YEARS WAS IT FOR THE SCORE (76-73-79-72=300)? | SELECT COUNT("Year") FROM table_72642 WHERE "Winning score" = '(76-73-79-72=300)' | 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,
... | Tell me the number of patients born before 2056 who had a cerebrospinal fluid lab test done. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2056" AND lab.fluid = "Cerebrospinal Fluid (CSF)" | mimicsql_data |
CREATE TABLE table_203_185 (
id number,
"season" text,
"a\ntechnical" text,
"b\nscientific" text,
"c\nfine arts" text,
"d\nimprovisational" text,
"e\nstructural" text,
"rising stars!\u00ae" text,
"po\nprojectoutreach\u00ae" text,
"university level" text
) | what is the largest year listed ? | SELECT MAX("season") FROM table_203_185 | squall |
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 = '苏清华' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC | css |
CREATE TABLE table_28046 (
"Series no." real,
"No. in season" real,
"Title" text,
"Written by" text,
"Directed by" text,
"Original air date" text
) | How many episodes were written by Tom Scharpling and Daniel Dratch? | SELECT COUNT("No. in season") FROM table_28046 WHERE "Written by" = 'Tom Scharpling and Daniel Dratch' | wikisql |
CREATE TABLE table_name_50 (
format VARCHAR,
label VARCHAR,
region VARCHAR,
date VARCHAR
) | What is the format for the label Mightier than Sword on January 12, 2010 in the United States? | SELECT format FROM table_name_50 WHERE region = "united states" AND date = "january 12, 2010" AND label = "mightier than sword" | sql_create_context |
CREATE TABLE table_62395 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
) | WHo has a Country of united states and a To par of 3? | SELECT "Player" FROM table_62395 WHERE "Country" = 'united states' AND "To par" = '–3' | wikisql |
CREATE TABLE table_name_99 (
laps INTEGER,
driver VARCHAR,
grid VARCHAR
) | what is the laps when the driver is tony rolt and the grid is less than 10? | SELECT SUM(laps) FROM table_name_99 WHERE driver = "tony rolt" AND grid < 10 | sql_create_context |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
g... | To declare a major in OMS , what classes do I need to take ? | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%OMS%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id | advising |
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(25... | How many documents for different document name? Draw a bar chart, could you show in desc by the Y-axis please? | SELECT Document_Name, COUNT(Document_Name) FROM Documents GROUP BY Document_Name ORDER BY COUNT(Document_Name) DESC | nvbench |
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
buil... | Show the number of apartment bookings in each day and group by booking end date with a line chart. | SELECT booking_end_date, COUNT(booking_end_date) FROM Apartment_Bookings GROUP BY booking_end_date | nvbench |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_lo... | what are the SUNDAY flights from OAKLAND to WASHINGTON | 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, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND days.day_name = 'SUNDAY' AND flight.flight_days = days.days_code AN... | atis |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(2... | For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the average of salary bin hire_date by weekday, and list by the y-axis in asc please. | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(SALARY) | nvbench |
CREATE TABLE table_204_584 (
id number,
"pos" text,
"no" number,
"driver" text,
"constructor" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
) | who was the only driver that had an accident ? | SELECT "driver" FROM table_204_584 WHERE "time/retired" = 'accident' | squall |
CREATE TABLE table_56345 (
"Grand Prix" text,
"Date" text,
"Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Constructor" text,
"Report" text
) | What is the Pole Position of the Portuguese Grand Prix? | SELECT "Pole Position" FROM table_56345 WHERE "Grand Prix" = 'portuguese grand prix' | wikisql |
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 prescriptions... | how many patients whose religion is jehovah's witness and lab test fluid is urine? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "JEHOVAH'S WITNESS" AND lab.fluid = "Urine" | mimicsql_data |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Return a bar chart about the distribution of All_Neutral and ACC_Percent . | SELECT All_Neutral, ACC_Percent FROM basketball_match | nvbench |
CREATE TABLE table_name_14 (
score VARCHAR,
date VARCHAR,
tie_no VARCHAR
) | Which Score has a Date of 28 february 1953, and a Tie no of 3? | SELECT score FROM table_name_14 WHERE date = "28 february 1953" AND tie_no = "3" | sql_create_context |
CREATE TABLE table_28365816_2 (
tournament_venue__city_ VARCHAR,
regular_season_winner VARCHAR
) | When Yale is listed as the regular season winner, what tournament venue is given? | SELECT tournament_venue__city_ FROM table_28365816_2 WHERE regular_season_winner = "Yale" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeri... | is there any record of the microbiology test in their current hospital encounter for patient 031-3355? | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355' AND patient.hospitaldischargetime IS NULL)) | eicu |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
... | how many patients were staying in csru careunits a year before? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'csru' AND DATETIME(transfers.intime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year')) | mimic_iii |
CREATE TABLE table_62925 (
"Rank" real,
"Time" text,
"Athlete" text,
"Date" text,
"Place" text
) | What place has manfred kokot as the athlete? | SELECT "Place" FROM table_62925 WHERE "Athlete" = 'manfred kokot' | wikisql |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE com... | Which professors do n't utilize labs in their courses ? | SELECT DISTINCT instructor.name FROM instructor, course, course_offering, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course_offering.offering_id = offering_instructor.offering_id AND instructor.instructor_id = offering_instructor.instructor_id AND NOT instr... | advising |
CREATE TABLE table_41146 (
"Date" text,
"Rocket" text,
"Type" text,
"Launch site" text,
"Satellite" text
) | What is the launch site of the delta iv rocket with an unknown date and a gps iif-10 satellite? | SELECT "Launch site" FROM table_41146 WHERE "Date" = 'unknown' AND "Rocket" = 'delta iv' AND "Satellite" = 'gps iif-10' | wikisql |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count ... | Questions per day on Stack Exchange since 2015-07-31. | SELECT DATEADD(d, 0, DATEDIFF(d, 0, CreationDate)), COUNT(*) FROM Posts AS p INNER JOIN Users AS u ON u.Id = p.OwnerUserId WHERE p.PostTypeId = 1 AND DATEADD(d, 0, DATEDIFF(d, 0, CreationDate)) > '2015-07-31 00:00:00' GROUP BY DATEADD(d, 0, DATEDIFF(d, 0, CreationDate)) ORDER BY DATEADD(d, 0, DATEDIFF(d, 0, CreationDat... | sede |
CREATE TABLE table_47533 (
"Frequency" text,
"Call sign" text,
"Location" text,
"Name / Format" text,
"Owner" text
) | Which Call sign has a Frequency of 102.5 fm? | SELECT "Call sign" FROM table_47533 WHERE "Frequency" = '102.5 fm' | 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 microlab (
microl... | what is the medication that patient 004-64091 was prescribed with within 2 days after receiving the palliative care consultation this month? | SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-64091') AND treatment.treatme... | eicu |
CREATE TABLE table_4735 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What team was the home team when Richmond was the away team? | SELECT "Home team" FROM table_4735 WHERE "Away team" = 'richmond' | wikisql |
CREATE TABLE table_name_59 (
external_weapon VARCHAR,
cart VARCHAR
) | What is the external weapon with a ramhead cart? | SELECT external_weapon FROM table_name_59 WHERE cart = "ramhead cart" | sql_create_context |
CREATE TABLE table_name_79 (
year INTEGER,
result VARCHAR,
group VARCHAR,
award VARCHAR
) | What is the average Year that has the Group, Logie Award, the Award, Most Outstanding Actor, and the Result, nominated? | SELECT AVG(year) FROM table_name_79 WHERE group = "logie award" AND award = "most outstanding actor" AND result = "nominated" | sql_create_context |
CREATE TABLE table_name_68 (
Id VARCHAR
) | What 2011 has 4r as the 2008? | SELECT 2011 FROM table_name_68 WHERE 2008 = "4r" | sql_create_context |
CREATE TABLE table_709 (
"District" text,
"Incumbent" text,
"Party" text,
"Elected" real,
"Status" text,
"Opponent" text
) | How many parties is Tom Foley a member of? | SELECT COUNT("Party") FROM table_709 WHERE "Incumbent" = 'Tom Foley' | wikisql |
CREATE TABLE table_name_42 (
event VARCHAR,
time VARCHAR
) | What event had a time of 6:37.73? | SELECT event FROM table_name_42 WHERE time = "6:37.73" | sql_create_context |
CREATE TABLE table_79021 (
"Position" real,
"Club" text,
"Played" real,
"Points" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
) | What is the number of wins when the goals against is larger than 41, points is 29, and draws are larger than 5? | SELECT COUNT("Wins") FROM table_79021 WHERE "Goals against" > '41' AND "Points" = '29' AND "Draws" > '5' | wikisql |
CREATE TABLE table_15621965_2 (
player VARCHAR,
position VARCHAR
) | Who plays the position of forward-center? | SELECT player FROM table_15621965_2 WHERE position = "Forward-Center" | sql_create_context |
CREATE TABLE table_name_41 (
player VARCHAR,
total VARCHAR,
to_par VARCHAR
) | WHAT IS THE PLAYER WITH TOTAL LESS THAN 151, TO PAR OF 8? | SELECT player FROM table_name_41 WHERE total < 151 AND to_par = 8 | 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 treatment (
treat... | how did patient 017-20711 get admitted to the hospital since 2105 first? | SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '017-20711' AND STRFTIME('%y', patient.hospitaladmittime) >= '2105' ORDER BY patient.hospitaladmittime LIMIT 1 | eicu |
CREATE TABLE table_17311797_10 (
high_points VARCHAR,
game VARCHAR
) | Which player had the highest points in game 79? | SELECT high_points FROM table_17311797_10 WHERE game = 79 | sql_create_context |
CREATE TABLE table_train_175 (
"id" int,
"lipid_lowering_therapy" bool,
"hemoglobin_a1c_hba1c" float,
"diabetic" string,
"fasting_serum_triglycerides" int,
"gilbert_syndrome" bool,
"age" float,
"alanine_aminotransferase" bool,
"NOUSE" float
) | hba1c > 6 % | SELECT * FROM table_train_175 WHERE hemoglobin_a1c_hba1c > 6 | criteria2sql |
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 prescription... | Find the time of admission and date of death for the patient with patient id 94762. | SELECT demographic.dod, demographic.admittime FROM demographic WHERE demographic.subject_id = "94762" | mimicsql_data |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname var... | What class fulfills the MDE requirement with the least effort ? | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou... | advising |
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 (... | provide the number of patients whose gender is m and drug code is bag? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.formulary_drug_cd = "BAG" | mimicsql_data |
CREATE TABLE table_29033869_3 (
score__collingwoods_score_is_in_bold_ VARCHAR,
date VARCHAR
) | What was the score on saturday, 26 june 7:10pm? | SELECT score__collingwoods_score_is_in_bold_ FROM table_29033869_3 WHERE date = "Saturday, 26 June 7:10pm" | sql_create_context |
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 Department (
DNO INTEGER,
Division VARCHAR(2),
DName VARCHAR(25),
Room VARCHAR(5),
Building VA... | Visualize a scatter chart about the correlation between CID and Credits . | SELECT CID, Credits FROM Course ORDER BY Credits | nvbench |
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... | 在2008年3月25日到2010年1月16日内列出患者14901191在医院1058628中被开出的所有药品编码和名称都是什么? | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '14901191' AND t_kc21.MED_SER_ORG_NO = '1058628' AND t_kc21.IN_HOSP_DATE BETWEEN '2008-03-25' AND '2010-01-16') | css |
CREATE TABLE table_name_91 (
tyre VARCHAR,
driver VARCHAR
) | What tyre had Sergio Mantovani as a driver? | SELECT tyre FROM table_name_91 WHERE driver = "sergio mantovani" | 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 cost (
costid num... | what is the minimum value of the sao2 of patient 030-52327 since 688 days ago? | SELECT MIN(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-52327')) AND NOT vitalperiodic.sao2 IS NULL AND DATET... | eicu |
CREATE TABLE table_45993 (
"Player" text,
"Nationality" text,
"Jersey Number(s)" real,
"Position" text,
"Years" text,
"From" text
) | What years was the jersey number(s) smaller than 3? | SELECT "Years" FROM table_45993 WHERE "Jersey Number(s)" < '3' | wikisql |
CREATE TABLE table_16711 (
"Rnd" real,
"Race" text,
"Date" text,
"Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text,
"Constructor" text,
"Report" text
) | what's the race winner with location being jacarepagu | SELECT "Race Winner" FROM table_16711 WHERE "Location" = 'Jacarepaguá' | 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 type and drug name of drug code pant40? | SELECT prescriptions.drug_type, prescriptions.drug FROM prescriptions WHERE prescriptions.formulary_drug_cd = "PANT40" | mimicsql_data |
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 ... | what is the number of patients whose drug route is oral? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "ORAL" | mimicsql_data |
CREATE TABLE table_name_92 (
date VARCHAR,
record VARCHAR
) | Which Date has a Record of 11 10 2? | SELECT date FROM table_name_92 WHERE record = "11–10–2" | sql_create_context |
CREATE TABLE table_6558 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text
) | Which District has a First elected of 1856, and an Incumbent of william kellogg? | SELECT "District" FROM table_6558 WHERE "First elected" = '1856' AND "Incumbent" = 'william kellogg' | wikisql |
CREATE TABLE gyb (
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... | 药品068607-l这个药是病患吕宏旷分别在哪些医院开出的? | SELECT qtb.MED_SER_ORG_NO FROM qtb WHERE qtb.PERSON_NM = '吕宏旷' AND qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.SOC_SRT_DIRE_CD = '068607-l') UNION SELECT gyb.MED_SER_ORG_NO FROM gyb WHERE gyb.PERSON_NM = '吕宏旷' AND gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.... | css |
CREATE TABLE table_8024 (
"World Record" text,
"Press" text,
"92.5" text,
"Hans W\u00f6lpert" text,
"Mannheim ( GER )" text
) | Who is the 92.5 with the press of 282.5? | SELECT "92.5" FROM table_8024 WHERE "Press" = '282.5' | wikisql |
CREATE TABLE table_name_61 (
date VARCHAR,
game VARCHAR
) | What is the date of game 9? | SELECT date FROM table_name_61 WHERE game = 9 | sql_create_context |
CREATE TABLE artist (
artist_name varchar2(50),
country varchar2(20),
gender varchar2(20),
preferred_genre varchar2(50)
)
CREATE TABLE song (
song_name varchar2(50),
artist_name varchar2(50),
country varchar2(20),
f_id number(10),
genre_is varchar2(20),
rating number(10),
la... | Show me a bar chart for what is the average song rating for each language?, list by the names from low to high please. | SELECT languages, AVG(rating) FROM song GROUP BY languages ORDER BY languages | nvbench |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDe... | By City in Reputation Range. | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Location, Age, LastAccessDate, Reputation FROM Users WHERE LOWER(Location) LIKE LOWER('%##Country##%') AND Reputation > '##reputation:int##' ORDER BY Reputation DESC | sede |
CREATE TABLE table_name_94 (
others_number VARCHAR,
county VARCHAR,
bush_number VARCHAR
) | What is the total number of the value Others#, when the county is Langlade, and when the value Bush# is greater than 6,235? | SELECT COUNT(others_number) FROM table_name_94 WHERE county = "langlade" AND bush_number > 6 OFFSET 235 | 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
)
... | give me the number of patients whose year of birth is less than 2182? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dob_year < "2182" | mimicsql_data |
CREATE TABLE table_27615896_18 (
points INTEGER,
new_points VARCHAR
) | How many points were won where new points was 1680? | SELECT MIN(points) AS won FROM table_27615896_18 WHERE new_points = 1680 | sql_create_context |
CREATE TABLE table_204_243 (
id number,
"year" number,
"album" text,
"song" text,
"duration" text,
"artist" text
) | how many collaborations did key release during 2010 ? | SELECT COUNT(*) FROM table_204_243 WHERE "year" = 2010 | squall |
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, give me the comparison about code over the name , and group by attribute name by a bar chart. | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name | nvbench |
CREATE TABLE table_24018430_3 (
us_viewers__millions_ VARCHAR,
no_in_season VARCHAR
) | what number is us viewers in season 12? | SELECT us_viewers__millions_ FROM table_24018430_3 WHERE no_in_season = 12 | sql_create_context |
CREATE TABLE dorm (
dormid number,
dorm_name text,
student_capacity number,
gender text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE has_amenity (
dormid number,
... | What are the names of the dorm that does not have a TV Lounge? | SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' | spider |
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... | count the number of patients whose diagnoses long title is tietze's disease and drug type is base? | 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 = "Tietze's disease" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JO... | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of hire_date and the sum of department_id bin hire_date by time, and I want to sort Y in asc order please. | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(DEPARTMENT_ID) | nvbench |
CREATE TABLE table_4609 (
"Team" text,
"Chassis" text,
"Engine" text,
"Tires" text,
"Drivers" text
) | What chassis does Gary Bettenhausen use? | SELECT "Chassis" FROM table_4609 WHERE "Drivers" = 'gary bettenhausen' | wikisql |
CREATE TABLE enzyme (
id int,
name text,
Location text,
Product text,
Chromosome text,
OMIM int,
Porphyria text
)
CREATE TABLE medicine_enzyme_interaction (
enzyme_id int,
medicine_id int,
interaction_type text
)
CREATE TABLE medicine (
id int,
name text,
Trade_Name... | Show me a bar chart for what is the id and trade name of the medicines can interact with at least 3 enzymes? | SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id | nvbench |
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 text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | what is the number of patients whose primary disease is coronary artery disease\coronary artery bypass graft; myomectomy/sda? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT; MYOMECTOMY/SDA" | mimicsql_data |
CREATE TABLE table_name_86 (
attendance INTEGER,
date VARCHAR
) | What was the Attendance on September 26, 1971? | SELECT AVG(attendance) FROM table_name_86 WHERE date = "september 26, 1971" | sql_create_context |
CREATE TABLE table_19322 (
"Rank" real,
"Name" text,
"Nationality" text,
"1st (m)" text,
"2nd (m)" text,
"Points" text,
"Overall NT points" text,
"Overall WC points (Rank)" text
) | Name the number of nationality is tom hilde | SELECT COUNT("Nationality") FROM table_19322 WHERE "Name" = 'Tom Hilde' | wikisql |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TAB... | Percentage of questions with accepted answer depending on the weekday when the question was posted. | WITH tmp AS (SELECT Id, AcceptedAnswerId AS Acc, Period = TIME_TO_STR(CreationDate, '%W') FROM Posts WHERE PostTypeId = 1) SELECT Period, ROUND((COUNT(Acc)) * 100.0 / (COUNT(*)), 2) AS percentage FROM tmp GROUP BY Period ORDER BY Period | sede |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | A scatter chart shows the correlation between Team_ID and All_Games_Percent , and group by attribute ACC_Regular_Season. | SELECT Team_ID, All_Games_Percent FROM basketball_match GROUP BY ACC_Regular_Season | nvbench |
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE course (
course_id varchar(8),
title varchar(50),
dept_name varchar(20),
credits numeric(2,0)
)... | Find the names and average salaries of all departments whose average salary is greater than 42000. | SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name | nvbench |
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 wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND 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 AND jyb... | css |
CREATE TABLE table_204_44 (
id number,
"face value" number,
"\u20ac0.01" number,
"\u20ac0.02" number,
"\u20ac0.05" number,
"\u20ac0.10" number,
"\u20ac0.20" number,
"\u20ac0.50" number,
"\u20ac1.00" number,
"\u20ac2.00" number
) | what is the total number from column 1 for all face values ? | SELECT SUM("\u20ac0.01") FROM table_204_44 | squall |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE flight_stop (
flight_id in... | in DALLAS FORT WORTH i would like information on ground transportation | SELECT DISTINCT ground_service.transport_type FROM city AS CITY_0, city AS CITY_1, ground_service WHERE (ground_service.city_code = CITY_0.city_code AND CITY_0.city_name = 'DALLAS') OR (ground_service.city_code = CITY_1.city_code AND CITY_1.city_name = 'FORT WORTH') | atis |
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 ... | give me the number of patients whose primary disease is transient ischemic attack and lab test fluid is blood? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "TRANSIENT ISCHEMIC ATTACK" AND lab.fluid = "Blood" | mimicsql_data |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
... | Questions with one tag on [pets.se]. Find all the questions on [pets.se] that have exactly one tag, with the premise that they need more to classify (at least) pet type and the problem. | WITH singletons AS (SELECT PostId FROM PostTags GROUP BY PostId HAVING COUNT(PostTags.TagId) = 1) SELECT Id, Id AS "post_link", Tags FROM Posts INNER JOIN singletons ON singletons.PostId = Posts.Id WHERE Posts.PostTypeId = 1 AND Posts.ClosedDate IS NULL ORDER BY Posts.Id | sede |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | calculate the probability of survival for three year among the patients diagnosed with increased intracranial pressure - from hydrocephalus. | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 3 * 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_64010 (
"Serial No." real,
"District" text,
"Headquartered City" text,
"City Population (2009)" real,
"City Area(km 2 )" real
) | What is the sum of the serial numbers for narowal city? | SELECT SUM("Serial No.") FROM table_64010 WHERE "Headquartered City" = 'narowal city' | wikisql |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL v... | For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and department_id , and order by the y-axis from high to low. | SELECT JOB_ID, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY DEPARTMENT_ID DESC | nvbench |
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... | 门诊诊断的患者患有急性支气管炎的籍贯代码是多少、籍贯名称叫啥和相应人数有多少? | SELECT person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) FROM person_info JOIN hz_info JOIN txmzjzjlb 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 WHERE txmzjzjlb.JZZDSM = '急性支气管炎' GROUP BY person_info.JGDM UNION SELECT ... | css |
CREATE TABLE table_29889 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What are the high rebounds in the 45 game? | SELECT "High rebounds" FROM table_29889 WHERE "Game" = '45' | wikisql |
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... | 既往患者81282369的疾病有什么? | SELECT gwyjzb.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '81282369' UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '81282369' | css |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE diagnoses_icd (
row_id numbe... | what are the three most commonly ordered procedures for patients who have previously been diagnosed with mitral valve disorder, which occurred within the same month last year? | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... | mimic_iii |
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... | 编号为50917298的团伙成员,他最常开药品排序都是什么? | 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_ID = '50917298' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC | css |
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... | 编号为04835754334的门诊就诊的那些患者的卡号以及卡类型是啥 | SELECT zzmzjzjlb.KH, zzmzjzjlb.KLX FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '04835754334' UNION SELECT fzzmzjzjlb.KH, fzzmzjzjlb.KLX FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '04835754334' | css |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | 从2010年9月11日直到19年6月8日医疗机构1793987的入院诊断疾病结果与出院诊断疾病结果有多少次不一样? | SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '1793987' AND IN_HOSP_DATE BETWEEN '2010-09-11' AND '2019-06-08' AND IN_DIAG_DIS_CD <> OUT_DIAG_DIS_CD | css |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varc... | For those employees who was hired before 2002-06-21, find hire_date and the sum of manager_id bin hire_date by time, and visualize them by a bar chart, display in ascending by the Y-axis please. | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(MANAGER_ID) | nvbench |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Bar chart x axis acc road y axis the average of school id, and rank in desc by the Y please. | SELECT ACC_Road, AVG(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY AVG(School_ID) DESC | nvbench |
CREATE TABLE table_51108 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time" text,
"Grid" real
) | Name the Time which has Laps of 19, and a Grid larger than 19, and a Manufacturer of ktm, and a Rider of randy krummenacher? | SELECT "Time" FROM table_51108 WHERE "Laps" = '19' AND "Grid" > '19' AND "Manufacturer" = 'ktm' AND "Rider" = 'randy krummenacher' | wikisql |
CREATE TABLE table_name_54 (
lithium VARCHAR,
rubidium VARCHAR
) | what is the type of lithium when rubidium is nabr (1.9)? | SELECT lithium FROM table_name_54 WHERE rubidium = "nabr (1.9)" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.