instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_41 (
date_of_birth__age_ VARCHAR,
caps VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of birth of the player that has 11 caps and plays the prop position?
| SELECT date_of_birth__age_ FROM table_name_41 WHERE caps = 11 AND position = "prop" | 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, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM progra... | advising |
CREATE TABLE qtb (
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_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '85839461' AND qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 9856.88) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '85839461' AND gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMO... | css |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '85713593' AND NOT MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT < 9743.77) | css |
CREATE TABLE table_name_33 (
nfl_team VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which NFL team has a player that came from a college in Washington?
| SELECT nfl_team FROM table_name_33 WHERE college = "washington" | sql_create_context |
CREATE TABLE table_33457 (
"Year" real,
"Drivers" text,
"Wins" real,
"Points" text,
"D.C." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Before 2007, how many wins were there when the point total was 48?
| SELECT SUM("Wins") FROM table_33457 WHERE "Points" = '48' AND "Year" < '2007' | wikisql |
CREATE TABLE table_42846 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" real,
"Finish" real,
"Entrant" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What chassis has patrick racing as an entrant, with a start greater than 6?
| SELECT "Chassis" FROM table_42846 WHERE "Entrant" = 'patrick racing' AND "Start" > '6' | wikisql |
CREATE TABLE table_54758 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the least amount of silver medals a team with less than 0 gold medals has?
| SELECT MIN("Silver") FROM table_54758 WHERE "Gold" < '0' | wikisql |
CREATE TABLE table_68308 (
"Name" text,
"Birth" text,
"Marriage" text,
"Became Consort" text,
"Ceased to be Consort" text,
"Spouse" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the became consort for christian ix spouse
| SELECT "Became Consort" FROM table_68308 WHERE "Spouse" = 'christian ix' | wikisql |
CREATE TABLE table_name_10 (
inf_stem VARCHAR,
subj_pres VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the infinitive stem that has a subjunctive present of ou?
| SELECT inf_stem FROM table_name_10 WHERE subj_pres = "ou" | sql_create_context |
CREATE TABLE table_name_30 (
week INTEGER,
date VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many weeks have a Date of december 4, 1976, and an Attendance larger than 57,366?
| SELECT SUM(week) FROM table_name_30 WHERE date = "december 4, 1976" AND attendance > 57 OFFSET 366 | sql_create_context |
CREATE TABLE table_43629 (
"Position" real,
"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.
-- What is the ... | SELECT COUNT("Played") FROM table_43629 WHERE "Goal Difference" = '11' AND "Goals against" > '44' | wikisql |
CREATE TABLE Part_Faults (
part_fault_id INTEGER,
part_id INTEGER,
fault_short_name VARCHAR(20),
fault_description VARCHAR(255),
other_fault_details VARCHAR(255)
)
CREATE TABLE Fault_Log (
fault_log_entry_id INTEGER,
asset_id INTEGER,
recorded_by_staff_id INTEGER,
fault_log_entry_da... | SELECT asset_make, COUNT(asset_make) FROM Assets GROUP BY asset_make ORDER BY asset_make DESC | nvbench |
CREATE TABLE table_10413597_5 (
setting VARCHAR,
no_in_series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many settings where there for episode 29 of the season?
| SELECT COUNT(setting) FROM table_10413597_5 WHERE no_in_series = 29 | sql_create_context |
CREATE TABLE table_57312 (
"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 is the average crowd size for Brunswick str... | SELECT AVG("Crowd") FROM table_57312 WHERE "Venue" = 'brunswick street oval' | wikisql |
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,... | 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 = 'SAN FRANCISCO' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND f... | atis |
CREATE TABLE table_name_27 (
team VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name of sue bird that involves what team?
| SELECT team FROM table_name_27 WHERE name = "sue bird" | sql_create_context |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mzjzjl... | css |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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(4... | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY AVG(SALARY) | nvbench |
CREATE TABLE table_2259285_1 (
winning_pct__percentage VARCHAR,
goals_for VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the winning % when there were 322 goals?
| SELECT winning_pct__percentage FROM table_2259285_1 WHERE goals_for = 322 | sql_create_context |
CREATE TABLE table_65993 (
"Year" real,
"Formula" text,
"Driver" text,
"Constructor" text,
"Location" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which formula had a driver of John Moore-Brabazon?
| SELECT "Formula" FROM table_65993 WHERE "Driver" = 'john moore-brabazon' | wikisql |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT ZZYSGH, QTJZYSGH FROM mzjzjlb WHERE JZLSH = '18548556313' | css |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.admityear >= "2179" | mimicsql_data |
CREATE TABLE table_61491 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( \u00a3 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country has player Nick Faldo?
| SELECT "Country" FROM table_61491 WHERE "Player" = 'nick faldo' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT COUNT(*) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '83591891' AND mzjzjlb.JZKSRQ BETWEEN '2012-01-29' AND '2020-03-31' AND mzjzjlb.YLJGDM = '6330903' | css |
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
... | SELECT DEPT_CODE, COUNT(*) FROM PROFESSOR WHERE PROF_HIGH_DEGREE = 'Ph.D.' GROUP BY DEPT_CODE | nvbench |
CREATE TABLE table_21407 (
"Year" real,
"Indians admitted" real,
"Pakistanis admitted" real,
"Sri Lankans admitted" real,
"Bangladeshis admitted" real,
"Nepalis admitted" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Indians were admit... | SELECT "Indians admitted" FROM table_21407 WHERE "Year" = '2001' | wikisql |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
char... | SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'magnesium') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65582) AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURR... | mimic_iii |
CREATE TABLE table_name_62 (
high_rebounds VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which High rebounds has a Score of w 81-69?
| SELECT high_rebounds FROM table_name_62 WHERE score = "w 81-69" | sql_create_context |
CREATE TABLE table_29122 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Story by" text,
"Teleplay by" text,
"Original air date" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many viewers w... | SELECT "U.S. viewers (millions)" FROM table_29122 WHERE "Story by" = 'David Simon & Mari Kornhauser' | wikisql |
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 MED_AMOUT FROM t_kc21 WHERE MED_CLINIC_ID = '54836024642' | css |
CREATE TABLE table_name_27 (
result VARCHAR,
opponent VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result of the match with clyde as the opponent in the h venue?
| SELECT result FROM table_name_27 WHERE opponent = "clyde" AND venue = "h" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
... | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '姜浩歌' AND hz_info.YLJGDM = '1560846' AND mzjzjlb.JZKSMC LIKE '%牙病%' | css |
CREATE TABLE table_204_568 (
id number,
"pennant" text,
"name" text,
"hull builder" text,
"ordered" text,
"laid down" text,
"launched" text,
"accepted into service" text,
"commissioned" text,
"est. building cost" text,
"fate" text
)
-- Using valid SQLite, answer the followi... | SELECT COUNT(*) FROM table_204_568 WHERE "est. building cost" < 20 | squall |
CREATE TABLE payment (
staff_id VARCHAR
)
CREATE TABLE staff (
first_name VARCHAR,
last_name VARCHAR,
staff_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which staff handled least number of payments? List the full name and the id.
| SELECT T1.first_name, T1.last_name, T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id = T2.staff_id GROUP BY T1.staff_id ORDER BY COUNT(*) LIMIT 1 | sql_create_context |
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,
... | SELECT jybgb.BGDH FROM hz_info JOIN wdmzjzjlb JOIN jybgb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '00922703' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FRO... | css |
CREATE TABLE table_name_53 (
award_show VARCHAR,
category VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what award show was Bad Girls nominated for Best Loved Drama in 2002?
| SELECT award_show FROM table_name_53 WHERE category = "best loved drama" AND year = 2002 | sql_create_context |
CREATE TABLE table_name_76 (
party VARCHAR,
results VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Party, when Results is 'Re-Elected', and when District is 'Louisiana 5'?
| SELECT party FROM table_name_76 WHERE results = "re-elected" AND district = "louisiana 5" | sql_create_context |
CREATE TABLE table_name_84 (
company VARCHAR,
number VARCHAR,
price VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What company is numbered larger than 5 and priced at $389M?
| SELECT company FROM table_name_84 WHERE number > 5 AND price = "$389m" | sql_create_context |
CREATE TABLE table_40300 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Mean attendance for December 22, 1980?
| SELECT AVG("Attendance") FROM table_40300 WHERE "Date" = 'december 22, 1980' | wikisql |
CREATE TABLE table_2628 (
"District" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date successor seated" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the reason for change for jonathan jennings
| SELECT COUNT("Reason for change") FROM table_2628 WHERE "Successor" = 'Jonathan Jennings' | wikisql |
CREATE TABLE table_25382 (
"No." real,
"Player" text,
"Position" text,
"Height" text,
"Weight" real,
"Class" text,
"Hometown" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are the player's who weighed 170?
| SELECT "Player" FROM table_25382 WHERE "Weight" = '170' | wikisql |
CREATE TABLE loan (
loan_id text,
loan_type text,
cust_id text,
branch_id text,
amount number
)
CREATE TABLE customer (
cust_id text,
cust_name text,
acc_type text,
acc_bal number,
no_of_loans number,
credit_score number,
branch_id number,
state text
)
CREATE TABLE ... | SELECT AVG(credit_score) FROM customer WHERE cust_id IN (SELECT cust_id FROM loan) | spider |
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... | SELECT ACC_Regular_Season, Team_ID FROM basketball_match | nvbench |
CREATE TABLE table_name_28 (
capacity INTEGER,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the capacity of Band rma Banvit?
| SELECT AVG(capacity) FROM table_name_28 WHERE club = "bandırma banvit" | sql_create_context |
CREATE TABLE table_56338 (
"Player" text,
"No.(s)" text,
"Height in Ft." text,
"Position" text,
"School/Club Team/Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the school/club team/country for the player that is 6-5 ft
| SELECT "School/Club Team/Country" FROM table_56338 WHERE "Height in Ft." = '6-5' | wikisql |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
star... | SELECT DISTINCT name, number FROM course WHERE credits = 6 AND department = 'EECS' | advising |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
... | 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 = 28443)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial... | mimic_iii |
CREATE TABLE table_14670060_1 (
languages VARCHAR,
call_sign VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What languages are spoken when call sign XEJAM is used?
| SELECT languages FROM table_14670060_1 WHERE call_sign = "XEJAM" | sql_create_context |
CREATE TABLE table_204_88 (
id number,
"year" number,
"english title" text,
"japanese" text,
"romanization" text,
"type" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many years is the chart for ?
| SELECT MAX("year") - MIN("year") + 1 FROM table_204_88 | squall |
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '8991941' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 23 UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_I... | css |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_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,
... | SELECT t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '严秀逸' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 3743.87) | css |
CREATE TABLE table_10111 (
"Place" real,
"TV network" text,
"% of US households reached" text,
"Number of households viewable" real,
"Type of Television Network" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which TV network is a spanish commercial... | SELECT "TV network" FROM table_10111 WHERE "Type of Television Network" = 'spanish commercial' AND "Number of households viewable" > '53,674,000' AND "Place" > '1' | wikisql |
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... | SELECT COUNT(DISTINCT course_offering.course_id) FROM course, course_offering, offering_instructor AS OFFERING_INSTRUCTOR_0, offering_instructor AS OFFERING_INSTRUCTOR_1, offering_instructor AS OFFERING_INSTRUCTOR_2 WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND OFFERING_INSTRUCTO... | advising |
CREATE TABLE table_60196 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Goa... | SELECT COUNT("Goals Against") FROM table_60196 WHERE "Position" = '4' | wikisql |
CREATE TABLE medicine (
id int,
name text,
Trade_Name text,
FDA_approved text
)
CREATE TABLE enzyme (
id int,
name text,
Location text,
Product text,
Chromosome text,
OMIM int,
Porphyria text
)
CREATE TABLE medicine_enzyme_interaction (
enzyme_id int,
medicine_id in... | SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id ORDER BY id DESC | nvbench |
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDispl... | SELECT RANK() OVER (ORDER BY SUM(Posts.FavoriteCount) DESC) AS "no.", Posts.OwnerUserId AS "user_link", Users.Reputation, SUM(Posts.FavoriteCount) AS "TotalFavorites", COUNT(*) AS "Posts with favorites" FROM Posts JOIN Users ON Users.Id = Posts.OwnerUserId WHERE NOT Posts.OwnerUserId IS NULL AND Posts.FavoriteCount > 0... | sede |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG... | css |
CREATE TABLE field (
fieldid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
C... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Dependent type' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid | scholar |
CREATE TABLE table_name_26 (
nickname VARCHAR,
no_of_premierships VARCHAR,
years_in_competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Nickname that had a No. 0, and Years in Competition of 1982-2003?
| SELECT nickname FROM table_name_26 WHERE no_of_premierships = 0 AND years_in_competition = "1982-2003" | sql_create_context |
CREATE TABLE table_name_42 (
designated_visitors VARCHAR,
designated_home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the visitors when the Atlanta Falcons were the home team?
| SELECT designated_visitors FROM table_name_42 WHERE designated_home = "atlanta falcons" | sql_create_context |
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 * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZ... | css |
CREATE TABLE table_name_36 (
round INTEGER,
overall VARCHAR,
pick__number VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which cornerback round has a pick number lower than 26 and an overall higher than 41?
| SELECT SUM(round) FROM table_name_36 WHERE pick__number < 26 AND position = "cornerback" AND overall > 41 | sql_create_context |
CREATE TABLE table_52465 (
"Player" text,
"Height" text,
"School" text,
"Hometown" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What school is the player who has a hometown of Chicago, IL from?
| SELECT "School" FROM table_52465 WHERE "Hometown" = 'chicago, il' | wikisql |
CREATE TABLE table_name_7 (
venue VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where does Geelong play their home game?
| SELECT venue FROM table_name_7 WHERE home_team = "geelong" | sql_create_context |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE icustays (
row_id number,
subj... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.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, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi... | mimic_iii |
CREATE TABLE player (
Player_ID int,
Sponsor_name text,
Player_name text,
Gender text,
Residence text,
Occupation text,
Votes int,
Rank text
)
CREATE TABLE player_coach (
Player_ID int,
Coach_ID int,
Starting_year int
)
CREATE TABLE coach (
Coach_ID int,
Coach_name ... | SELECT Occupation, COUNT(*) FROM player GROUP BY Occupation ORDER BY Occupation DESC | nvbench |
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 demographic.admission_location, demographic.dischtime FROM demographic WHERE demographic.subject_id = "52118" | mimicsql_data |
CREATE TABLE table_70811 (
"Year" real,
"Points" text,
"Rebounds" text,
"Assists" text,
"Steals" text,
"Blocks" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Assists that has a Blocks of 2 tied (1) with a Year larger than 1995
| SELECT "Assists" FROM table_70811 WHERE "Blocks" = '2 tied (1)' AND "Year" > '1995' | wikisql |
CREATE TABLE table_name_84 (
total_games VARCHAR,
years VARCHAR,
pac_12 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many total games associated with the Pac-12 of california and 117 years?
| SELECT total_games FROM table_name_84 WHERE years = 117 AND pac_12 = "california" | sql_create_context |
CREATE TABLE table_name_65 (
year VARCHAR,
finish VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year had the Finish of 12?
| SELECT year FROM table_name_65 WHERE finish = "12" | sql_create_context |
CREATE TABLE table_name_46 (
decile INTEGER,
roll VARCHAR,
area VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest decile value with a roll greater than 301 in Hauraki?
| SELECT MAX(decile) FROM table_name_46 WHERE roll > 301 AND area = "hauraki" | sql_create_context |
CREATE TABLE table_30346 (
"Character" text,
"Game" text,
"Platform" text,
"Status" text,
"Mystic Arte" text,
"Character Voice" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many platforms have nanaly fletch as the character?
| SELECT COUNT("Platform") FROM table_30346 WHERE "Character" = 'Nanaly Fletch' | wikisql |
CREATE TABLE table_65635 (
"Year" real,
"Game" text,
"Genre" text,
"Platform(s)" text,
"Developer(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the developer of Wii?
| SELECT "Developer(s)" FROM table_65635 WHERE "Platform(s)" = 'wii' | wikisql |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
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,... | SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday, semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND c... | advising |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
Owne... | SELECT CommentCount, COUNT(*) FROM Posts WHERE PostTypeId = 1 AND CreationDate > DATEADD(DAY, -90, CURRENT_TIMESTAMP()) AND AnswerCount = 0 GROUP BY CommentCount | sede |
CREATE TABLE table_203_707 (
id number,
"rank" number,
"npc" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what country won the least amount of gold medals ?
| SELECT "npc" FROM table_203_707 ORDER BY "gold" LIMIT 1 | squall |
CREATE TABLE table_58278 (
"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 is the crowd with a Home team score of 8.17... | SELECT AVG("Crowd") FROM table_58278 WHERE "Home team score" = '8.17 (65)' | wikisql |
CREATE TABLE orders (
order_id VARCHAR,
date_order_placed VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the id of the most recent order?
| SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_262476_1 (
location VARCHAR,
institution VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name where bethany college is
| SELECT location FROM table_262476_1 WHERE institution = "Bethany College" | sql_create_context |
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 mzjzjlb (
HXPLC number,
HZXM ... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND hz_info_mzjzjlb.JZLSH = mzjzjl... | css |
CREATE TABLE table_26998135_2 (
date_of_appointment VARCHAR,
date_of_vacancy VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of appointment when the date of vacancy is 15 march 2011?
| SELECT date_of_appointment FROM table_26998135_2 WHERE date_of_vacancy = "15 March 2011" | sql_create_context |
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,
... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGD... | css |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number... | SELECT (((SELECT CAST(COUNT(*) AS FLOAT) FROM Users WHERE Reputation > 10000) / (SELECT CAST(COUNT(*) AS FLOAT) FROM Users WHERE LastAccessDate > GETUTCDATE() - 30 AND Reputation > 200 AND (UpVotes + DownVotes) > 0)) * 100) AS PercentageOver10k, (((SELECT CAST(COUNT(*) AS FLOAT) FROM Users WHERE Reputation > 20000) / (... | sede |
CREATE TABLE table_name_94 (
rider VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the rider with a 399cc Kawasaki?
| SELECT rider FROM table_name_94 WHERE team = "399cc kawasaki" | sql_create_context |
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 microbiologyevents (
row_id number,
subject_id number,
... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN... | mimic_iii |
CREATE TABLE table_name_23 (
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position did Garion Weller hold in 2012?
| SELECT position FROM table_name_23 WHERE 2012 = "garion weller" | sql_create_context |
CREATE TABLE organization (
continent varchar,
homepage varchar,
name varchar,
oid int
)
CREATE TABLE domain (
did int,
name varchar
)
CREATE TABLE keyword (
keyword varchar,
kid int
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE domain_journal (
did ... | SELECT COUNT(DISTINCT (author.name)) FROM author, organization WHERE organization.name = 'University of Michigan' AND organization.oid = author.oid | academic |
CREATE TABLE table_26986076_5 (
fri_27_aug VARCHAR,
wed_25_aug VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 21' 05.83 107.304mph is Wednesday August 25th what is Friday August 27th?
| SELECT fri_27_aug FROM table_26986076_5 WHERE wed_25_aug = "21' 05.83 107.304mph" | sql_create_context |
CREATE TABLE table_14144 (
"Manufacturer" text,
"Transmission" text,
"Engine Capacity" real,
"Fuel Type" text,
"L/100km Urban (Cold)" real,
"L/100km Extra-Urban" real,
"L/100km Combined" real,
"mpg-UK Urban (Cold)" real,
"mpg-UK Extra-Urban" real,
"mpg-UK Combined" real,
"mpg... | SELECT AVG("L/100km Urban (Cold)") FROM table_14144 WHERE "L/100km Extra-Urban" < '7.2' AND "mpg-UK Combined" < '39.8' AND "L/100km Combined" > '7.9' AND "mpg-US Combined" < '25.1' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Open biopsy of liver" | mimicsql_data |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
... | SELECT mzjzjlb.ZZYSGH, mzjzjlb.QTJZYSGH FROM mzjzjlb WHERE mzjzjlb.JZLSH = '11994027078' | css |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND lab.itemid = "51044" | mimicsql_data |
CREATE TABLE table_train_184 (
"id" int,
"gender" string,
"systolic_blood_pressure_sbp" int,
"heart_disease" bool,
"renal_disease" bool,
"hematocrit_hct" float,
"allergy_to_insulin_lispro" bool,
"diastolic_blood_pressure_dbp" int,
"serum_creatinine" float,
"hypertension" bool,
... | SELECT * FROM table_train_184 WHERE renal_disease = 1 OR ((gender = 'male' AND serum_creatinine > 1.3) OR (gender = 'female' AND serum_creatinine > 1.2)) | criteria2sql |
CREATE TABLE table_47117 (
"Senator" text,
"Party" text,
"District" real,
"Home Town" text,
"Took Office" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of District, when Took Office is greater than 1981, and when Senator is Cyndi Ta... | SELECT SUM("District") FROM table_47117 WHERE "Took Office" > '1981' AND "Senator" = 'cyndi taylor krier' | wikisql |
CREATE TABLE table_65847 (
"Draw" real,
"Artist" text,
"Song" text,
"Points" real,
"Place" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Place with more than 3 draws, for the Song 'dajana', with less than 31 points?
| SELECT MAX("Place") FROM table_65847 WHERE "Draw" > '3' AND "Song" = 'dajana' AND "Points" < '31' | wikisql |
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIG... | SELECT DEPT_CODE, COUNT(*) FROM STUDENT GROUP BY DEPT_CODE ORDER BY DEPT_CODE | nvbench |
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,
... | SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '褚静婉' AND zzmzjzjlb.JZKSRQ BETWEEN '2000-05-09' AND '2010-03-17' UNION SELECT COUNT(*) FROM p... | css |
CREATE TABLE table_name_55 (
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the average 1st prize for tennessee
| SELECT AVG(1 AS st_prize__) AS $__ FROM table_name_55 WHERE location = "tennessee" | 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... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) <= '2100' | eicu |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.