context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_17232 (
"Disc" real,
"Track" real,
"English title" text,
"Japanese title" text,
"R\u014dmaji title" text,
"Artist" text,
"Track time" text
) | What is the smallest track number? | SELECT MIN("Track") FROM table_17232 | wikisql |
CREATE TABLE table_name_77 (
home_team VARCHAR,
away_team VARCHAR
) | Name the home team for carlton away team | SELECT home_team FROM table_name_77 WHERE away_team = "carlton" | sql_create_context |
CREATE TABLE table_14656147_2 (
week VARCHAR,
record VARCHAR
) | List the record of 0-1 from the table? | SELECT week FROM table_14656147_2 WHERE record = "0-1" | sql_create_context |
CREATE TABLE table_47482 (
"Company name" text,
"Hardware Model" text,
"Accreditation type" text,
"Accreditation level" text,
"Date" text
) | When did Samsung Electronics Co LTD make the GT-i9100? | SELECT "Date" FROM table_47482 WHERE "Company name" = 'samsung electronics co ltd' AND "Hardware Model" = 'gt-i9100' | wikisql |
CREATE TABLE table_148535_2 (
Id VARCHAR
) | Name the most 3 credits | SELECT MIN(3 AS _credits) FROM table_148535_2 | 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 ftxmzjzjlb (
HXPLC number,
HZ... | 在08年7月28日到10年3月17日期间,陈浩淼这位患者找了多少医生看病 | SELECT COUNT(txmzjzjlb.ZZYSGH) 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 person_info.XM = '陈浩淼' AND txmzjzjlb.JZKSRQ BETWEEN '2008-07-28' AND '2010-03-17' UNION SELECT COUNT(ft... | css |
CREATE TABLE table_name_63 (
years VARCHAR,
goals VARCHAR,
matches VARCHAR,
rank VARCHAR
) | In what years was there a rank lower than 9, under 84 goals, and more than 158 matches? | SELECT years FROM table_name_63 WHERE matches > 158 AND rank > 9 AND goals < 84 | sql_create_context |
CREATE TABLE table_43208 (
"8:00" text,
"8:30" text,
"9:00" text,
"9:30" text,
"10:00" text
) | What aired at 10:00 when Flashpoint aired at 9:30? | SELECT "10:00" FROM table_43208 WHERE "9:30" = 'flashpoint' | wikisql |
CREATE TABLE table_10130 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | When was the game played at glenferrie oval? | SELECT "Date" FROM table_10130 WHERE "Venue" = 'glenferrie oval' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | what is the total number of patients diagnosed with icd9 code 45620 who had a blood test. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "45620" AND lab.fluid = "Blood" | mimicsql_data |
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 text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | count the number of patients whose primary disease is pneumonia;human immunodefiency virus;rule out tuberculosis and year of death is less than or equal to 2168? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "PNEUMONIA;HUMAN IMMUNODEFIENCY VIRUS;RULE OUT TUBERCULOSIS" AND demographic.dod_year <= "2168.0" | mimicsql_data |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 编号为7367933的医院在医疗记录里写的出院诊断为复发性阿弗他溃疡的病患其最低和最高医疗费一共多少钱? | SELECT MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7367933' AND t_kc21.OUT_DIAG_DIS_NM = '复发性阿弗他溃疡') | 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... | 患者59902632最主要找哪位医生接受治疗,时间是从01年7月28日到06年7月31日 | SELECT t_kc21.OUT_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '59902632' AND t_kc21.IN_HOSP_DATE BETWEEN '2001-07-28' AND '2006-07-31' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE table_203_116 (
id number,
"no." number,
"player" text,
"birth date" text,
"weight" number,
"height" number,
"position" text,
"current club" text
) | how many members of estonia 's men 's national volleyball team were born in 1988 ? | SELECT COUNT("player") FROM table_203_116 WHERE "birth date" = 1988 | squall |
CREATE TABLE table_2818164_5 (
no_in_season VARCHAR,
original_air_date VARCHAR
) | What episoe number in the season originally aired on February 11, 1988? | SELECT no_in_season FROM table_2818164_5 WHERE original_air_date = "February 11, 1988" | 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
)
... | provide the number of patients whose admission type is emergency and lab test name is rbc, csf? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.label = "RBC, CSF" | mimicsql_data |
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... | 郑丽容患者在医院5352405的出院诊断结果中哪个出院诊断医生姓沈,需要这个结果的详情 | SELECT gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_NM = '郑丽容' AND gwyjzb.MED_SER_ORG_NO = '5352405' AND gwyjzb.OUT_DIAG_DOC_NM LIKE '沈%' UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '郑丽容' AND fgwyjzb.MED_SER_ORG_NO = '5352405' AN... | css |
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,
... | 患者56570950在二零零七年十月九日之后有哪些门诊就诊的检验报告单?列出门诊就诊流水号 | SELECT mzjzjlb.JZLSH 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 = '56570950' AND NOT mzjzjlb.JZLSH IN (SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGRQ <= '2007-10-09' UNION SELECT mzjybgb.JZLSH FROM mzjybgb WHERE mzjybgb... | css |
CREATE TABLE artist (
artist_id number,
artist text,
age number,
famous_title text,
famous_release_date text
)
CREATE TABLE music_festival (
id number,
music_festival text,
date_of_ceremony text,
category text,
volume number,
result text
)
CREATE TABLE volume (
volume_i... | Please show the songs that have result 'nominated' at music festivals. | SELECT T2.song FROM music_festival AS T1 JOIN volume AS T2 ON T1.volume = T2.volume_id WHERE T1.result = "Nominated" | spider |
CREATE TABLE elimination (
elimination_id text,
wrestler_id text,
team text,
eliminated_by text,
elimination_move text,
time text
)
CREATE TABLE wrestler (
wrestler_id number,
name text,
reign text,
days_held text,
location text,
event text
) | Which teams had more than 3 eliminations? | SELECT team FROM elimination GROUP BY team HAVING COUNT(*) > 3 | spider |
CREATE TABLE table_204_910 (
id number,
"rank" number,
"name" text,
"nationality" text,
"result" number,
"notes" text
) | how many athletes had a better result than tatyana bocharova ? | SELECT COUNT("name") FROM table_204_910 WHERE "result" > (SELECT "result" FROM table_204_910 WHERE "name" = 'tatyana bocharova') | squall |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) | For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the sum of code , and group by attribute name, sort total number of code in asc order. | SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code | nvbench |
CREATE TABLE table_name_18 (
round INTEGER,
school VARCHAR
) | What was the highest round that had northwestern? | SELECT MAX(round) FROM table_name_18 WHERE school = "northwestern" | sql_create_context |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,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,
JOB_ID varchar(10),
... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, return a bar chart about the distribution of hire_date and the average of manager_id bin hire_date by weekday, display by the the average of manager id in ascending please. | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(MANAGER_ID) | nvbench |
CREATE TABLE table_204_988 (
id number,
"responsible minister(s)" text,
"crown entities" text,
"monitoring department(s)" text,
"category / type" text,
"empowering legislation" text
) | who is listed as the last responsible mister -lrb- s -rrb- on this chart ? | SELECT "responsible minister(s)" FROM table_204_988 ORDER BY id DESC LIMIT 1 | squall |
CREATE TABLE table_29747178_2 (
series__number VARCHAR,
directed_by VARCHAR
) | What is the series # when the director is john showalter? | SELECT series__number FROM table_29747178_2 WHERE directed_by = "John Showalter" | sql_create_context |
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... | provide the number of patients whose admission type is emergency and diagnosis long title is other drugs and medicinal substances causing adverse effects in therapeutic use. | 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 = "Other drugs and medicinal substances causing adverse effects in therapeutic use" | mimicsql_data |
CREATE TABLE table_19191 (
"Year" real,
"League" text,
"Reg. Season" text,
"Playoffs" text,
"US Open Cup" text,
"Avg. Attendance" real
) | What was the regular season standings for the year when the playoffs reached the conference semifinals and the team did not qualify for the US Open Cup? | SELECT "Reg. Season" FROM table_19191 WHERE "Playoffs" = 'Conference Semifinals' AND "US Open Cup" = 'Did not qualify' | wikisql |
CREATE TABLE table_7363 (
"Vol. #" real,
"Title" text,
"Material collected" text,
"Pages" real,
"ISBN" text
) | How many pages does the edition with a volume # smaller than 8 and an ISBM of 1-40122-892-5 have? | SELECT SUM("Pages") FROM table_7363 WHERE "Vol. #" < '8' AND "ISBN" = '1-40122-892-5' | wikisql |
CREATE TABLE hz_info_mzjzjlb (
JZLSH number,
YLJGDM number,
mzjzjlb_id number
)
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 ... | 从13年5月11日到2020年4月11日这段时间,列出患者杨丹红所有检验报告单的审核日期时间吗? | SELECT jybgb.SHSJ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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_MZJZJLB ... | css |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAno... | Ranking of questions by score. | SELECT Posts.Id AS "post_link", Posts.Title, Posts.Score AS Score FROM Posts ORDER BY Posts.Score DESC LIMIT 100 | sede |
CREATE TABLE table_name_40 (
game VARCHAR,
score VARCHAR
) | Which Game has a Score of w 90 82 (ot)? | SELECT game FROM table_name_40 WHERE score = "w 90–82 (ot)" | sql_create_context |
CREATE TABLE table_name_67 (
crowd INTEGER,
away_team VARCHAR
) | What was the largest crowd when Collingwood was the away team? | SELECT MAX(crowd) FROM table_name_67 WHERE away_team = "collingwood" | sql_create_context |
CREATE TABLE table_24185 (
"Station" text,
"Line" text,
"Planned" real,
"Cancelled" real,
"Proposal" text,
"Details" text
) | Name the number of cancelled for turnham green | SELECT COUNT("Cancelled") FROM table_24185 WHERE "Station" = 'Turnham Green' | wikisql |
CREATE TABLE table_name_59 (
attendance INTEGER,
score VARCHAR,
away VARCHAR
) | What is the highest attendance of the match with a 2:0 score and vida as the away team? | SELECT MAX(attendance) FROM table_name_59 WHERE score = "2:0" AND away = "vida" | sql_create_context |
CREATE TABLE track (
Track_ID int,
Name text,
Location text,
Seating real,
Year_Opened real
)
CREATE TABLE race (
Race_ID int,
Name text,
Class text,
Date text,
Track_ID text
) | Visualize a pie chart with what are the names and seatings for all tracks opened after 2000? | SELECT Name, Seating FROM track WHERE Year_Opened > 2000 | nvbench |
CREATE TABLE storm (
Storm_ID int,
Name text,
Dates_active text,
Max_speed int,
Damage_millions_USD real,
Number_Deaths int
)
CREATE TABLE region (
Region_id int,
Region_code text,
Region_name text
)
CREATE TABLE affected_region (
Region_id int,
Storm_ID int,
Number_cit... | Show the name for regions and the number of storms for each region by a bar chart, and sort from high to low by the X-axis. | SELECT Region_name, COUNT(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.Region_id = T2.Region_id GROUP BY T1.Region_id ORDER BY Region_name DESC | nvbench |
CREATE TABLE table_name_44 (
attendance INTEGER,
record VARCHAR,
points VARCHAR
) | What is the Attendance of the game with a Record of 37 21 12 and less than 86 Points? | SELECT AVG(attendance) FROM table_name_44 WHERE record = "37–21–12" AND points < 86 | sql_create_context |
CREATE TABLE table_name_17 (
yards_per_attempt INTEGER,
net_yards INTEGER
) | How many yards per attempt have net yards greater than 631? | SELECT SUM(yards_per_attempt) FROM table_name_17 WHERE net_yards > 631 | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | What is the primary disease and diagnosis icd9 code of Josette Orr? | SELECT demographic.diagnosis, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Josette Orr" | mimicsql_data |
CREATE TABLE table_23575917_2 (
scores VARCHAR,
davids_team VARCHAR
) | Name the scores for david baddiel and maureen lipman | SELECT COUNT(scores) FROM table_23575917_2 WHERE davids_team = "David Baddiel and Maureen Lipman" | sql_create_context |
CREATE TABLE table_name_62 (
role VARCHAR,
studio VARCHAR,
title VARCHAR
) | Name the role for mono studio and title of paradise canyon | SELECT role FROM table_name_62 WHERE studio = "mono" AND title = "paradise canyon" | sql_create_context |
CREATE TABLE table_name_24 (
total VARCHAR,
finish VARCHAR
) | Name the total with finish of t22 | SELECT total FROM table_name_24 WHERE finish = "t22" | sql_create_context |
CREATE TABLE table_3782 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Decision" text,
"Location/Attendance" text,
"Record" text
) | If the opponent was @ Boston Bruins, what was the Location/Attendance? | SELECT "Location/Attendance" FROM table_3782 WHERE "Opponent" = '@ Boston Bruins' | wikisql |
CREATE TABLE table_64443 (
"Date(s)" text,
"Venue" text,
"City" text,
"Ticket price(s)" text,
"Ticket sold / available" text,
"Ticket grossing" text
) | What was the ticket price on September 16, 1986? | SELECT "Ticket price(s)" FROM table_64443 WHERE "Date(s)" = 'september 16, 1986' | wikisql |
CREATE TABLE table_17060277_7 (
high_rebounds VARCHAR,
team VARCHAR
) | Name the high rebounds for memphis | SELECT high_rebounds FROM table_17060277_7 WHERE team = "Memphis" | sql_create_context |
CREATE TABLE settlements (
settlement_id number,
claim_id number,
date_claim_made time,
date_claim_settled time,
amount_claimed number,
amount_settled number,
customer_policy_id number
)
CREATE TABLE customers (
customer_id number,
customer_details text
)
CREATE TABLE claims (
... | Tell me the the date when the first claim was made. | SELECT date_claim_made FROM claims ORDER BY date_claim_made LIMIT 1 | spider |
CREATE TABLE table_77878 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
) | Tell me the outgoing manager for 22 november date of vacancy | SELECT "Outgoing manager" FROM table_77878 WHERE "Date of vacancy" = '22 november' | wikisql |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | For those products with a price between 60 and 120, return a bar chart about the distribution of name and manufacturer , and sort in desc by the y-axis. | SELECT Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Manufacturer DESC | nvbench |
CREATE TABLE table_50927 (
"Winner" text,
"Country" text,
"Winter Olympics" real,
"FIS Nordic World Ski Championships" text,
"Holmenkollen" text
) | Who won the FIS Nordic World Ski Championships in 1972? | SELECT "Winner" FROM table_50927 WHERE "FIS Nordic World Ski Championships" = '1972' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 编号10534580的参保人从0六年六月十八日到一四年十月二十六日,门诊开出的检查项目总共有多少金额 | SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '10534580' AND t_kc22.t_kc21_CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2006-06-18' AND '2014-10-26' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE T... | For those employees who was hired before 2002-06-21, give me the comparison about the average of department_id over the job_id , and group by attribute job_id, show x-axis in descending order. | SELECT JOB_ID, AVG(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
CREATE TABLE table_2187178_1 (
listed_owner_s_ VARCHAR,
team VARCHAR
) | Name the listed owners for brevak racing | SELECT listed_owner_s_ FROM table_2187178_1 WHERE team = "Brevak Racing" | sql_create_context |
CREATE TABLE table_7061 (
"Year" real,
"Foundry" text,
"Diameter (mm)" real,
"Weight (kg)" text,
"Nominal Tone" text
) | What is the sum total of all the years with a bell that weighed 857 kilograms? | SELECT SUM("Year") FROM table_7061 WHERE "Weight (kg)" = '857' | wikisql |
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... | 从18年2月23日到21年7月20日科室97321的门诊量是多少? | SELECT COUNT(*) FROM txmzjzjlb WHERE txmzjzjlb.JZKSBM = '97321' AND txmzjzjlb.JZKSRQ BETWEEN '2018-02-23' AND '2021-07-20' UNION SELECT COUNT(*) FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZKSBM = '97321' AND ftxmzjzjlb.JZKSRQ BETWEEN '2018-02-23' AND '2021-07-20' | css |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
P... | Questions with 'Magento' in title. | SELECT Id AS "post_link" FROM Posts WHERE Title LIKE '%Magento%' | sede |
CREATE TABLE table_name_46 (
money___$__ VARCHAR,
player VARCHAR
) | What is Chris Riley's Money? | SELECT money___$__ FROM table_name_46 WHERE player = "chris riley" | sql_create_context |
CREATE TABLE country (
country_id number,
name text,
population number,
area number,
languages text
)
CREATE TABLE roller_coaster (
roller_coaster_id number,
name text,
park text,
country_id number,
length number,
height number,
speed text,
opened text,
status te... | What are the speeds of the longest roller coaster? | SELECT speed FROM roller_coaster ORDER BY length DESC LIMIT 1 | spider |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_M... | 检验报告单58816470229与检验报告单88055478674中是否有名称相同的检测指标?列出这些检测指标有什么名称? | (SELECT JCZBMC FROM jyjgzbb WHERE BGDH = '88055478674') INTERSECT (SELECT JCZBMC FROM jyjgzbb WHERE BGDH = '58816470229') | css |
CREATE TABLE table_name_48 (
points INTEGER,
year VARCHAR,
goals VARCHAR
) | What are the lowest points with 2013 as the year, and goals less than 0? | SELECT MIN(points) FROM table_name_48 WHERE year = "2013" AND goals < 0 | sql_create_context |
CREATE TABLE table_16888 (
"Year" real,
"Championship" text,
"54 holes" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | Who were the runner(s)-up when Tiger won by 11 strokes? | SELECT "Runner(s)-up" FROM table_16888 WHERE "Margin of victory" = '11 strokes' | wikisql |
CREATE TABLE table_15187735_8 (
segment_a VARCHAR,
series_ep VARCHAR
) | Name the segment a for 8-08 | SELECT segment_a FROM table_15187735_8 WHERE series_ep = "8-08" | sql_create_context |
CREATE TABLE table_25276250_3 (
outputs VARCHAR,
notes VARCHAR
) | How many outputs are there for solid state, battery operated for portable use listed in notes? | SELECT COUNT(outputs) FROM table_25276250_3 WHERE notes = "Solid state, battery operated for portable use" | sql_create_context |
CREATE TABLE table_24990183_7 (
name VARCHAR,
rank VARCHAR
) | If the rank is 17, what are the names? | SELECT name FROM table_24990183_7 WHERE rank = 17 | sql_create_context |
CREATE TABLE table_name_51 (
reservation VARCHAR
) | What is the 1979 number for Standing Rock Indian Reservation when the 1989 is less than 54.9? | SELECT SUM(1979) FROM table_name_51 WHERE reservation = "standing rock indian reservation" AND 1989 < 54.9 | sql_create_context |
CREATE TABLE table_49308 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | What is Opponent, when Attendance is 58,836? | SELECT "Opponent" FROM table_49308 WHERE "Attendance" = '58,836' | wikisql |
CREATE TABLE table_41893 (
"Name" text,
"Level" real,
"Digits" real,
"Average size (square miles)" text,
"Number of HUs (approximate)" real,
"Example name" text,
"Example code (HUC)" real
) | What is the mean huc example code when the example name's lower snake, there are 6 digits, and less than 3 levels? | SELECT AVG("Example code (HUC)") FROM table_41893 WHERE "Example name" = 'lower snake' AND "Digits" = '6' AND "Level" < '3' | wikisql |
CREATE TABLE table_29572 (
"Name/Name of Act" text,
"Age(s)" text,
"Genre" text,
"Act" text,
"Hometown" text,
"Qtr. Final (Week)" real,
"Semi Final (Week)" text,
"Position Reached" text
) | What is the quarterfinal week for Austin Anderson? | SELECT MIN("Qtr. Final (Week)") FROM table_29572 WHERE "Name/Name of Act" = 'Austin Anderson' | wikisql |
CREATE TABLE table_30696 (
"Reservoir" text,
"Basin" text,
"Location" text,
"Type" text,
"Height (m)" text,
"Length along the top (m)" text,
"Drainage basin (km\u00b2)" text,
"Reservoir surface (ha)" text,
"Volume (hm\u00b3)" text
) | What is the volume when the resrvoir is Tanes? | SELECT "Volume (hm\u00b3)" FROM table_30696 WHERE "Reservoir" = 'Tanes' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | provide the number of patients whose days of hospital stay is greater than 23 and drug code is acyc400? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "23" AND prescriptions.formulary_drug_cd = "ACYC400" | mimicsql_data |
CREATE TABLE table_23576 (
"Story #" real,
"Target #" text,
"Title" text,
"Author" text,
"Reader" text,
"Format" text,
"Company" text,
"Release Date" text,
"Notes" text
) | What's the title of the audio book with story number 91? | SELECT "Title" FROM table_23576 WHERE "Story #" = '91' | wikisql |
CREATE TABLE table_name_9 (
class VARCHAR,
erp_w VARCHAR
) | What class is ERP W of 800? | SELECT class FROM table_name_9 WHERE erp_w = 800 | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime t... | tell me the cost of the diagnosis for smoking cessation counseling given? | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'smoking cessation counseling given') | eicu |
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 lab (
subject_id text,
hadm_id text,
... | what is the total number of patients who were diagnosed with icd9 code 2254? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "2254" | mimicsql_data |
CREATE TABLE station (
id number,
network_name text,
services text,
local_authority text
)
CREATE TABLE route (
train_id number,
station_id number
)
CREATE TABLE weekly_weather (
station_id number,
day_of_week text,
high_temperature number,
low_temperature number,
precipita... | Give me the maximum low temperature and average precipitation at the Amersham station. | SELECT MAX(t1.low_temperature), AVG(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id WHERE t2.network_name = "Amersham" | spider |
CREATE TABLE table_name_20 (
event VARCHAR,
location VARCHAR
) | Which event was held at Manly Beach? | SELECT event FROM table_name_20 WHERE location = "manly beach" | sql_create_context |
CREATE TABLE table_43959 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
) | Who was the home team against the Bolton Wanderers? | SELECT "Home team" FROM table_43959 WHERE "Away team" = 'bolton wanderers' | wikisql |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConce... | All Info About Mobile Android Testing. | SELECT P.OwnerUserId, P.Title, P.Tags, P.ViewCount, P.Score, P.AnswerCount, P.CreationDate FROM Posts AS P WHERE (P.Tags LIKE '%android-testing%') OR (P.Tags LIKE '%robotium%') OR (P.Tags LIKE '%androidviewclient%') OR (P.Tags LIKE '%monkeyrunner%') OR (P.Tags LIKE '%android-espresso%') OR (P.Tags LIKE '%android-emulat... | sede |
CREATE TABLE table_51600 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Tell me the away team score for away team of south melbourne | SELECT "Away team score" FROM table_51600 WHERE "Away team" = 'south melbourne' | wikisql |
CREATE TABLE table_55306 (
"Year" real,
"Animal" text,
"Artist" text,
"Finish" text,
"Mintage" real,
"Issue Price" text
) | What year was the downy woodpecker coin created? | SELECT SUM("Year") FROM table_55306 WHERE "Animal" = 'downy woodpecker' | wikisql |
CREATE TABLE table_28269 (
"Model" text,
"Launch" text,
"Code name" text,
"Transistors (million)" real,
"Die size (mm 2 )" real,
"Bus interface" text,
"Memory ( MB )" text,
"SM count" real,
"Core config 1,3" text,
"Core ( MHz )" real,
"Shader ( MHz )" real,
"Memory ( MHz ... | What model has a launch of September 3, 2010? | SELECT "Model" FROM table_28269 WHERE "Launch" = 'September 3, 2010' | wikisql |
CREATE TABLE table_name_65 (
opponent VARCHAR,
save VARCHAR
) | Which opponent has a save of smith (22)? | SELECT opponent FROM table_name_65 WHERE save = "smith (22)" | sql_create_context |
CREATE TABLE table_name_71 (
win_draw_lose VARCHAR,
venue VARCHAR,
team VARCHAR
) | What was the result of the home game against Derby County? | SELECT win_draw_lose FROM table_name_71 WHERE venue = "home" AND team = "derby county" | sql_create_context |
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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,... | tell me the average arterial bp [systolic] of patient 16472 until 08/15/2105? | SELECT AVG(chartevents.valuenum) 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 = 16472)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte... | mimic_iii |
CREATE TABLE table_43812 (
"Club" text,
"League goals" text,
"FA Cup goals" text,
"League Cup goals" text,
"Total" real
) | Which Total has a Club of darlington, and a League goals of 13, and a League Cup goals of 1? | SELECT SUM("Total") FROM table_43812 WHERE "Club" = 'darlington' AND "League goals" = '13' AND "League Cup goals" = '1' | wikisql |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE Po... | Top SO users from germany. | SELECT DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%germany%' OR Location LIKE '%Germany%' OR Location LIKE N'%DE%' OR Location LIKE N'%de%' OR Location LIKE N'%deutschland%' ORDER BY Reputation DESC LIMIT 3000 | sede |
CREATE TABLE table_train_103 (
"id" int,
"systolic_blood_pressure_sbp" int,
"epilepsy" bool,
"diastolic_blood_pressure_dbp" int,
"heart_rate" int,
"seizure_disorder" bool,
"age" float,
"NOUSE" float
) | age 65 years and older | SELECT * FROM table_train_103 WHERE age >= 65 | criteria2sql |
CREATE TABLE table_name_4 (
location VARCHAR,
frequency VARCHAR
) | Which Location has a Frequency of 102.5 fm? | SELECT location FROM table_name_4 WHERE frequency = "102.5 fm" | sql_create_context |
CREATE TABLE table_name_89 (
crowd INTEGER,
venue VARCHAR
) | What is the smallest crowd for victoria park? | SELECT MIN(crowd) FROM table_name_89 WHERE venue = "victoria park" | sql_create_context |
CREATE TABLE table_73846 (
"Season no." real,
"Series no." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
) | What episode number in the season is titled 'stray'? | SELECT MAX("Season no.") FROM table_73846 WHERE "Title" = 'Stray' | wikisql |
CREATE TABLE table_439 (
"Overall Pick #" real,
"AFL Team" text,
"Player" text,
"Position" text,
"College" text
) | What is the position for the pick number 17? | SELECT "Position" FROM table_439 WHERE "Overall Pick #" = '17' | wikisql |
CREATE TABLE table_15621965_18 (
no INTEGER,
position VARCHAR
) | WHAT WAS THE NUMBER OF THE ONLY FORWARD-CENTER TO MAKE THE ROSTER? | SELECT MIN(no) FROM table_15621965_18 WHERE position = "Forward-Center" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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... | 病患40717294诊断为I86.192疾病时在门诊检测指标763289的结果定量及其单位各是多少? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb... | css |
CREATE TABLE table_77295 (
"Year" real,
"Team" text,
"Co-Drivers" text,
"Class" text,
"Laps" real,
"Pos." text,
"Class Pos." text
) | What was the class position of the team that was in the 4th position? | SELECT "Class Pos." FROM table_77295 WHERE "Pos." = '4th' | wikisql |
CREATE TABLE Product_Categories (
production_type_code VARCHAR(15),
product_type_description VARCHAR(80),
vat_rating DECIMAL(19,4)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
date_account_opened DATETIME,
account_name VARCHAR(50),
other_account_details VARCHAR(255... | How many accounts for each customer? Show a bar chart that groups by customer's last name. | SELECT customer_last_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id | nvbench |
CREATE TABLE table_2446333_2 (
date VARCHAR,
circuit VARCHAR
) | Name the date for eastern creek raceway | SELECT date FROM table_2446333_2 WHERE circuit = "Eastern Creek Raceway" | sql_create_context |
CREATE TABLE table_26850 (
"Governorate" text,
"Kurdistan Democratic Party" real,
"Patriotic Union of Kurdistan" real,
"Total Kurdistan List" real,
"Total Governorate Seats" real
) | Name the least total kurdistan list | SELECT MIN("Total Kurdistan List") FROM table_26850 | wikisql |
CREATE TABLE table_name_40 (
week INTEGER,
record VARCHAR
) | What is the earliest week that shows a record of 8 5? | SELECT MIN(week) FROM table_name_40 WHERE record = "8–5" | sql_create_context |
CREATE TABLE market (
Market_ID int,
District text,
Num_of_employees int,
Num_of_shops real,
Ranking int
)
CREATE TABLE phone (
Name text,
Phone_ID int,
Memory_in_G int,
Carrier text,
Price real
)
CREATE TABLE phone_market (
Market_ID int,
Phone_ID text,
Num_of_stoc... | Create a pie chart showing the number of carrier across carrier. | SELECT Carrier, COUNT(Carrier) FROM phone GROUP BY Carrier | nvbench |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | how many patients whose admission type is emergency and diagnoses icd9 code is 56210? | 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.icd9_code = "56210" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.