instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_32 (
notes VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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,
... | 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
)
-- Using valid SQLite,... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many episodes were written by Tom Scharpling and Dani... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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... | 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... | 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... | 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was the only driver ... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Pole Pos... | 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... | 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... | SELECT All_Neutral, ACC_Percent FROM basketball_match | nvbench |
CREATE TABLE table_name_14 (
score VARCHAR,
date VARCHAR,
tie_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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,
... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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 ... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team was the home team when Richmond was the... | SELECT "Home team" FROM table_4735 WHERE "Away team" = 'richmond' | wikisql |
CREATE TABLE table_name_59 (
external_weapon VARCHAR,
cart VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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 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,... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '96775087' AND t_kc22.STA_DATE BETWEEN '2001-12-08' AND '2012-06-21' AND t_kc22.SOC_SRT_DIRE_CD = '921496' | css |
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
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the follo... | 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... | 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... | 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 (... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the ra... | 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... | 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 ... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the 92.5 with the press of 282.5?
| SELECT "92.5" FROM table_8024 WHERE "Press" = '282.5' | wikisql |
CREATE TABLE prereq (
course_id text,
prereq_id text
)
CREATE TABLE classroom (
building text,
room_number text,
capacity number
)
CREATE TABLE course (
course_id text,
title text,
dept_name text,
credits number
)
CREATE TABLE department (
dept_name text,
building text,
... | SELECT COUNT(*) FROM classroom WHERE building = 'Lamberton' | spider |
CREATE TABLE table_name_61 (
date VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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,
... | 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... | 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number o... | 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... | 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... | 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)
)... | 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... | 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
)
-- Using valid SQLite, answer the following quest... | 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... | 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 ... | 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,
... | 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 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... | 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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What a... | 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... | 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... | 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... | 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... | 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... | 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... | 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... | SELECT ACC_Road, AVG(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY AVG(School_ID) DESC | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.