instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_48 (
best_jump VARCHAR,
jump_1 VARCHAR,
jump_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has an x under Jump 1, a Jump 2 of 7.28, and what is this person's Best Jump?
| SELECT best_jump FROM table_name_48 WHERE jump_1 = "x" AND jump_2 = "7.28" | sql_create_context |
CREATE TABLE table_name_28 (
score VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE SCORE FOR 2010 fifa world cup qualification?
| SELECT score FROM table_name_28 WHERE competition = "2010 fifa world cup qualification" | sql_create_context |
CREATE TABLE table_73477 (
"Player" text,
"Games Played" real,
"Minutes" real,
"Field Goals" real,
"Three Pointers" real,
"Free Throws" real,
"Rebounds" real,
"Assists" real,
"Blocks" real,
"Steals" real,
"Points" real
)
-- Using valid SQLite, answer the following questions... | SELECT "Minutes" FROM table_73477 WHERE "Player" = 'Jordan Coleman' | wikisql |
CREATE TABLE table_19123 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
)
-- Using valid SQLite, answer the follo... | SELECT COUNT("Won") FROM table_19123 WHERE "Points for" = '490' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
i... | SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-21388')) AND lab.labname = 'total bilirubin' AND DATETIME(lab.labresulttime) <= DAT... | eicu |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
sy... | SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '012-18025' | eicu |
CREATE TABLE table_name_14 (
round VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Score of 33-22 had what round?
| SELECT round FROM table_name_14 WHERE score = "33-22" | 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 * 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.BGDH = jyjgzbb.BGDH WHERE hz_i... | css |
CREATE TABLE table_204_251 (
id number,
"community" text,
"area" text,
"location" text,
"population" number,
"date established" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the number of communities established after 1900 ?
| SELECT COUNT("community") FROM table_204_251 WHERE "date established" > 1900 | squall |
CREATE TABLE table_name_31 (
performer_1 VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Date of 8 july 1994 involves which performer 1?
| SELECT performer_1 FROM table_name_31 WHERE date = "8 july 1994" | sql_create_context |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
... | 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, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_i... | mimic_iii |
CREATE TABLE table_name_94 (
rank VARCHAR,
places VARCHAR,
sp VARCHAR,
fs VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank when 233 shows for places and SP+FS smaller than 27?
| SELECT COUNT(rank) FROM table_name_94 WHERE places = "233" AND sp + fs < 27 | sql_create_context |
CREATE TABLE table_22585 (
"Period" text,
"Internet Explorer" text,
"Firefox" text,
"Chrome" text,
"Safari" text,
"Opera" text,
"Other Mozilla" text,
"Mobile" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If Safari is 3.76%, what is the... | SELECT "Other Mozilla" FROM table_22585 WHERE "Safari" = '3.76%' | wikisql |
CREATE TABLE table_1784 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many results are there when the game was at the Atlanta-Fult... | SELECT COUNT("Result") FROM table_1784 WHERE "Game site" = 'Atlanta-Fulton County Stadium' | wikisql |
CREATE TABLE table_41910 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Attendance, when Opponent is Pittsburgh Steelers?
| SELECT "Attendance" FROM table_41910 WHERE "Opponent" = 'pittsburgh steelers' | wikisql |
CREATE TABLE table_45617 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result during the week # of top 8?
| SELECT "Result" FROM table_45617 WHERE "Week #" = 'top 8' | wikisql |
CREATE TABLE table_28272 (
"Sr. No." real,
"Name of Road" text,
"Passes Through - District(s" text,
"Length (in km)" text,
"MDR No." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What district does the road with a MDR number of 47 pass through?
| SELECT "Passes Through - District(s" FROM table_28272 WHERE "MDR No." = '47' | wikisql |
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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_... | SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID | nvbench |
CREATE TABLE table_name_22 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the 2006 with 2008 of 1r and 2004 of 1r
| SELECT 2006 FROM table_name_22 WHERE 2008 = "1r" AND 2004 = "1r" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND procedures.short_title = "Non-invasive mech vent" | mimicsql_data |
CREATE TABLE table_name_93 (
lane INTEGER,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the lane with a time of 1:00.66?
| SELECT AVG(lane) FROM table_name_93 WHERE time = "1:00.66" | sql_create_context |
CREATE TABLE table_name_22 (
drawn INTEGER,
played VARCHAR,
points VARCHAR,
lost VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the average drawn when the points is more than 15, lost is 1 and played is less than 14?
| SELECT AVG(drawn) FROM table_name_22 WHERE points > 15 AND lost = 1 AND played < 14 | sql_create_context |
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 jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE mzjzjlb.JZZDBM = 'E91.673' AND jyjgzbb.JCZBMC = '苯妥因' | css |
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 COUNT(*) FROM (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '3898598' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-03-05' AND '2019-03-26' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) < 3087.01 UNION SELECT fgwyjzb.... | css |
CREATE TABLE table_name_31 (
game VARCHAR,
november VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games have November 7 as the date, and points greater than 17?
| SELECT COUNT(game) FROM table_name_31 WHERE november = 7 AND points > 17 | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT ACC_Regular_Season, ACC_Percent FROM basketball_match ORDER BY ACC_Regular_Season DESC | nvbench |
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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Transient neonatal thrombocytopenia" | mimicsql_data |
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
... | SELECT state, enr FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' ORDER BY enr DESC | nvbench |
CREATE TABLE table_61365 (
"Club" text,
"First season in top division" text,
"Number of seasons in top division" real,
"First season of current spell in top division" text,
"Number of seasons in Liga MX" real,
"Top division titles" real
)
-- Using valid SQLite, answer the following questions f... | SELECT SUM("Top division titles") FROM table_61365 WHERE "Number of seasons in Liga MX" > '42' AND "Club" = 'guadalajara' | wikisql |
CREATE TABLE table_name_74 (
city VARCHAR,
jul VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the city with july of 88 f / 31.1 c
| SELECT city FROM table_name_74 WHERE jul = "88 °f / 31.1 °c" | sql_create_context |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND procedures.icd9_code = "3892" | mimicsql_data |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE area.area LIKE '%compu... | advising |
CREATE TABLE table_50957 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which country had a score of 69-67=136?
| SELECT "Country" FROM table_50957 WHERE "Score" = '69-67=136' | wikisql |
CREATE TABLE table_2417330_4 (
date_successor_seated VARCHAR,
successor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date successor seated for successor being vacant
| SELECT date_successor_seated FROM table_2417330_4 WHERE successor = "Vacant" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TAB... | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY medication.drugname) AS t1 WHERE t1.c1 <= 4 | eicu |
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 qtb.IN_DIAG_DIS_CD, qtb.IN_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '62391480' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 7064.81) UNION SELECT gyb.IN_DIAG_DIS_CD, gyb.IN_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '62391480' AND gyb.MED_CLINIC_ID IN (SELECT t_kc2... | css |
CREATE TABLE useracct (
u_id number,
name text
)
CREATE TABLE item (
i_id number,
title text
)
CREATE TABLE trust (
source_u_id number,
target_u_id number,
trust number
)
CREATE TABLE review (
a_id number,
u_id number,
i_id number,
rating number,
rank number
)
-- Usi... | SELECT T1.title, T1.i_id FROM item AS T1 JOIN review AS T2 ON T1.i_id = T2.i_id GROUP BY T2.i_id ORDER BY AVG(T2.rank) DESC LIMIT 1 | spider |
CREATE TABLE table_train_102 (
"id" int,
"autoimmune_disease" bool,
"stroke" bool,
"renal_disease" bool,
"hepatic_disease" bool,
"liver_disease" bool,
"serum_creatinine" float,
"seizure_disorder" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the ta... | SELECT * FROM table_train_102 WHERE autoimmune_disease = 1 | criteria2sql |
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 patients (
row_id number,
subj... | SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 59941 AND STRFTIME('%y', admissions.admittime) >= '2100' | mimic_iii |
CREATE TABLE Plays_Games (
StuID INTEGER,
GameID INTEGER,
Hours_Played INTEGER
)
CREATE TABLE Video_Games (
GameID INTEGER,
GName VARCHAR(40),
GType VARCHAR(40)
)
CREATE TABLE SportsInfo (
StuID INTEGER,
SportName VARCHAR(32),
HoursPerWeek INTEGER,
GamesPlayed INTEGER,
OnSc... | SELECT LName, COUNT(LName) FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID = T2.StuID WHERE T1.OnScholarship = 'Y' GROUP BY LName ORDER BY COUNT(LName) | nvbench |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate tim... | SELECT c.Id AS "comment_link", c.Score, c.CreationDate FROM Comments AS c INNER JOIN Posts AS q ON q.Id = c.PostId WHERE q.PostTypeId = 1 AND q.ViewCount > 100 AND c.Text LIKE '% %' AND LENGTH(c.Text) >= 150 ORDER BY c.Score DESC, q.ViewCount DESC | sede |
CREATE TABLE broadcast (
time_of_day VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many programs are broadcast in each time section of the day?
| SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day | sql_create_context |
CREATE TABLE table_26214389_3 (
total_non_qatar VARCHAR,
grand_total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the grand total is 5814, what is the total non qatar?
| SELECT total_non_qatar FROM table_26214389_3 WHERE grand_total = 5814 | sql_create_context |
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_kc24 WHERE PERSON_ID = '09225919' AND CLINIC_SLT_DATE BETWEEN '2010-09-16' AND '2021-09-26' AND MED_AMOUT <= 10 | css |
CREATE TABLE table_4923 (
"Round" real,
"Overall" real,
"Player" text,
"Position" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What school did the linebacker who was drafted after round 8 come from?
| SELECT "School/Club Team" FROM table_4923 WHERE "Round" > '8' AND "Position" = 'linebacker' | wikisql |
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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dob_year < "2146" | mimicsql_data |
CREATE TABLE table_name_97 (
season VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In what season is Victoria the Opponent?
| SELECT season FROM table_name_97 WHERE opponent = "victoria" | sql_create_context |
CREATE TABLE table_171361_1 (
official_name VARCHAR,
area_km_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the community with an area of 30.75 sq. km.?
| SELECT official_name FROM table_171361_1 WHERE area_km_2 = "30.75" | sql_create_context |
CREATE TABLE table_2150776_1 (
team VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the team for ricky rudd
| SELECT team FROM table_2150776_1 WHERE driver = "Ricky Rudd" | sql_create_context |
CREATE TABLE table_36566 (
"Position" real,
"Team" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Scored" real,
"Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Wins that ha... | SELECT MIN("Wins") FROM table_36566 WHERE "Team" = 'olimpia' AND "Draws" < '4' | wikisql |
CREATE TABLE table_31123 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the original air date for th... | SELECT "Original air date" FROM table_31123 WHERE "Season #" = '2' | wikisql |
CREATE TABLE table_name_44 (
college_junior_club_team__league_ VARCHAR,
nationality VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What league is from the United States and a round smaller than 12.
| SELECT college_junior_club_team__league_ FROM table_name_44 WHERE nationality = "united states" AND round < 12 | sql_create_context |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT mzjzjlb.JZZTDM, mzjzjlb.JZZTMC FROM mzjzjlb WHERE mzjzjlb.JZLSH = '36916045402' | css |
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 COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '马兴生' AND t_kc22.STA_DATE BETWEEN '2004-04-23' AND '2010-10-25' AND t_kc22.SELF_PAY_AMO > 2352.85 | css |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jybgb.SHSJ FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb ON 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 mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH ... | css |
CREATE TABLE table_name_54 (
a_score INTEGER,
t_score VARCHAR,
e_score VARCHAR,
nation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the quantity of the A Score when the E Score was larger than 9.566 in the Greece and the T score was more t... | SELECT SUM(a_score) FROM table_name_54 WHERE e_score > 9.566 AND nation = "greece" AND t_score > 4 | sql_create_context |
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 qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '潘弘义' AND qtb.MED_SER_ORG_NO = '9379599' AND qtb.OUT_DIAG_DIS_NM LIKE '%心脏病%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '潘弘义' AND gyb.MED_SER_ORG_NO = '9379599' AND gyb.OUT_DIAG_DIS_NM LIKE '%心脏病%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE ... | css |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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 te... | SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zy... | css |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "17" AND diagnoses.long_title = "Polyneuropathy in diabetes" | mimicsql_data |
CREATE TABLE table_name_67 (
laid_down VARCHAR,
completed VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the laid down for completed of 22 october 1934
| SELECT laid_down FROM table_name_67 WHERE completed = "22 october 1934" | sql_create_context |
CREATE TABLE table_202_127 (
id number,
"#" number,
"title" text,
"directed by" text,
"written by" text,
"original air date" text,
"production\ncode" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which director has the most titles accredite... | SELECT "directed by" FROM table_202_127 GROUP BY "directed by" ORDER BY COUNT("title") DESC LIMIT 1 | squall |
CREATE TABLE table_1104312_5 (
original_name VARCHAR,
population_at_2010_census VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the original names of the districts where the population in the 2010 census was 210450?
| SELECT original_name FROM table_1104312_5 WHERE population_at_2010_census = 210450 | sql_create_context |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course (
c... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co... | advising |
CREATE TABLE table_name_45 (
year VARCHAR,
regular_season_champion_s_ VARCHAR,
tournament_venue VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When has a Tournament venue of richmond arena, and a Record of 12 1, and a Regular Season C... | SELECT year FROM table_name_45 WHERE tournament_venue = "richmond arena" AND record = "12–1" AND regular_season_champion_s_ = "virginia tech" | sql_create_context |
CREATE TABLE table_name_76 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is 1994, when 2002 is ATP Masters Series?
| SELECT 1994 FROM table_name_76 WHERE 2002 = "atp masters series" | sql_create_context |
CREATE TABLE table_28975 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highes... | SELECT MAX("No. in series") FROM table_28975 WHERE "Directed by" = 'Phil Abraham' | wikisql |
CREATE TABLE table_22753245_1 (
party VARCHAR,
constituency VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the party when the constituency is 1. Chennai North?
| SELECT party FROM table_22753245_1 WHERE constituency = "1. Chennai North" | sql_create_context |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime tim... | SELECT admissions.insurance FROM admissions WHERE admissions.subject_id = 17667 AND admissions.dischtime IS NULL | mimic_iii |
CREATE TABLE table_name_32 (
score VARCHAR,
champion VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score of champion masahiro kawamura?
| SELECT score FROM table_name_32 WHERE champion = "masahiro kawamura" | sql_create_context |
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 t_kc21.MED_ORG_DEPT_CD, t_kc21.MED_ORG_DEPT_NM FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.MED_SER_ORG_NO = '8225788' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2009-08-01' AND '2012-05-12' GROUP... | css |
CREATE TABLE table_39939 (
"singular" text,
"singular gender" text,
"plural" text,
"plural gender" text,
"meaning" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the plural if the singular is awu?
| SELECT "plural" FROM table_39939 WHERE "singular" = 'awu' | wikisql |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'procedures_icd' AND cost.event_id IN (SELECT procedures_icd.row_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'lap creat esoph sphinct')) | mimic_iii |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagn... | SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'svt - mechanism undefined' AND STRFTIME(... | eicu |
CREATE TABLE table_204_574 (
id number,
"year" number,
"title" text,
"peak chart positions\nswe" number,
"peak chart positions\nswi" number,
"peak chart positions\nuk" number,
"album" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is th... | SELECT "title" FROM table_204_574 WHERE id = 1 | squall |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
sp... | SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51858) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'potassium, whole blood') AND DATETIME(labevents.charttime, 'start of year') = DA... | mimic_iii |
CREATE TABLE table_33669 (
"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 was the home teams score when the away team... | SELECT "Home team score" FROM table_33669 WHERE "Crowd" > '16,112' AND "Away team score" = '11.11 (77)' | wikisql |
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(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(SALARY) | nvbench |
CREATE TABLE table_name_84 (
cardinal_direction VARCHAR,
english VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the cardinal direction of Monday in English?
| SELECT cardinal_direction FROM table_name_84 WHERE english = "monday" | sql_create_context |
CREATE TABLE table_58865 (
"Central Murray" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many byes when there are 11 wins and fewer than 5 losses?
| SELECT SUM("Byes") FROM table_58865 WHERE "Wins" = '11' AND "Losses" < '5' | wikisql |
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases IN... | SELECT Year, MAX(Score) FROM wine GROUP BY Year ORDER BY Year | nvbench |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE microbiologyevents (
... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT outputevents.itemid FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52456)) AND DATETIME(outputevents.charttim... | mimic_iii |
CREATE TABLE table_204_595 (
id number,
"rank" number,
"nation" 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 most silver medals ?
| SELECT "nation" FROM table_204_595 ORDER BY "silver" DESC LIMIT 1 | squall |
CREATE TABLE table_test_26 (
"id" int,
"bleeding" int,
"left_ventricular_ejection_fraction_lvef" int,
"left_main_coronary_artery_disease" bool,
"uncontrolled_diabetes" bool,
"hiv_infection" bool,
"hemoglobin_a1c_hba1c" float,
"hepatitis_b_infection" bool,
"renal_disease" bool,
"u... | SELECT * FROM table_test_26 WHERE uncontrolled_diabetes = 1 OR hemoglobin_a1c_hba1c > 10 | criteria2sql |
CREATE TABLE table_10128185_2 (
wales INTEGER,
northern_england VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many votes did Wales cast when Northern England cast 6?
| SELECT MIN(wales) FROM table_10128185_2 WHERE northern_england = 6 | sql_create_context |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_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,
... | SELECT COUNT(t_kc21.PERSON_ID) FROM t_kc21 WHERE t_kc21.IN_DIAG_DIS_CD = 'J29.030' | css |
CREATE TABLE table_74 (
"County" text,
"Precincts" real,
"Lunsford" real,
"% Lunsford" text,
"McConnell" real,
"% McConnell" text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the county of precints 515?
| SELECT "County" FROM table_74 WHERE "Precincts" = '515' | wikisql |
CREATE TABLE table_name_55 (
pernambuco INTEGER,
northeast_total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the lowest number in Pernambuco where the Northeast had a total of 119978?
| SELECT MIN(pernambuco) FROM table_name_55 WHERE northeast_total = "119978" | sql_create_context |
CREATE TABLE table_name_41 (
stage_wins VARCHAR,
starts VARCHAR,
driver VARCHAR,
finishes VARCHAR,
podiums VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the number of stage wins for Federico Villagra having more than 1 finish, less than 8... | SELECT COUNT(stage_wins) FROM table_name_41 WHERE finishes > 1 AND podiums < 1 AND driver = "federico villagra" AND starts < 8 | sql_create_context |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comme... | SELECT OwnerUserId AS "user_link", Comment, 'site://suggested-edits/' + CAST(Id AS TEXT) AS "suggested_edit", PostId AS "post_link", CreationDate, ApprovalDate, RejectionDate, CASE WHEN NOT ApprovalDate IS NULL THEN 'Approved' WHEN NOT RejectionDate IS NULL THEN 'Rejected' WHEN ((ApprovalDate IS NULL) AND (RejectionDat... | sede |
CREATE TABLE table_28153 (
"Date" text,
"Location" text,
"Fight" text,
"Division" text,
"Titles" text,
"Rematch" text,
"TV" text,
"Promoter" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the Undercard of Stev... | SELECT "Location" FROM table_28153 WHERE "Notes" = 'Undercard of Stevenson/Bellew' | wikisql |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id ... | SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 9294)) | mimic_iii |
CREATE TABLE table_name_89 (
goals VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Goals did Matt Cook have?
| SELECT goals FROM table_name_89 WHERE player = "matt cook" | sql_create_context |
CREATE TABLE table_39821 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Attendance, when Home is Cleveland, and when Date is... | SELECT "Attendance" FROM table_39821 WHERE "Home" = 'cleveland' AND "Date" = 'january 30' | wikisql |
CREATE TABLE mzjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
... | SELECT zyjybgb.BGRGH, zyjybgb.BGRXM FROM zyjybgb WHERE zyjybgb.JZLSH = '71275819532' GROUP BY zyjybgb.BGRGH HAVING COUNT(*) > 20 UNION SELECT mzjybgb.BGRGH, mzjybgb.BGRXM FROM mzjybgb WHERE mzjybgb.JZLSH = '71275819532' GROUP BY mzjybgb.BGRGH HAVING COUNT(*) > 20 | css |
CREATE TABLE table_9085 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What event did Diego Saraiva fight jorge gurgel?
| SELECT "Event" FROM table_9085 WHERE "Opponent" = 'jorge gurgel' | wikisql |
CREATE TABLE table_name_73 (
set_4 VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the set 4 with a 2-3 score?
| SELECT set_4 FROM table_name_73 WHERE score = "2-3" | sql_create_context |
CREATE TABLE table_6920 (
"Season" text,
"Games" real,
"Lost" real,
"Tied" real,
"Points" real,
"Goals for" real,
"Goals against" real,
"Coach" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For games less than 70 and goals for greater t... | SELECT MAX("Points") FROM table_6920 WHERE "Goals for" > '335' AND "Games" < '70' | wikisql |
CREATE TABLE table_55529 (
"Month" text,
"Week" real,
"Overall" text,
"Offensive" text,
"Defensive" text,
"Transition" text,
"Rookie" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the rookie who played when Matt Vinc was defensive a... | SELECT "Rookie" FROM table_55529 WHERE "Defensive" = 'matt vinc' AND "Offensive" = 'pat maddalena' | wikisql |
CREATE TABLE table_name_10 (
crowd INTEGER,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest crowd at punt road oval?
| SELECT MIN(crowd) FROM table_name_10 WHERE venue = "punt road oval" | sql_create_context |
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_... | SELECT card_type_code, COUNT(*) FROM Customers_Cards GROUP BY card_type_code | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.