context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_12043148_2 (
year VARCHAR,
glos_ VARCHAR,
_wilts VARCHAR
) | what is the year where glos & wilts is gloucester city winget? | SELECT year FROM table_12043148_2 WHERE glos_ & _wilts = "Gloucester City Winget" | sql_create_context |
CREATE TABLE table_name_72 (
density__hab_km²_ VARCHAR,
city_district VARCHAR
) | What is the density of San Sebasti n? | SELECT density__hab_km²_ FROM table_name_72 WHERE city_district = "san sebastián" | sql_create_context |
CREATE TABLE table_name_29 (
grid VARCHAR,
driver VARCHAR
) | What is the total number of Grids for Chuck Daigh? | SELECT COUNT(grid) FROM table_name_29 WHERE driver = "chuck daigh" | sql_create_context |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
... | is there a flight between SAN FRANCISCO and BOSTON with a stopover in DALLAS FORT WORTH | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, flight, flight_stop AS FLIGHT_STOP_0, flight_stop AS FLIGHT_STOP_1... | atis |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | 2005年2月16日到2008年10月12日期间患者水嘉瑞所有检验报告单中的标本采集部位可以告诉我都在哪里吗? | (SELECT jybgb.BBCJBW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '水嘉瑞' AND j... | css |
CREATE TABLE table_15867 (
"Player" text,
"No." real,
"Nationality" text,
"Position" text,
"Years in Toronto" text,
"School/Club Team" text
) | When did the player from Hawaii play for Toronto? | SELECT "Years in Toronto" FROM table_15867 WHERE "School/Club Team" = 'Hawaii' | wikisql |
CREATE TABLE table_63645 (
"Title" text,
"Localized Title" text,
"Creator" text,
"Years" text,
"Origin" text
) | Who is the creator of the title , aejangpan hongchawangja? | SELECT "Creator" FROM table_63645 WHERE "Localized Title" = '애장판 홍차왕자, aejangpan hongchawangja' | wikisql |
CREATE TABLE table_72793 (
"Player" text,
"No." real,
"Nationality" text,
"Position" text,
"Years for Grizzlies" text,
"School/Club Team" text
) | what's the highest player number from the list from 2000-2001 | SELECT MAX("No.") FROM table_72793 WHERE "Years for Grizzlies" = '2000-2001' | wikisql |
CREATE TABLE table_name_85 (
score VARCHAR,
record VARCHAR
) | Which Score has a Record of 18 11 5? | SELECT score FROM table_name_85 WHERE record = "18–11–5" | sql_create_context |
CREATE TABLE table_9924 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) | Who was the home team on November 22? | SELECT "Home" FROM table_9924 WHERE "Date" = 'november 22' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | what is minimum age of patients whose admission location is trsf within this facility and primary disease is atrial fibrillation\thoracoscopic maze procedure bilateral/sda? | SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.diagnosis = "ATRIAL FIBRILLATION\THORACOSCOPIC MAZE PROCEDURE BILATERAL/SDA" | mimicsql_data |
CREATE TABLE table_37707 (
"Year" text,
"English title" text,
"Original title" text,
"Country" text,
"Director" text
) | what is the director of la ronde | SELECT "Director" FROM table_37707 WHERE "Original title" = 'la ronde' | wikisql |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE medication (
medicationid n... | what is the maximum number of yearly diagnosed cases of valve replacement >= 7 days - mitral since 6 years ago? | SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnosis.patientunitstayid) AS c1 FROM diagnosis WHERE diagnosis.diagnosisname = 'valve replacement >= 7 days - mitral' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-6 year') GROUP BY STRFTIME('%y', diagnosis.diagnosistime)) AS t1 | eicu |
CREATE TABLE table_4014 (
"Institution" text,
"Location" text,
"Founded" real,
"Affiliation" text,
"Enrollment" real,
"Team Nickname" text,
"Primary conference" text
) | Name the affiliation for 27209 enrollment | SELECT "Affiliation" FROM table_4014 WHERE "Enrollment" = '27209' | wikisql |
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREA... | i'd like flights on AA from PHILADELPHIA to DALLAS arriving before 1145 | 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 WHERE ((CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = ... | atis |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
H... | 在编号为22243383887的医疗就诊中,开过哪些包含奥美拉唑的药品?金额是多少 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.AMOUNT FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '22243383887' AND t_kc22.SOC_SRT_DIRE_NM LIKE '%奥美拉唑%' | css |
CREATE TABLE table_9365 (
"Date" text,
"Series" text,
"Circuit" text,
"City / State" text,
"Winner" text,
"Team" text
) | What is Winner, when Circuit is Mallala Motor Sport Park, and when Series is ASTC Round 6? | SELECT "Winner" FROM table_9365 WHERE "Circuit" = 'mallala motor sport park' AND "Series" = 'astc round 6' | wikisql |
CREATE TABLE item (
i_id integer,
title varchar(20)
)
CREATE TABLE useracct (
u_id integer,
name varchar(128)
)
CREATE TABLE review (
a_id integer,
u_id integer,
i_id integer,
rating integer,
rank integer
)
CREATE TABLE trust (
source_u_id integer,
target_u_id integer,
... | For each user, return the name and the average rating of reviews given by them Plot them as bar chart, and could you show by the y axis from high to low? | SELECT name, AVG(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id ORDER BY AVG(T2.rating) DESC | nvbench |
CREATE TABLE table_21924 (
"Year" real,
"Date" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text
) | What team(s) were in 2003? | SELECT "Team" FROM table_21924 WHERE "Year" = '2003' | wikisql |
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE... | Return a bar chart about the distribution of meter_200 and the amount of meter_200 , and group by attribute meter_200. | SELECT meter_200, COUNT(meter_200) FROM swimmer GROUP BY meter_200 | nvbench |
CREATE TABLE table_name_25 (
gold INTEGER,
silver VARCHAR,
rank VARCHAR,
nation VARCHAR
) | What is the lowest number of Gold the Nation of Italy had when it ranked other than 1, and had more than 0 Silver? | SELECT MIN(gold) FROM table_name_25 WHERE rank > 1 AND nation = "italy" AND silver > 0 | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)... | count the number of times patient 12775 has had a .9% normal saline intake today. | SELECT COUNT(*) 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 = 12775)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = '.9% normal s... | mimic_iii |
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 transfers (
row_id number,
subject_id number,
hadm_... | how many times did patient 11823 make the ostomy (output) in 11/last year? | SELECT COUNT(*) 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 = 11823)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'ostomy (output)' A... | mimic_iii |
CREATE TABLE table_63150 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Score" text,
"Record" text
) | What is the Result of the game on November 24, 1946? | SELECT "Result" FROM table_63150 WHERE "Date" = 'november 24, 1946' | wikisql |
CREATE TABLE table_23207 (
"Further Cities" text,
"County, Oblast or State" text,
"Country" text,
"Distance" text,
"Direction" text
) | Name the further cities for slovakia and west direction | SELECT "Further Cities" FROM table_23207 WHERE "Country" = 'Slovakia' AND "Direction" = 'West' | wikisql |
CREATE TABLE table_17859 (
"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
) | How many clubs have tries for count of 50? | SELECT COUNT("Played") FROM table_17859 WHERE "Tries for" = '50' | wikisql |
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,
... | 检验结果指标记录号码是30535578307的结果定性和结果定量以及定量单位都是什么? | SELECT jyjgzbb.JCZBJGDX, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '30535578307' | css |
CREATE TABLE airports (
apid integer,
name text,
city text,
country text,
x real,
y real,
elevation bigint,
iata character varchar(3),
icao character varchar(4)
)
CREATE TABLE airlines (
alid integer,
name text,
iata varchar(2),
icao varchar(3),
callsign text,
... | What is the altitude (or elevation) of the airports in the city of New York? Show me a pie chart. | SELECT name, elevation FROM airports WHERE city = 'New York' | nvbench |
CREATE TABLE table_name_10 (
season VARCHAR,
wins VARCHAR,
finish VARCHAR
) | In which season were there Wins of 29 and a Finished place of 3rd? | SELECT season FROM table_name_10 WHERE wins = "29" AND finish = "3rd" | sql_create_context |
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 lab (
subject_id text,
hadm_id text,
... | how many female patients are diagnosed with primary diesease st elevated myocardial infarction\cardiac cath? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" | mimicsql_data |
CREATE TABLE table_name_17 (
away_team VARCHAR,
home_team VARCHAR
) | Which Away team score has a Home team of melbourne? | SELECT away_team AS score FROM table_name_17 WHERE home_team = "melbourne" | sql_create_context |
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE author (
authorid i... | topics at ACL 2014 | SELECT DISTINCT COUNT(paper.paperid), keyphrase.keyphraseid FROM keyphrase, paper, paperkeyphrase, venue WHERE paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2014 AND venue.venueid = paper.venueid AND venue.venuename = 'ACL' GROUP BY keyphrase.keyphraseid ... | scholar |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswer... | Distribution of users' up/down cast votes: graph. | SELECT ROUND(100 * UpVotes / (UpVotes + DownVotes + 0.1), 0) AS UpRatio, COUNT(*) AS N FROM (SELECT * FROM Users AS U WHERE U.UpVotes + U.DownVotes > 100) AS a GROUP BY ROUND(100 * UpVotes / (UpVotes + DownVotes + 0.1), 0) ORDER BY UpRatio | sede |
CREATE TABLE table_22432 (
"Position" real,
"Sail Number" text,
"Yacht" text,
"State/Country" text,
"Yacht Type" text,
"LOA (Metres)" text,
"Skipper" text,
"Corrected Time d:hh:mm:ss" text
) | What was the corrected time of sail number aus70? | SELECT "Corrected Time d:hh:mm:ss" FROM table_22432 WHERE "Sail Number" = 'AUS70' | wikisql |
CREATE TABLE table_name_53 (
transfer_fee VARCHAR,
country VARCHAR
) | What is the transfer fee for the country of Nir? | SELECT transfer_fee FROM table_name_53 WHERE country = "nir" | 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 jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.person_info_XM = '华文康' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgz... | css |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | what is the number of patients whose death status is 0 and procedure icd9 code is 5185? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "5185" | mimicsql_data |
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,
... | 华明哲这个病人被门诊诊断为脑梗死后遗症,他做的检测指标097260的结果定量和单位是啥 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW 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 = jy... | css |
CREATE TABLE table_25408 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) | How many outcome have a score of 7 6 (9 7) , 6 3? | SELECT COUNT("Outcome") FROM table_25408 WHERE "Score in the final" = '7–6 (9–7) , 6–3' | wikisql |
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,
... | 门诊诊断的患者为疾病H19.777的促甲状腺激素数值的平均值是多少?最值是多少? | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDBM = 'H19.777' AND jyjgzbb.JCZBMC = '... | css |
CREATE TABLE club_rank (
Rank real,
Club_ID int,
Gold real,
Silver real,
Bronze real,
Total real
)
CREATE TABLE competition_result (
Competition_ID int,
Club_ID_1 int,
Club_ID_2 int,
Score text
)
CREATE TABLE competition (
Competition_ID int,
Year real,
Competition_... | For all players, show the number of different club names they come from, order by the total number in asc please. | SELECT T1.name, COUNT(T1.name) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID = T2.Club_ID GROUP BY T1.name ORDER BY COUNT(T1.name) | nvbench |
CREATE TABLE table_51251 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What is the Away team score for Away team Melbourne? | SELECT "Away team score" FROM table_51251 WHERE "Away team" = 'melbourne' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,... | For all employees who have the letters D or S in their first name, draw a bar chart about the distribution of job_id and the average of salary , and group by attribute job_id, show Y from high to low order. | 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) DESC | nvbench |
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... | how much does it cost for the hospital stay of patient 006-47961 in a year before? | SELECT SUM(cost.cost) FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-47961') AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') | eicu |
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 Badges (
Id number,
UserId number,
Name text,
... | How high would my reputation approximately be when there was no cap or CW?. | SELECT SUM(CASE WHEN VoteTypeId = 1 THEN 15 WHEN VoteTypeId = 2 AND PostTypeId = 1 THEN 10 WHEN VoteTypeId = 2 AND PostTypeId = 2 THEN 10 WHEN VoteTypeId = 3 THEN -2 WHEN VoteTypeId = 9 THEN BountyAmount END) AS UncappedReputation FROM Votes INNER JOIN Posts ON Posts.Id = Votes.PostId WHERE Posts.OwnerUserId = @UserId | sede |
CREATE TABLE table_9016 (
"Verb" text,
"2 (VF)" text,
"2 (F)" text,
"3 (F)" text,
"2/3 (P)" text
) | WHICH Verb has a 2 (VF) of boltish? | SELECT "Verb" FROM table_9016 WHERE "2 (VF)" = 'তুই boltish' | wikisql |
CREATE TABLE table_42399 (
"Draw" real,
"Song" text,
"Performer" text,
"Points" real,
"Rank" text
) | What is the lowest draw number for the song ranked 6th with more than 43 points? | SELECT MIN("Draw") FROM table_42399 WHERE "Points" > '43' AND "Rank" = '6th' | wikisql |
CREATE TABLE table_name_68 (
competition VARCHAR,
location VARCHAR
) | What competition is located in bamako? | SELECT competition FROM table_name_68 WHERE location = "bamako" | sql_create_context |
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... | 患者邹兴国在00年6月10日到05年8月21日期间花了多些医保金额? | SELECT SUM(t_kc24.PER_ACC_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.PERSON_NM = '邹兴国' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-06-10' AND '2005-08-21' UNION SELECT SUM(t_kc24.PER_ACC_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gyb.PERSON_NM = '邹兴国' A... | css |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostHistory (
Id number,
Po... | All tags with no body. | SELECT t.TagName, p.Body, t.Count, t.WikiPostId FROM Tags AS t INNER JOIN Posts AS p ON t.ExcerptPostId = p.Id WHERE p.Body LIKE '' ORDER BY t.Count DESC | sede |
CREATE TABLE table_73382 (
"Round" real,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Team" text
) | How many drivers drove on Suzuka Circuit where Lo c Duval took pole position? | SELECT COUNT("Winning Driver") FROM table_73382 WHERE "Circuit" = 'Suzuka Circuit' AND "Pole Position" = 'Loïc Duval' | wikisql |
CREATE TABLE Rating (
stars INTEGER
) | What is the lowest and highest rating star? | SELECT MAX(stars), MIN(stars) FROM Rating | sql_create_context |
CREATE TABLE table_name_37 (
laps VARCHAR,
time VARCHAR
) | What laps have a Time of +28.778? | SELECT laps FROM table_name_37 WHERE time = "+28.778" | 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,
... | how many of the patients with protein-cal malnutr nos were discharged to trsf within this facility? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND diagnoses.short_title = "Protein-cal malnutr NOS" | mimicsql_data |
CREATE TABLE table_204_593 (
id number,
"year" text,
"chairperson" text
) | who served after maturi ramaro ? | SELECT "chairperson" FROM table_204_593 WHERE "year" > (SELECT "year" FROM table_204_593 WHERE "chairperson" = 'maturiramarao') ORDER BY "year" LIMIT 1 | squall |
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 zyjzjlb (
CYBQDM text,
CYBQMC... | 看看19年12月9号到20年6月11号9038216这个医疗机构特需门诊的就诊记录 | SELECT COUNT(*) FROM mzjzjlb JOIN hz_info_mzjzjlb JOIN hz_info ON hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.mzjzjlb_id = mzjzjlb.mzjzjlb_id AND hz_info_mzjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '90... | css |
CREATE TABLE table_14342210_6 (
points INTEGER,
player VARCHAR
) | What is the least amount of points made by Herrnstein? | SELECT MIN(points) FROM table_14342210_6 WHERE player = "Herrnstein" | 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 demographic ... | give me the number of patients whose insurance is medicaid and procedure icd9 code is 7761? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.icd9_code = "7761" | 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... | 查一下17172279这个病人在医院7202022的就诊记录中,给他开出的药品中哪个药的单价是最高的?药品的编号和名称及其单价分别是啥 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '17172279' AND t_kc22.t_kc21_MED_SER_ORG_NO = '7202022') ORDER BY t_kc22.UNIVALENT DESC LIMIT 1 | css |
CREATE TABLE catalogs (
catalog_id number,
catalog_name text,
catalog_publisher text,
date_of_publication time,
date_of_latest_revision time
)
CREATE TABLE catalog_structure (
catalog_level_number number,
catalog_id number,
catalog_level_name text
)
CREATE TABLE attribute_definitions (... | Find the names and publication dates of all catalogs that have catalog level number greater than 5. | SELECT t1.catalog_name, t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5 | spider |
CREATE TABLE table_10460 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text,
"Boxscore" text
) | Which box score has a Loss of capuano (5 5)? | SELECT "Boxscore" FROM table_10460 WHERE "Loss" = 'capuano (5–5)' | wikisql |
CREATE TABLE table_10015132_11 (
position VARCHAR,
school_club_team VARCHAR
) | What position does the player who played for butler cc (ks) play? | SELECT position FROM table_10015132_11 WHERE school_club_team = "Butler CC (KS)" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time... | is patient 013-27480's sao2 last measured on the last icu visit greater than second to last measured on the last icu visit? | SELECT (SELECT vitalperiodic.sao2 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-27480') AND NOT patient.unitdischargetime IS NULL ... | eicu |
CREATE TABLE table_22492 (
"Athlete" text,
"Class" text,
"Event" text,
"Round of 64" text,
"Round of 32" text,
"Round of 16" text,
"Quarterfinals" text,
"Semifinals" text,
"Final/ Bronze medal match" text
) | When houdet ( fra ) w 6-2, 6-1 is the quarterfinals what is the final/bronze medal match? | SELECT "Final/ Bronze medal match" FROM table_22492 WHERE "Quarterfinals" = 'Houdet ( FRA ) W 6-2, 6-1' | wikisql |
CREATE TABLE table_name_96 (
score VARCHAR,
competition VARCHAR,
venue VARCHAR
) | What score did vasil levski national stadium, sofia, which was friendly during competition, earn? | SELECT score FROM table_name_96 WHERE competition = "friendly" AND venue = "vasil levski national stadium, sofia" | sql_create_context |
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,
... | 那个孙清涵的病人在2017年11月21日到2019年11月23日内所有检验结果指标记录中的仪器编号以及名称能不能给我详细列举出来? | (SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jyb... | css |
CREATE TABLE table_42857 (
"Team" text,
"Match" real,
"Points" real,
"Draw" real,
"Lost" real
) | How many matches have 0 as the lost? | SELECT COUNT("Match") FROM table_42857 WHERE "Lost" = '0' | wikisql |
CREATE TABLE table_13557843_7 (
game VARCHAR,
date VARCHAR
) | what's the game with date being march 7 | SELECT game FROM table_13557843_7 WHERE date = "March 7" | sql_create_context |
CREATE TABLE table_name_80 (
home_team VARCHAR,
away_team VARCHAR
) | Who is the home side when geelong is the away side? | SELECT home_team FROM table_name_80 WHERE away_team = "geelong" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | provide the number of patients whose year of death is less than or equal to 2111 and procedure long title is other diagnostic procedures on nasal sinuses? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2111.0" AND procedures.long_title = "Other diagnostic procedures on nasal sinuses" | mimicsql_data |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom te... | indicate the daily maximum arterial bp [diastolic] of patient 25628 until 270 days ago. | SELECT MAX(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 = 25628)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arte... | mimic_iii |
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... | 患者43179204有哪些检验报告的结果指标全部正常?看看这些检验报告的单号 | SELECT jybgb.BGDH 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_37 (
pts INTEGER,
engine VARCHAR,
year VARCHAR
) | How many points have an Engine of ferrari tipo 033 v6 tc, and a Year larger than 1987? | SELECT SUM(pts) FROM table_name_37 WHERE engine = "ferrari tipo 033 v6 tc" AND year > 1987 | sql_create_context |
CREATE TABLE table_204_495 (
id number,
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" number,
"scorers" text
) | who was the opponent in the first game of the season ? | SELECT "opponent" FROM table_204_495 ORDER BY "date" LIMIT 1 | squall |
CREATE TABLE table_8039 (
"Year started" real,
"Number of cars" real,
"Current car" text,
"Car #" real,
"Website" text
) | HOW MANY CARS HAD A CAR # SMALLER THAN 7 AND STARTED ON 2010? | SELECT "Number of cars" FROM table_8039 WHERE "Car #" < '7' AND "Year started" = '2010' | wikisql |
CREATE TABLE table_77791 (
"Goal" real,
"Date" text,
"Venue" text,
"Result" text,
"Competition" text
) | How many goals were scored on 21 Junio 2008? | SELECT COUNT("Goal") FROM table_77791 WHERE "Date" = '21 junio 2008' | wikisql |
CREATE TABLE table_name_36 (
land___sqmi__ INTEGER,
water__sqmi_ VARCHAR,
longitude VARCHAR,
ansi_code VARCHAR,
pop__2010_ VARCHAR
) | What is the sum of the land in sq mi with an ansi code less than 1036538, a 2010 population less than 42, a longitude greater than -99.442872, and more than 0.882 sq mi of water? | SELECT SUM(land___sqmi__) FROM table_name_36 WHERE ansi_code < 1036538 AND pop__2010_ < 42 AND longitude > -99.442872 AND water__sqmi_ > 0.882 | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | among patients diagnosed with icd9 code 7470, calculate the number of patients aged below 54. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "54" AND diagnoses.icd9_code = "7470" | mimicsql_data |
CREATE TABLE table_name_20 (
visitor VARCHAR,
record VARCHAR
) | Whose Visitor has a Record of 3 18? | SELECT visitor FROM table_name_20 WHERE record = "3–18" | sql_create_context |
CREATE TABLE table_26368963_2 (
under_15 VARCHAR,
under_11 VARCHAR
) | Who is every Under-15 if Under-11 is Reeham Sedky? | SELECT under_15 FROM table_26368963_2 WHERE under_11 = "Reeham Sedky" | sql_create_context |
CREATE TABLE table_203_83 (
id number,
"ranking" number,
"company" text,
"industry" text,
"revenue (usd billions)" text,
"fy" text,
"capitalization (usd billions)" text,
"employees" number,
"listing" text,
"headquarters" text,
"ceo" text
) | how many companies have at least 200 billion in revenue for oil and gas ? | SELECT COUNT("company") FROM table_203_83 WHERE "revenue (usd billions)" > 200 AND "industry" = 'oil and gas' | squall |
CREATE TABLE table_name_18 (
date VARCHAR,
result VARCHAR
) | When was the match with a result of sa by 10 wkts? | SELECT date FROM table_name_18 WHERE result = "sa by 10 wkts" | sql_create_context |
CREATE TABLE table_name_54 (
longitude VARCHAR,
diameter__km_ VARCHAR
) | What shows for the Longitude when there is a Diameter (km) of 31km? | SELECT longitude FROM table_name_54 WHERE diameter__km_ = "31km" | sql_create_context |
CREATE TABLE table_52928 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | How many spectators watched when the away team was Collingwood? | SELECT "Crowd" FROM table_52928 WHERE "Away team" = 'collingwood' | wikisql |
CREATE TABLE table_1213511_5 (
player VARCHAR,
nationality VARCHAR,
pick__number VARCHAR
) | who is the player with the nationality of canada and pick # is 65? | SELECT player FROM table_1213511_5 WHERE nationality = "Canada" AND pick__number = 65 | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | 医疗费总额大于1413.96元的医疗记录在病人41843974身上有几次,在入院期间查出了什么编码和名称的病? | SELECT IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '41843974' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT > 1413.96) | css |
CREATE TABLE table_204_191 (
id number,
"title" text,
"artist" text,
"year" text,
"location/gps coordinates" text,
"material" text,
"dimensions" text,
"owner" text
) | which artist is listed next after charles grafly ? | SELECT "artist" FROM table_204_191 WHERE id = (SELECT id FROM table_204_191 WHERE "artist" = 'charles grafly') + 1 | squall |
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... | Comments on a given post. | SELECT c.Id AS "comment_link", c.Text, c.CreationDate, c.UserId AS "user_link", c.PostId AS "post_link" FROM Comments AS c WHERE c.PostId = '##postid##' ORDER BY CreationDate | sede |
CREATE TABLE table_name_19 (
identifier VARCHAR,
frequency VARCHAR
) | what is the Identifier with 94.9 fm Frequency | SELECT identifier FROM table_name_19 WHERE frequency = "94.9 fm" | 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 ... | 之前,患者22973171有哪些异常情况? | SELECT * 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.BGDH WHERE hz_info.RYBH = '... | css |
CREATE TABLE table_204_140 (
id number,
"round" number,
"#" number,
"player" text,
"position" text,
"nationality" text,
"college/junior/club team (league)" text
) | there are the same number of centers as what other position on the team ? | SELECT "position" FROM table_204_140 WHERE "position" <> 'center' GROUP BY "position" HAVING COUNT(*) = (SELECT COUNT(*) FROM table_204_140 WHERE "position" = 'center') | squall |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | count the number of patients whose admission type is emergency and diagnosis long title is accidents occurring in other specified places. | 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 = "Accidents occurring in other specified places" | mimicsql_data |
CREATE TABLE table_51979 (
"Nat." text,
"Name" text,
"Moving to" text,
"Type" text,
"Transfer window" text,
"Transfer fee" text
) | What Transfer window that has a Transfer fee of free, with a Moving to of derby county? | SELECT "Transfer window" FROM table_51979 WHERE "Transfer fee" = 'free' AND "Moving to" = 'derby county' | wikisql |
CREATE TABLE table_name_77 (
attendance VARCHAR,
loss VARCHAR
) | What was the attendance when Nakamura (0-1) lost? | SELECT attendance FROM table_name_77 WHERE loss = "nakamura (0-1)" | sql_create_context |
CREATE TABLE table_204_696 (
id number,
"issue" number,
"volume" number,
"title" text,
"main feature story" text,
"first/early appearance story/stories" text,
"release date" text
) | what is the only title being released in dec 27 2013 ? | SELECT "title" FROM table_204_696 WHERE "release date" = '27 dec 2013' | squall |
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE weather (
date TEXT,
... | For those dates with a max temperature greater than or equal to 80, I want to know the number of days on the day of the week interval using a bar chart. | SELECT date, COUNT(date) FROM weather WHERE max_temperature_f >= 80 | nvbench |
CREATE TABLE table_name_10 (
decile VARCHAR,
authority VARCHAR,
roll VARCHAR
) | For a school with authority of state and a roll of 798, what is the decile? | SELECT decile FROM table_name_10 WHERE authority = "state" AND roll = 798 | sql_create_context |
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 lab (
subject_id text,
hadm_id text,
... | what is the number of patients less than 70 years who prefer spanish? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "SPAN" AND demographic.age < "70" | mimicsql_data |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | what is the number of patients whose insurance is medicaid and procedure icd9 code is 5459? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.icd9_code = "5459" | mimicsql_data |
CREATE TABLE table_39992 (
"Gill" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" text,
"Diameter (mi)" text
) | What is the Latitude when the Diameter (km) is 13km, and the Longitude is 72.9 e? | SELECT "Latitude" FROM table_39992 WHERE "Diameter (km)" = '13km' AND "Longitude" = '72.9° e' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.