context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_62536 (
"Opposing Teams" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
) | Which Venue has Against smaller than 6? | SELECT "Venue" FROM table_62536 WHERE "Against" < '6' | wikisql |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
... | Unanswered questions tagged with Visio (but not 'vision'). | WITH TargetTags AS (SELECT Tags.Id FROM Tags WHERE Tags.TagName LIKE '%visio%' AND NOT Tags.TagName LIKE '%vision%') SELECT Posts.Tags, Posts.Id, 'http://stackoverflow.com/questions/' + REPLACE(STR(Posts.Id), ' ', '') AS PostURL, Posts.Title, Posts.OwnerDisplayName, Posts.CreationDate, Posts.Body FROM Posts INNER JOIN ... | sede |
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
) | How old is the average person for each job Show bar chart, and rank total number from high to low order. | SELECT job, AVG(age) FROM Person GROUP BY job ORDER BY AVG(age) DESC | nvbench |
CREATE TABLE table_68061 (
"Goal #" real,
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
) | Name the score for 30 january 2013 | SELECT "Score" FROM table_68061 WHERE "Date" = '30 january 2013' | wikisql |
CREATE TABLE table_name_50 (
original_name VARCHAR,
location VARCHAR
) | What was the original name of the restaurant located in Orillia, ON? | SELECT original_name FROM table_name_50 WHERE location = "orillia, on" | sql_create_context |
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... | what were the top three procedures for patients 20s? | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 3 | eicu |
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cine... | Give me a pie to show the total number from different directed by. | SELECT Directed_by, COUNT(*) FROM film GROUP BY Directed_by | nvbench |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
... | among patients who were prescribed with warfarin, what are the four most frequently prescribed drugs at the same time, in the last year? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'warfarin' AND DATETIME(prescriptions.startdate, 'start of year') ... | mimic_iii |
CREATE TABLE table_name_57 (
wins VARCHAR,
top_5 VARCHAR,
top_10 VARCHAR,
cuts_made VARCHAR
) | How many Wins have a Top-10 smaller than 6, and Cuts made larger than 7, and a Top-5 of 0? | SELECT COUNT(wins) FROM table_name_57 WHERE top_10 < 6 AND cuts_made > 7 AND top_5 = 0 | sql_create_context |
CREATE TABLE Allergy_type (
allergy VARCHAR
) | How many allergies are there? | SELECT COUNT(DISTINCT allergy) FROM Allergy_type | sql_create_context |
CREATE TABLE table_name_17 (
group_b VARCHAR,
group_e VARCHAR
) | What is the group B region with a Group E region of Georgia? | SELECT group_b FROM table_name_17 WHERE group_e = "georgia" | sql_create_context |
CREATE TABLE stock (
Shop_ID VARCHAR,
quantity INTEGER
)
CREATE TABLE shop (
Shop_Name VARCHAR,
Shop_ID VARCHAR
) | Show the name of the shop that have the largest quantity of devices in stock. | SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID = T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_name_14 (
record VARCHAR,
event VARCHAR
) | What is the record during the event, UFC 27? | SELECT record FROM table_name_14 WHERE event = "ufc 27" | sql_create_context |
CREATE TABLE reviewer (
rid number,
name text
)
CREATE TABLE rating (
rid number,
mid number,
stars number,
ratingdate time
)
CREATE TABLE movie (
mid number,
title text,
year number,
director text
) | Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year. | SELECT DISTINCT year FROM movie AS T1 JOIN rating AS T2 ON T1.mid = T2.mid WHERE T2.stars >= 4 ORDER BY T1.year | spider |
CREATE TABLE table_62466 (
"Parish (Prestegjeld)" text,
"Sub-Parish (Sokn)" text,
"Church Name" text,
"Year Built" text,
"Location of the Church" text
) | In which Parish (Prestegjeld) is the church called Stavang Kyrkje? | SELECT "Parish (Prestegjeld)" FROM table_62466 WHERE "Church Name" = 'stavang kyrkje' | wikisql |
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... | 从17年1月25日开始,直到19年12月2日的这段时间里,医院2498476给患者褚勇男开出的所有药的名字和编号 | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '褚勇男' AND qtb.MED_SER_ORG_NO = '2498476' AND qtb.IN_HOSP_DATE BETWEEN '2017-01-25' AND '2019-12-02' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '褚勇男'... | css |
CREATE TABLE table_68155 (
"Place" text,
"Name" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
) | What place in the United States has a To par of e? | SELECT "Place" FROM table_68155 WHERE "Country" = 'united states' AND "To par" = 'e' | wikisql |
CREATE TABLE table_1397655_1 (
year_acquired INTEGER,
station VARCHAR
) | how many is the minimum for citv | SELECT MIN(year_acquired) FROM table_1397655_1 WHERE station = "CITV" | sql_create_context |
CREATE TABLE table_name_64 (
lane INTEGER,
react VARCHAR,
nationality VARCHAR
) | what is the lowest lane when react is more than 0.164 and the nationality is guinea? | SELECT MIN(lane) FROM table_name_64 WHERE react > 0.164 AND nationality = "guinea" | sql_create_context |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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 ... | 列出患者秦浩然医疗记录中的入院诊断疾病编码和名称,主要针对医疗费总额不少于216.54元的 | SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '秦浩然' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 216.54) | css |
CREATE TABLE table_36717 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" text
) | What is the record of the game before week 5 and a bye game site? | SELECT "Record" FROM table_36717 WHERE "Week" < '5' AND "Game Site" = 'bye' | wikisql |
CREATE TABLE table_name_40 (
coaster_name VARCHAR,
year_opened VARCHAR,
track VARCHAR
) | What is the coaster name that was opened in 1978, and have wooden track? | SELECT coaster_name FROM table_name_40 WHERE year_opened = "1978" AND track = "wooden" | sql_create_context |
CREATE TABLE table_31749 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | Which stadium can hold 63,443 people? | SELECT "Result" FROM table_31749 WHERE "Attendance" = '63,443' | wikisql |
CREATE TABLE table_13636_1 (
first_operational VARCHAR,
programming VARCHAR
) | what's the first operational with programming being not programmable single purpose | SELECT first_operational FROM table_13636_1 WHERE programming = "Not programmable—single purpose" | 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... | count the number of patients whose days of hospital stay is greater than 5 and lab test name is iron? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "5" AND lab.label = "Iron" | mimicsql_data |
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amoun... | Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date, and count them by a bar chart, and rank y axis from low to high order. | SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) ORDER BY COUNT(Date_Claim_Made) | nvbench |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 查询在二零零六年一月五日二零一一年十二月三十日的这段时间里医院5091716有多少科室涉及的医疗费总额低于7482.56元 | 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 = '5091716' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-01-05' AND '2011-12-30' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) < 7482.56 UNION SELECT fgwyjzb.... | css |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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,
... | this year, what are the top five most common medications prescribed to patients in the same hospital visit after the prescription of d5 1/2ns? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate, admissions.hadm_id FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'd5 1/2ns' AND DATETIME(prescriptions.startdat... | mimic_iii |
CREATE TABLE table_2472711_32 (
average INTEGER,
total VARCHAR
) | What is the maximum average associated with a total of 221902? | SELECT MAX(average) FROM table_2472711_32 WHERE total = 221902 | 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,
... | 找出在医院7077773的就诊记录里范修然的记录,其中入院时科室名字要有药房的 | SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.person_info_XM = '范修然' AND hz_info.YLJGDM = '7077773' AND zyjzjlb.JZKSMC LIKE '%药房%' | css |
CREATE TABLE table_name_14 (
chassis VARCHAR,
driver VARCHAR,
tyre VARCHAR,
engine_† VARCHAR
) | what is the chassis when the tyre is b, the engine is ferrari 050 ferrari 051 and the driver is rubens barrichello? | SELECT chassis FROM table_name_14 WHERE tyre = "b" AND engine_† = "ferrari 050 ferrari 051" AND driver = "rubens barrichello" | sql_create_context |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
Last... | Count of posts by month. Simple count of posts by month | SELECT (TIME_TO_STR(p.CreationDate, '%Y') * 12) + TIME_TO_STR(p.CreationDate, '%m') AS yearmonth, COUNT(*) AS postcount FROM Posts AS p GROUP BY TIME_TO_STR(p.CreationDate, '%Y'), TIME_TO_STR(p.CreationDate, '%m') ORDER BY TIME_TO_STR(p.CreationDate, '%Y'), TIME_TO_STR(p.CreationDate, '%m') | sede |
CREATE TABLE table_1053802_1 (
winners VARCHAR,
local_title VARCHAR
) | How many winners are there of farma? | SELECT COUNT(winners) FROM table_1053802_1 WHERE local_title = "Farma" | sql_create_context |
CREATE TABLE wdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | 在2004年9月6日到2020年10月17日期间,7510294医疗机构的有多少新生儿门诊的就诊记录 | SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '7510294' AND wdmzjzjlb.JZKSRQ BETWEEN '2004-09-06' AND '2020-10-17' AND wdmzjzjlb.ZSEBZ > 0 UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '7510294' AND bdmzjzjlb.JZKSRQ BETWEEN '2004-09-06' AND '2020-10-17' AND bdmzjzjlb.ZSEBZ > 0 | css |
CREATE TABLE table_name_70 (
money___$__ VARCHAR,
score VARCHAR
) | What is the Money of the Player with a Score of 69-71-69-72=281? | SELECT money___$__ FROM table_name_70 WHERE score = 69 - 71 - 69 - 72 = 281 | sql_create_context |
CREATE TABLE field (
fieldid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE... | What is magda balazinska 's latest paper ? | SELECT DISTINCT writes.paperid FROM author, paper, writes WHERE author.authorname = 'magda balazinska' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid ORDER BY paper.year DESC | scholar |
CREATE TABLE table_name_79 (
year INTEGER,
college_country VARCHAR
) | What is the earliest year a Baylor player made the list? | SELECT MIN(year) FROM table_name_79 WHERE college_country = "baylor" | sql_create_context |
CREATE TABLE table_35593 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What team did the Heat play against at the TD Waterhouse Centre? | SELECT "Team" FROM table_35593 WHERE "Location Attendance" = 'td waterhouse centre' | wikisql |
CREATE TABLE table_12155 (
"Draft" real,
"Round" text,
"Pick" real,
"Player" text,
"Nationality" text
) | What is the lowest Pick, when Draft is less than 1991, and when Player is 'Tom Sasso Category:Articles with hCards'? | SELECT MIN("Pick") FROM table_12155 WHERE "Draft" < '1991' AND "Player" = 'tom sasso category:articles with hcards' | wikisql |
CREATE TABLE bridge (
architect_id int,
id int,
name text,
location text,
length_meters real,
length_feet real
)
CREATE TABLE architect (
id text,
name text,
nationality text,
gender text
)
CREATE TABLE mill (
architect_id int,
id int,
location text,
name text,
... | Pie chart. what are the ids and names of the architects who built at least 3 bridges ? | SELECT T1.name, T1.id FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id | nvbench |
CREATE TABLE table_9805 (
"Date" text,
"Tournament" text,
"Winning score" text,
"Margin of victory" text,
"Runner(s)-up" text
) | What was the margin of victory when the runner-up was Janet Coles? | SELECT "Margin of victory" FROM table_9805 WHERE "Runner(s)-up" = 'janet coles' | wikisql |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugst... | has patient 021-95970 had any allergies in their current hospital visit? | SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-95970' AND patient.hospitaldischargetime IS NULL)) | eicu |
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... | 算一算医院5262038所有就诊的记录里面患者平均多大,按不同的科室和不一样的出院诊断来计算 | SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '5262038' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM | css |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE locations (
LOCATIO... | Please show me how many employees working on different countries using a bar chart, and could you display from low to high by the x axis please? | SELECT COUNTRY_NAME, COUNT(COUNTRY_NAME) FROM countries GROUP BY COUNTRY_NAME ORDER BY COUNTRY_NAME | nvbench |
CREATE TABLE table_38613 (
"Home (1st leg)" text,
"Home (2nd leg)" text,
"1st Leg" text,
"2nd leg" text,
"Aggregate" text
) | What was the 2nd leg score having an aggregate score of 4-2? | SELECT "2nd leg" FROM table_38613 WHERE "Aggregate" = '4-2' | 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 the maximum age of the patients whose marital status is single and were born after 2095? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.dob_year > "2095" | mimicsql_data |
CREATE TABLE table_train_109 (
"id" int,
"serum_potassium" float,
"systolic_blood_pressure_sbp" int,
"body_mass_index_bmi" float,
"hypertension" bool,
"NOUSE" float
) | systolic bp >= 170 mmhg | SELECT * FROM table_train_109 WHERE systolic_blood_pressure_sbp >= 170 | criteria2sql |
CREATE TABLE table_24172157_3 (
team VARCHAR,
incoming_manager VARCHAR
) | What team has an incoming manager named Kenny Dalglish? | SELECT team FROM table_24172157_3 WHERE incoming_manager = "Kenny Dalglish" | sql_create_context |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE days (
days_code varchar,
... | morning flights out of SAN FRANCISCO arriving BOSTON afternoon | 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 (((flight.arrival_time <= 1800 AND flight.arrival_time >= 1200) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.to_... | atis |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Badges... | Obtaining closed questions on Worldbuilding Meta. | SELECT * FROM Posts WHERE NOT ClosedDate IS NULL | sede |
CREATE TABLE table_13394 (
"Rank" real,
"Name" text,
"1st run" text,
"2nd run" text,
"3rd run" text,
"Total" real
) | Who had a 2nd run of 39.296 (5)? | SELECT "Name" FROM table_13394 WHERE "2nd run" = '39.296 (5)' | wikisql |
CREATE TABLE table_40513 (
"Date" real,
"Doubles, I Class" real,
"Doubles, II Class" real,
"Greater Doubles" real,
"Doubles" real,
"Semidoubles" real,
"Total" real
) | What is the lowest Greater Doubles, when Doubles, I Class is 23, and when Doubles, II Class is less than 27? | SELECT MIN("Greater Doubles") FROM table_40513 WHERE "Doubles, I Class" = '23' AND "Doubles, II Class" < '27' | wikisql |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE patients (
... | has patient 25628 received a albumin lab in 01/this year? | SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'albumin') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25628) AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME()... | mimic_iii |
CREATE TABLE table_3780 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Decision" text,
"Location/Attendance" text,
"Record" text
) | If the opponent was the Philadelphia flyers, what was the record? | SELECT "Record" FROM table_3780 WHERE "Opponent" = 'Philadelphia Flyers' | wikisql |
CREATE TABLE table_name_96 (
opponent VARCHAR,
tv_time VARCHAR
) | Which opponent had a bye for the TV Time? | SELECT opponent FROM table_name_96 WHERE tv_time = "bye" | sql_create_context |
CREATE TABLE table_16799784_11 (
latitude VARCHAR,
name VARCHAR
) | At what latitude can the name origin of naijok fossae be found? | SELECT latitude FROM table_16799784_11 WHERE name = "Naijok Fossae" | 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 SUM(t_kc24.PER_ACC_PAY) 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.PERSON_NM = '花新梅' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2005-06-16' AND '2021-08-24' | css |
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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CR... | what is the four event that is frequent in the output? | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT outputevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM outputevents GROUP BY outputevents.itemid) AS t1 WHERE t1.c1 <= 4) | mimic_iii |
CREATE TABLE table_203_58 (
id number,
"airline" text,
"airline (in russian)" text,
"licence #" number,
"icao" text,
"iata" text,
"domestic code" text,
"callsign" text,
"photo" text
) | which airline has air sakha as its call sign ? | SELECT "airline" FROM table_203_58 WHERE "callsign" = 'air sakha' | squall |
CREATE TABLE table_502 (
"Season" text,
"Competition" text,
"Round" text,
"Club" text,
"1st leg" text,
"2nd leg" text,
"Aggregate" text
) | What is the competition when 2nd leg is 0 8? | SELECT "Competition" FROM table_502 WHERE "2nd leg" = '0–8' | 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 admission location and primary disease of subject id 18480? | SELECT demographic.admission_location, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "18480" | mimicsql_data |
CREATE TABLE fzzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZD... | 二零零五年五月十一日到二零二一年十月二十七日,患者苗乐池去4321914医疗机构挂过几次门诊 | SELECT COUNT(*) FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '苗乐池' AND zzmzjzjlb.JZKSRQ BETWEEN '2005-05-11' AND '2021-10-27' AND zzmzjzjlb.YLJGDM = '4321914' UNI... | css |
CREATE TABLE table_name_75 (
drawn VARCHAR,
goals_against VARCHAR,
lost VARCHAR
) | What is the total number drawn with goals against less than 55, and a total of 14 losses? | SELECT COUNT(drawn) FROM table_name_75 WHERE goals_against < 55 AND lost = 14 | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellv... | what is first weight of patient 027-120551 since 90 months ago. | SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-120551') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-90 month') ORDER BY patient.unit... | eicu |
CREATE TABLE fgwyjzb (
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,
... | 自06年6月26至07年10月24日患者葛学民买西药的次数 | SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '葛学民' AND t_kc22.STA_DATE BETWEEN '2006-06-26' AND '2007-10-24' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjz... | css |
CREATE TABLE table_train_227 (
"id" int,
"gender" string,
"diabetic" string,
"allergic_to_study_products" bool,
"hba1c" float,
"a1c" float,
"age" float,
"NOUSE" float
) | male 35 _ 70 years old | SELECT * FROM table_train_227 WHERE gender = 'male' AND age >= 35 AND age <= 70 | criteria2sql |
CREATE TABLE table_name_40 (
week INTEGER,
date VARCHAR
) | What is the latest week with the date of november 5, 1995? | SELECT MAX(week) FROM table_name_40 WHERE date = "november 5, 1995" | sql_create_context |
CREATE TABLE table_14240688_1 (
playoffs VARCHAR,
open_cup VARCHAR
) | Name the playoffs for 2nd round open cup | SELECT playoffs FROM table_14240688_1 WHERE open_cup = "2nd Round" | sql_create_context |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId numb... | votes between 2014-05 to 2014-10. | SELECT * FROM Votes WHERE CreationDate >= '2014-05-01' AND CreationDate < '2014-10-01' AND NOT UserId IS NULL ORDER BY Id | sede |
CREATE TABLE table_name_46 (
constructor VARCHAR,
winning_driver VARCHAR,
race VARCHAR
) | What was the constructor when Jack Brabham was the driver at the Monaco Grand Prix? | SELECT constructor FROM table_name_46 WHERE winning_driver = "jack brabham" AND race = "monaco grand prix" | sql_create_context |
CREATE TABLE table_22148 (
"English name" text,
"Thai name" text,
"Transcription" text,
"Color" text,
"Sanskrit word" text,
"Planet" text
) | Which planet has the transcription of wan suk? | SELECT "Planet" FROM table_22148 WHERE "Transcription" = 'wan suk' | wikisql |
CREATE TABLE table_4359 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | What is the average week on November 7, 1976 with an attendance less than 46,735? | SELECT AVG("Week") FROM table_4359 WHERE "Date" = 'november 7, 1976' AND "Attendance" < '46,735' | wikisql |
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,
spec_type_desc text,
org_name text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_... | how many patients since 1 year ago received opn aortic valvuloplasty two times? | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'opn aortic valvulopla... | mimic_iii |
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 diagnoses (
... | How many patients below 67 years of age have stayed in the hospital for more than 34 days? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "67" AND demographic.days_stay > "34" | mimicsql_data |
CREATE TABLE table_1348246_3 (
mechanical VARCHAR,
regulating VARCHAR
) | What mechanical has lpm regulation? | SELECT mechanical FROM table_1348246_3 WHERE regulating = "LPM" | sql_create_context |
CREATE TABLE table_60090 (
"Country" text,
"Region" text,
"FHFreepressreport" text,
"RWB Pressfreedomindex" text,
"Internetlists" text,
"ONIpoliticalfiltering" text,
"ONIsocialfiltering" text,
"ONIsecurityfiltering" text,
"ONItoolsfiltering" text
) | The country of Laos is in what region? | SELECT "Region" FROM table_60090 WHERE "Country" = 'laos' | wikisql |
CREATE TABLE procedures (
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
)
... | provide the number of emergency hospital admission patients who have been diagnosed with unspecified malignant neoplasm of tongue. | 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.short_title = "Malig neo tongue NEC" | mimicsql_data |
CREATE TABLE table (
weight VARCHAR,
market_name VARCHAR
) | If the market name is Xperia U, what is the weight? | SELECT weight FROM table WHERE market_name = "Xperia U" | sql_create_context |
CREATE TABLE table_name_24 (
points VARCHAR,
wins INTEGER
) | How many Points has Wins larger than 0? | SELECT COUNT(points) FROM table_name_24 WHERE wins > 0 | sql_create_context |
CREATE TABLE table_22595 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text
) | What is the production code for episode 6 in the season? | SELECT "Production code" FROM table_22595 WHERE "No. in season" = '6' | wikisql |
CREATE TABLE table_77534 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | Who was the visiting team at the game when the Canadiens had a record of 30 19 9? | SELECT "Visitor" FROM table_77534 WHERE "Record" = '30–19–9' | wikisql |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varc... | what flights are available from DALLAS to ATLANTA with one way economy fares | 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, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND fare_basis.economy = 'YES' AND fare.fare_basi... | atis |
CREATE TABLE table_54442 (
"Party" text,
"Results 2004" text,
"CSA 5/14/09" text,
"Viavoice 5/15/09" text,
"Ifop- La Croix 5/15/09" text,
"Ipsos 5/16/09" text,
"OpinionWay 5/18/09" text,
"CSA 5/20/09" text,
"Ipsos 5/25/09" text,
"TNS-Sofres 5/26/09" text,
"OpinionWay 5/28/09"... | Which Ipsos 5/16/09 has a TNS-Sofres 5/28/09 of 2.5%? | SELECT "Ipsos 5/16/09" FROM table_54442 WHERE "TNS-Sofres 5/28/09" = '2.5%' | wikisql |
CREATE TABLE table_name_78 (
name VARCHAR,
city VARCHAR,
years_as_tallest VARCHAR
) | What is the name of the building that was the tallest from 1990 1997 in Frankfurt? | SELECT name FROM table_name_78 WHERE city = "frankfurt" AND years_as_tallest = "1990–1997" | sql_create_context |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
... | AA flights from CINCINNATI to SALT LAKE CITY | 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 = 'SALT LAKE CITY' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name =... | atis |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
sc... | Are there any courses in Synthesis and Characterization that satisfy the ULCS requirement ? | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Synthesis and Characterization%' OR course.description LIKE '%Synthesis and Characterization%' O... | advising |
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,
... | 计算药品的数量与单价在医疗费用明细记录11391558299中的乘积是多大? | SELECT t_kc22.QTY * t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_EXP_DET_ID = '11391558299' | css |
CREATE TABLE department (
Department_ID int,
Name text,
Creation text,
Ranking int,
Budget_in_Billions real,
Num_Employees real
)
CREATE TABLE head (
head_ID int,
name text,
born_state text,
age real
)
CREATE TABLE management (
department_ID int,
head_ID int,
tempor... | Show the average age of heads of departments born in each state with a bar chart, list by the X-axis in desc. | SELECT born_state, AVG(age) FROM head GROUP BY born_state ORDER BY born_state DESC | nvbench |
CREATE TABLE table_24619 (
"Week" real,
"Date" text,
"Opponent" text,
"Location" text,
"Final Score" text,
"Attendance" real,
"Record" text
) | How many people were present at the July 10 game? | SELECT "Attendance" FROM table_24619 WHERE "Date" = 'July 10' | wikisql |
CREATE TABLE table_7309 (
"Ballarat FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | How many total wins does Ballarat FL of East point have when the against is greater than 1000? | SELECT COUNT("Wins") FROM table_7309 WHERE "Ballarat FL" = 'east point' AND "Against" > '1000' | wikisql |
CREATE TABLE artist (
artist_id number,
artist text,
age number,
famous_title text,
famous_release_date text
)
CREATE TABLE volume (
volume_id number,
volume_issue text,
issue_date text,
weeks_on_top number,
song text,
artist_id number
)
CREATE TABLE music_festival (
id... | What is the issue date of the volume with the minimum weeks on top? | SELECT issue_date FROM volume ORDER BY weeks_on_top LIMIT 1 | spider |
CREATE TABLE table_58849 (
"Year" real,
"Manufacturer" text,
"Start" real,
"Finish" real,
"Team" text
) | WHAT WAS THE FINISH NUMBER WITH A START SMALLER THAN 20 IN 1969? | SELECT COUNT("Finish") FROM table_58849 WHERE "Start" < '20' AND "Year" = '1969' | wikisql |
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
) | Find the number of different products that are produced by companies at different headquarter cities Plot them as bar chart, and could you order by the Y-axis in desc please? | SELECT Headquarter, COUNT(DISTINCT T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code ORDER BY COUNT(DISTINCT T1.Name) DESC | nvbench |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE requirement (... | Tell me the differences between ARABIC 600 and ARABIC 101 . | SELECT DISTINCT department, description, number FROM course WHERE (department = 'ARABIC' AND number = 600) OR (department = 'ARABIC' AND number = 101) | advising |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodici... | calculate the number of times patient 007-2498 had a surgical drain, tube output: drainage bag-closed s until 265 days ago. | SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-2498')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.cel... | eicu |
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, show me about the distribution of name and manufacturer , and group by attribute headquarter in a bar chart. | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name | nvbench |
CREATE TABLE publication (
Book_ID VARCHAR,
Price INTEGER
)
CREATE TABLE book (
Writer VARCHAR,
Book_ID VARCHAR
) | Show writers who have published a book with price more than 4000000. | SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID = T2.Book_ID WHERE T2.Price > 4000000 | 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... | tell me the number of urgent hospital admission patients who have been diagnosed with retained plastic fragments. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "URGENT" AND diagnoses.long_title = "Retained plastic fragments" | mimicsql_data |
CREATE TABLE table_9297 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | Which Rank has a Total larger than 30, and a Bronze of 14? | SELECT AVG("Rank") FROM table_9297 WHERE "Total" > '30' AND "Bronze" = '14' | wikisql |
CREATE TABLE table_69523 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text
) | How many points for did Bridgend Athletic RFC score? | SELECT "Points for" FROM table_69523 WHERE "Club" = 'bridgend athletic rfc' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.