context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | provide the number of patients whose primary disease is left colon cancer and year of death is less than or equal to 2133? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LEFT COLON CANCER" AND demographic.dod_year <= "2133.0" | mimicsql_data |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicationid number,
pat... | what were the five most frequent diagnosis? | SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 5 | eicu |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | Show school id vs all_games_percent as scatter plot use a different color for each ACC_Regular_Season | SELECT School_ID, All_Games_Percent FROM basketball_match GROUP BY ACC_Regular_Season | nvbench |
CREATE TABLE table_5325 (
"Bullet weight gram (grain)" text,
"8.23 g (127 gr)" real,
"9.72 g (150 gr)" real,
"11.34 g (175 gr)" real,
"12.96 g (200 gr)" real,
"14.26 g (220 gr)" real,
"Case capacity (%)" real
) | Which 9.72 g (150 gr) has a Bullet weight gram (grain) of .325 wsm, and an 8.23 g (127 gr) smaller than 108.7? | SELECT AVG("9.72 g (150 gr)") FROM table_5325 WHERE "Bullet weight gram (grain)" = '.325 wsm' AND "8.23 g (127 gr)" < '108.7' | wikisql |
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... | 陶梦秋病人做的下肢各项指标的检验情况咋样 | SELECT * FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | 在医院8127400中列出患者25092297就诊科室名称包含儿的所有门诊就诊记录的流水号都是啥啊? | SELECT zzmzjzjlb.JZLSH FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '25092297' AND hz_info.YLJGDM = '8127400' AND zzmzjzjlb.JZKSMC LIKE '%儿%' UNION SELECT fzzmzjzjlb.JZLSH FROM hz_info JOIN fzzmzjzjlb ON hz_info.YLJGD... | css |
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 name in a bar chart, and I want to rank y axis in asc order. | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Manufacturer | nvbench |
CREATE TABLE table_name_77 (
attendance VARCHAR,
week VARCHAR
) | What was the attendance total for week 10? | SELECT attendance FROM table_name_77 WHERE week = 10 | 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 hz_info (
KH text,
KLX number... | 患者秦茉莉在门诊诊断为疾病O29.001时的二氧化碳结果定量及单位分别是多少? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
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 ti... | how many days has it been since patient 83182 alendronate sodium was first prescribed in the current hospital encounter? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', prescriptions.startdate)) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 83182 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'alendronate sodium' ORDER BY prescriptions.st... | mimic_iii |
CREATE TABLE table_67057 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | Which opponent has a Date of july 27? | SELECT "Opponent" FROM table_67057 WHERE "Date" = 'july 27' | wikisql |
CREATE TABLE table_226619_12 (
pos INTEGER,
club VARCHAR
) | Name the most pos for west bromwich albion club | SELECT MAX(pos) FROM table_226619_12 WHERE club = "West Bromwich Albion" | sql_create_context |
CREATE TABLE table_name_13 (
tropical_lows INTEGER,
season VARCHAR,
tropical_cyclones VARCHAR
) | What is the largest number for tropical Lows for the 1990 91 season with more than 10 tropical cyclones? | SELECT MAX(tropical_lows) FROM table_name_13 WHERE season = "1990–91" AND tropical_cyclones > 10 | sql_create_context |
CREATE TABLE table_23568 (
"English Name" text,
"Simplified" text,
"Traditional" text,
"Pinyin" text,
"Foochow" text,
"Area" real,
"Population" real,
"Density" real
) | Name the english name for | SELECT "English Name" FROM table_23568 WHERE "Traditional" = '福鼎市' | wikisql |
CREATE TABLE table_name_95 (
location_attendance VARCHAR,
record VARCHAR
) | What is the location/attendance with a 26-11 record? | SELECT location_attendance FROM table_name_95 WHERE record = "26-11" | sql_create_context |
CREATE TABLE table_71264 (
"Year" real,
"Manufacturer" text,
"Start" text,
"Finish" text,
"Team" text
) | What team has 33 starts? | SELECT "Team" FROM table_71264 WHERE "Start" = '33' | wikisql |
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
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | what is the ingesting method of nicotine lozenge? | SELECT DISTINCT prescriptions.route FROM prescriptions WHERE prescriptions.drug = 'nicotine lozenge' | mimic_iii |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE date_day (
month_number int,
d... | ground transportation MINNEAPOLIS | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'MINNEAPOLIS' AND ground_service.city_code = city.city_code | atis |
CREATE TABLE table_20522228_2 (
rank__overall_ VARCHAR,
viewers__millions_ VARCHAR
) | What is overall rank when viewers are at 6.59 million? | SELECT rank__overall_ FROM table_20522228_2 WHERE viewers__millions_ = "6.59" | sql_create_context |
CREATE TABLE table_63041 (
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
) | What is the highest heat of the athlete from spain with a lane less than 7? | SELECT MAX("Heat") FROM table_63041 WHERE "Nationality" = 'spain' AND "Lane" < '7' | wikisql |
CREATE TABLE table_2243 (
"English name" text,
"Thai name" text,
"Abbr." text,
"Transcription" text,
"Sanskrit word" text,
"Zodiac sign" text
) | What's the Sanskrit word for month with Thai name ? | SELECT "Sanskrit word" FROM table_2243 WHERE "Thai name" = 'มกราคม' | wikisql |
CREATE TABLE table_name_31 (
titles INTEGER
) | What is the total number of 3rd place finishes for racers with 0 titles? | SELECT SUM(3 AS rd_pl) FROM table_name_31 WHERE titles < 0 | sql_create_context |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | From the total number of patients treated with acetylcysteine 20%, calculate the number of those who had a hospital stay of more than 8 days | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "8" AND prescriptions.drug = "Acetylcysteine 20%" | mimicsql_data |
CREATE TABLE table_40899 (
"Class" text,
"Type" text,
"Built" text,
"Number" real,
"Withdrawn" real
) | What is the sum of numbers that had a type of Driving Van Trailer? | SELECT SUM("Number") FROM table_40899 WHERE "Type" = 'driving van trailer' | wikisql |
CREATE TABLE table_name_30 (
year_started INTEGER,
number_of_cars VARCHAR,
car__number VARCHAR
) | Which Year started is the lowest one that has a Number of cars larger than 7, and a Car # of 100? | SELECT MIN(year_started) FROM table_name_30 WHERE number_of_cars > 7 AND car__number = "100" | sql_create_context |
CREATE TABLE table_1756264_2 (
description_of_activities VARCHAR,
company_name VARCHAR
) | What activities does Clear Channel Entertainment Facilitation Limited engage in? | SELECT description_of_activities FROM table_1756264_2 WHERE company_name = "CLEAR CHANNEL ENTERTAINMENT FACILITATION LIMITED" | sql_create_context |
CREATE TABLE table_29454 (
"University" text,
"Varsity Name" text,
"City" text,
"Province" text,
"Founded" real,
"Soccer Stadium" text,
"Stadium Capacity" real
) | What is the province where the soccer statium is terrain #2 of complexe sportif claude-robillard? | SELECT "Province" FROM table_29454 WHERE "Soccer Stadium" = 'terrain #2 of Complexe sportif Claude-Robillard' | wikisql |
CREATE TABLE table_name_67 (
date VARCHAR,
winner VARCHAR,
result VARCHAR
) | What date was the winner the new york jets and a Result of 30 28? | SELECT date FROM table_name_67 WHERE winner = "new york jets" AND result = "30–28" | sql_create_context |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
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,
... | Give me the comparison about the average of meter_100 over the Nationality , and group by attribute Nationality by a bar chart, display in asc by the Nationality. | SELECT Nationality, AVG(meter_100) FROM swimmer GROUP BY Nationality ORDER BY Nationality | nvbench |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | Find the total student enrollment for different affiliation type schools Plot them as bar chart, display by the sum enrollment from low to high. | SELECT Affiliation, SUM(Enrollment) FROM university GROUP BY Affiliation ORDER BY SUM(Enrollment) | nvbench |
CREATE TABLE election (
election_id number,
counties_represented text,
district number,
delegate text,
party number,
first_elected number,
committee text
)
CREATE TABLE party (
party_id number,
year number,
party text,
governor text,
lieutenant_governor text,
comptro... | Show the county name and population of all counties. | SELECT county_name, population FROM county | spider |
CREATE TABLE table_78701 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text
) | What is re-elected Incumbent Jerry Costello's First elected date? | SELECT MIN("First elected") FROM table_78701 WHERE "Results" = 're-elected' AND "Incumbent" = 'jerry costello' | wikisql |
CREATE TABLE table_27632 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" real,
"Position" text
) | Name the least podiums for 9th position | SELECT MIN("Podiums") FROM table_27632 WHERE "Position" = '9th' | wikisql |
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
) | What is the total number of every ship type by categorizing by nationality?, and could you sort in desc by the the number of type please? | SELECT Type, COUNT(Type) FROM ship GROUP BY Nationality, Type ORDER BY COUNT(Type) DESC | nvbench |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE compartment_class (
... | please give me a list of flights leaving BOSTON going to PITTSBURGH | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBU... | atis |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | 列出对于窦秀隽病患就医记录中医疗费总额不少于5504.26元的入院诊断疾病名称和编号都分别是啥? | SELECT IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_NM = '窦秀隽' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT >= 5504.26) | css |
CREATE TABLE table_77126 (
"Date" text,
"Opponent#" text,
"Site" text,
"Result" text,
"Attendance" text
) | What is the Date when the result is *non-conference game. #rankings from ap poll .? | SELECT "Date" FROM table_77126 WHERE "Result" = '*non-conference game. #rankings from ap poll .' | wikisql |
CREATE TABLE Staff (
staff_id INTEGER,
staff_gender VARCHAR(1),
staff_name VARCHAR(80)
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER
)
CREATE TABLE Customer_Orders (
order_id INTEGER,
customer_id INTEGER,
order_status_code VARCHAR(10),
... | What is the highest price of product, grouped by product type? Show a bar chart, and order names from low to high order. | SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code ORDER BY product_type_code | nvbench |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
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... | 在2012年9月17日到2021年6月15日内84842097患者被开出的所有检验报告单的检验报告单号一共都有哪些? | SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info JOIN person_info 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 person_info_hz_info.KH = hz_info.KH AND pers... | css |
CREATE TABLE table_204_451 (
id number,
"component" text,
"model 01" text,
"model 01+" text,
"model 02" text,
"model e2" text,
"model 2+ (pre-production)" text,
"model 03 (china copy)" text
) | the model 2 and the model 2e have what type of cpu ? | SELECT "model 02" FROM table_204_451 WHERE "component" = 'cpu' | squall |
CREATE TABLE table_name_82 (
home VARCHAR,
visitor VARCHAR,
series VARCHAR
) | What is the Home with a Visitor of chicago, and a Series with 3 2? | SELECT home FROM table_name_82 WHERE visitor = "chicago" AND series = "3 – 2" | sql_create_context |
CREATE TABLE table_56583 (
"Unit" text,
"Complement" text,
"Killed" text,
"Wounded" text,
"Missing" text
) | What was the number of Personal Staff Units Killed? | SELECT "Killed" FROM table_56583 WHERE "Unit" = 'personal staff' | wikisql |
CREATE TABLE film (
Film_ID int,
Title text,
Studio text,
Director text,
Gross_in_dollar int
)
CREATE TABLE film_market_estimation (
Estimation_ID int,
Low_Estimate real,
High_Estimate real,
Film_ID int,
Type text,
Market_ID int,
Year int
)
CREATE TABLE market (
Mar... | Plot a scatter chart, low estimate by high_estimate. | SELECT Low_Estimate, High_Estimate FROM film_market_estimation | nvbench |
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 code , and group by attribute headquarter, and could you sort in desc by the Name? | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name DESC | nvbench |
CREATE TABLE table_37712 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team" text
) | What college, junior, or club team did defence player Rory Fitzpatrick play for? | SELECT "College/Junior/Club Team" FROM table_37712 WHERE "Position" = 'defence' AND "Player" = 'rory fitzpatrick' | wikisql |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | is there an afternoon flight from CHARLOTTE to MINNEAPOLIS around 2pm | 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.departure_time <= 1430 AND flight.departure_time >= 1330) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MINNEAPOLIS' AND f... | atis |
CREATE TABLE attribute_definitions (
attribute_id number,
attribute_name text,
attribute_data_type text
)
CREATE TABLE catalogs (
catalog_id number,
catalog_name text,
catalog_publisher text,
date_of_publication time,
date_of_latest_revision time
)
CREATE TABLE catalog_contents_additio... | Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID. | SELECT t1.attribute_name, t1.attribute_id FROM attribute_definitions AS t1 JOIN catalog_contents_additional_attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0 | spider |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | how many days has it been since patient 016-9636 first received an intake of ns on the current icu visit? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =... | eicu |
CREATE TABLE table_204_147 (
id number,
"#" number,
"date" text,
"opponent" text,
"score" text,
"win" text,
"loss" text,
"save" text,
"attendance" number,
"record" text
) | what is the difference in attendance between the game on july 7th and the game on july 8th ? | SELECT ABS((SELECT "attendance" FROM table_204_147 WHERE "date" = 'july 7') - (SELECT "attendance" FROM table_204_147 WHERE "date" = 'july 8')) | squall |
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... | 患者蒋飞白在医疗机构4684405的既往病历里开的西药有多少,时间是从00年4月18日到06年8月4日 | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '蒋飞白' AND t_kc22.STA_DATE BETWEEN '2000-04-18' AND '2006-08-04' AND t_kc22.t_kc21_MED_SER_ORG_NO = '4684405' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE player_college (
player_id TEXT,
college_id TEXT,
year INTEGER
)
CREATE TABLE batting (
player_id TEXT,
year INTEGER,
stint INTEGER,
team_id TEXT,
league_id TEXT,
g INTEGER,
ab NUMERIC,
r NUMERIC,
h NUMERIC,
double NUMERIC,
triple NUMERIC,
hr NUM... | Show the trend about the average of the number of attendance at home games change over the years, bin year into year interval, sort x axis from high to low order. | SELECT year, AVG(attendance) FROM home_game ORDER BY year DESC | nvbench |
CREATE TABLE table_name_84 (
laps VARCHAR,
time_retired VARCHAR
) | How many laps have a Time/Retired of +1:35.553? | SELECT COUNT(laps) FROM table_name_84 WHERE time_retired = "+1:35.553" | sql_create_context |
CREATE TABLE table_name_35 (
tournament VARCHAR,
date VARCHAR
) | What is the name of the tournament played 13 November 2000? | SELECT tournament FROM table_name_35 WHERE date = "13 november 2000" | sql_create_context |
CREATE TABLE table_203_175 (
id number,
"rank" text,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | what nation was next to great britain in total medal count ? | SELECT "nation" FROM table_203_175 WHERE "total" < (SELECT "total" FROM table_203_175 WHERE "nation" = 'great britain') ORDER BY "total" DESC LIMIT 1 | squall |
CREATE TABLE table_204_615 (
id number,
"date" text,
"opponent" text,
"result" text,
"goal scorers (season goals)" text,
"goalie saves" text,
"attendance" text
) | in which month were more games played - september or october ? | SELECT "date" FROM table_204_615 WHERE "date" IN (9, 10) GROUP BY "date" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE com... | Are there upper elective classes next semester that do not meet on Friday ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.friday = 'N' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'FA' ... | advising |
CREATE TABLE table_12446 (
"Mininera DFL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What draws are the lowest when wins are larger than 18? | SELECT MIN("Draws") FROM table_12446 WHERE "Wins" > '18' | wikisql |
CREATE TABLE video_games (
gameid number,
gname text,
gtype text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE plays_games (
stuid number,
gameid number,
hours_pla... | How many games are played for all football games by students on scholarship? | SELECT SUM(gamesplayed) FROM sportsinfo WHERE sportname = "Football" AND onscholarship = 'Y' | spider |
CREATE TABLE table_27756314_11 (
high_rebounds VARCHAR,
date VARCHAR
) | Who did the most high rebounds on April 6? | SELECT high_rebounds FROM table_27756314_11 WHERE date = "April 6" | sql_create_context |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | What class is hardest ? | SELECT DISTINCT course.name, course.number, program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MAX(PROGRAM_COURSEalias1.workload) FROM course AS COURSEalias1, program_course AS PROGRAM_COURSEalias1 WH... | advising |
CREATE TABLE table_36979 (
"Round" real,
"Pick #" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | What is the overall number of the player from Utah with a pick # higher than 7? | SELECT SUM("Overall") FROM table_36979 WHERE "College" = 'utah' AND "Pick #" < '7' | wikisql |
CREATE TABLE table_203_531 (
id number,
"date" text,
"tournament" text,
"location" text,
"winner" text,
"score" text,
"1st prize ($)" number
) | which tournament rewarded the most money for first prize ? | SELECT "tournament" FROM table_203_531 ORDER BY "1st prize ($)" DESC LIMIT 1 | squall |
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,
... | 通过患者在出院诊断中不同的疾病编码和所在的不同名称的科室,把医院1537137里的全部医疗就诊记录中患者的年龄平均数列出来是多些? | SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_CD, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1537137' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_CD | css |
CREATE TABLE table_78731 (
"Played" real,
"Drawn" real,
"Lost" real,
"Winning %" real,
"Tries" real,
"Conversions" real,
"Penalties" real,
"s Drop goal" real,
"Points total" real
) | What is the least number of penalties he got when his point total was over 1419 in more than 98 games? | SELECT MIN("Penalties") FROM table_78731 WHERE "Points total" = '1419' AND "Played" > '98' | 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... | Tell me the number of patients who died in or before 2174 and had drug code osel75. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2174.0" AND prescriptions.formulary_drug_cd = "OSEL75" | mimicsql_data |
CREATE TABLE table_name_21 (
injured VARCHAR,
country VARCHAR
) | What is Injured, when Country is 'Afghanistan'? | SELECT injured FROM table_name_21 WHERE country = "afghanistan" | sql_create_context |
CREATE TABLE table_41782 (
"Date" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Set 4" text,
"Set 5" text,
"Total" text
) | What is Set 1, when Date is Jun 26, and when Set 4 is 26-24? | SELECT "Set 1" FROM table_41782 WHERE "Date" = 'jun 26' AND "Set 4" = '26-24' | wikisql |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayNa... | Find Post Deletion Suspects. | SELECT Reputation, DisplayName FROM Users WHERE Reputation >= 20000 ORDER BY Reputation DESC, DisplayName | sede |
CREATE TABLE table_203_791 (
id number,
"represented" text,
"contestant" text,
"age" number,
"height" text,
"hometown" text
) | the tallest delegate | SELECT "contestant" FROM table_203_791 ORDER BY "height" DESC LIMIT 1 | squall |
CREATE TABLE artist (
Artist_ID VARCHAR,
Artist VARCHAR
)
CREATE TABLE volume (
Issue_Date VARCHAR,
Artist_ID VARCHAR
) | What are the issue dates of volumes associated with the artist 'Gorgoroth'? | SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID = T2.Artist_ID WHERE T1.Artist = "Gorgoroth" | sql_create_context |
CREATE TABLE table_name_60 (
date VARCHAR,
record VARCHAR
) | What was the date of the game with the record of 18 10 2? | SELECT date FROM table_name_60 WHERE record = "18–10–2" | sql_create_context |
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varchar(15),
STU_INIT varchar(1),
STU_DOB datetime,
STU_HRS int,
STU_CLASS varchar(2),
STU_GPA float(8),
STU_TRANSFER numeric,
DEPT_CODE varchar(18),
STU_PHONE varchar(4),
PROF_NUM int
)
CREATE TABLE EN... | How many students taking a course who received an A or C? Group by students' first name with a pie chart. | SELECT STU_FNAME, COUNT(STU_FNAME) FROM STUDENT AS T1 JOIN ENROLL AS T2 ON T1.STU_NUM = T2.STU_NUM WHERE T2.ENROLL_GRADE = 'C' OR T2.ENROLL_GRADE = 'A' GROUP BY STU_FNAME | nvbench |
CREATE TABLE table_29297 (
"Episode No. Episode No. refers to the episodes number in the overall series, whereas Series No. refers to the episodes number in this particular series." real,
"Series No." real,
"Episode" text,
"Director" text,
"Writer(s)" text,
"Original airdate" text
) | How many times did episode 17 originally air? | SELECT COUNT("Original airdate") FROM table_29297 WHERE "Episode No. Episode No. refers to the episodes number in the overall series, whereas Series No. refers to the episodes number in this particular series." = '17' | wikisql |
CREATE TABLE table_name_31 (
rowers VARCHAR,
time VARCHAR
) | Who are the Rowers with a Time of 6:39.49? | SELECT rowers FROM table_name_31 WHERE time = "6:39.49" | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE... | when did patient 31239 first have their maximum heart rate until 09/12/2104? | SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31239)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart ra... | mimic_iii |
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_dew_point_f INTEGER,
max_humidity INTEGER,
mean_humidity INTEGER,
min_humidity INTEGER,
max_sea_level_pre... | List the name and the number of stations for all the cities that have at least 15 stations. Show bar chart. | SELECT city, COUNT(*) FROM station GROUP BY city | nvbench |
CREATE TABLE table_name_1 (
rank VARCHAR,
silver VARCHAR,
nation VARCHAR
) | Which rank has more than 1 silver and a total nation? | SELECT rank FROM table_name_1 WHERE silver > 1 AND nation = "total" | 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 ... | 列出医院0629805接诊67921466这位患者住院期间的就诊记录里,出院科室名字包括化疗的所有记录 | SELECT * FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '67921466' AND hz_info.YLJGDM = '0629805' AND wdmzjzjlb.CYKSMC LIKE '%化疗%' UNION SELECT * FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_i... | 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 locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25... | For those employees who was hired before 2002-06-21, show me about the distribution of job_id and the average of salary , and group by attribute job_id in a bar chart, could you list the average of salary in desc order please? | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(SALARY) DESC | nvbench |
CREATE TABLE table_17325937_8 (
high_assists VARCHAR,
team VARCHAR
) | Who had the most assists in the game against Miami? | SELECT high_assists FROM table_17325937_8 WHERE team = "Miami" | sql_create_context |
CREATE TABLE table_name_68 (
founded INTEGER,
club VARCHAR,
titles VARCHAR
) | Which Founded has a Club of tri-city storm and a Titles larger than 1? | SELECT SUM(founded) FROM table_name_68 WHERE club = "tri-city storm" AND titles > 1 | sql_create_context |
CREATE TABLE table_name_9 (
uefa_champions_league INTEGER,
la_liga VARCHAR,
copa_del_rey VARCHAR
) | Which UEFA Champions League has a La Liga of 17, and a Copa del Rey larger than 0? | SELECT MIN(uefa_champions_league) FROM table_name_9 WHERE la_liga = 17 AND copa_del_rey > 0 | sql_create_context |
CREATE TABLE club (
Club_ID int,
name text,
Region text,
Start_year text
)
CREATE TABLE player (
Player_ID int,
name text,
Position text,
Club_ID int,
Apps real,
Tries real,
Goals text,
Points real
)
CREATE TABLE competition_result (
Competition_ID int,
Club_ID_... | Show me the number of country by country in a histogram, rank by the the number of country in desc. | SELECT Country, COUNT(Country) FROM competition GROUP BY Country ORDER BY COUNT(Country) DESC | nvbench |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | 在2020年11月21日之前患者郎灵韵都在什么门诊就诊记录中有对应的检验报告单?在门诊就诊的流水号都是啥? | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '郎灵韵' AND NOT mzjzjlb.JZLSH IN (SELECT JZLSH FROM jybgb WHERE BGRQ >= '2020-11-21') | css |
CREATE TABLE table_52056 (
"Ethnic group" text,
"Christian" text,
"Buddhist" text,
"Hindu" text,
"Jewish" text,
"Muslim" text,
"Sikh" text,
"Other" text,
"No religion" text,
"Not stated" text
) | Name the ethnic group with a buddhist of 0.19% | SELECT "Ethnic group" FROM table_52056 WHERE "Buddhist" = '0.19%' | wikisql |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
Rejectio... | Users who want the 404 polyglot back. | SELECT Id AS "user_link", AboutMe FROM Users WHERE (AboutMe LIKE '%404 polyglot%' OR AboutMe LIKE '%back the polyglot%') | sede |
CREATE TABLE table_23274514_9 (
score VARCHAR,
record VARCHAR
) | What was the score when the record was 22-53? | SELECT score FROM table_23274514_9 WHERE record = "22-53" | sql_create_context |
CREATE TABLE table_name_67 (
byes VARCHAR,
draws VARCHAR,
wins VARCHAR
) | What is the total number of byes associated with fewer than 8 wins and fewer than 1 draw? | SELECT COUNT(byes) FROM table_name_67 WHERE draws < 1 AND wins < 8 | 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... | 被门诊诊断的病人云思远患有躁狂抑郁性精神病当前为躁狂相的的检测指标350790的结果定量以及单位都是多少? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE table_37814 (
"Player" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
) | Which Points have Touchdowns larger than 0, and an Extra points smaller than 0? | SELECT SUM("Points") FROM table_37814 WHERE "Touchdowns" > '0' AND "Extra points" < '0' | wikisql |
CREATE TABLE table_24778847_2 (
link VARCHAR,
date_of_polling VARCHAR
) | What format is the link for the polling data for February 10 28, 2011? | SELECT link FROM table_24778847_2 WHERE date_of_polling = "February 10–28, 2011" | sql_create_context |
CREATE TABLE table_80197 (
"Codename" text,
"HDMI" text,
"Power Supply" text,
"In Production" text,
"Date Released" text
) | Does Trinity (valhalla) have HDMI? | SELECT "HDMI" FROM table_80197 WHERE "Codename" = 'trinity (valhalla)' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | have there been any microbiological other tests for patient 031-3355? | SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355')) AND microlab.culturesite = 'other' | eicu |
CREATE TABLE financial_transactions (
transaction_id number,
previous_transaction_id number,
account_id number,
card_id number,
transaction_type text,
transaction_date time,
transaction_amount number,
transaction_comment text,
other_transaction_details text
)
CREATE TABLE accounts (... | Return the id of the customer who has the most cards, as well as the number of cards. | SELECT customer_id, COUNT(*) FROM customers_cards GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1 | spider |
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... | 55587115这个患者之前有哪些门诊诊断记录 | SELECT zzmzjzjlb.JZZDBM, zzmzjzjlb.JZZDSM FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '55587115' UNION SELECT fzzmzjzjlb.JZZDBM, fzzmzjzjlb.JZZDSM FROM hz_info JOIN fzzmzjzjlb ON hz_info.YLJGDM = fzzmzjzjlb.YLJGDM AN... | css |
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
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 varc... | For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of job_id and the sum of department_id , and group by attribute job_id, rank bars in asc order. | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | how many of the patients on urgent admission received oral therapy? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "URGENT" AND prescriptions.route = "ORAL" | mimicsql_data |
CREATE TABLE table_name_20 (
attendance INTEGER,
opponent VARCHAR,
game VARCHAR
) | What is the attendance of the game against the New Orleans Saints before game 11? | SELECT AVG(attendance) FROM table_name_20 WHERE opponent = "new orleans saints" AND game < 11 | sql_create_context |
CREATE TABLE genre (
g_name text,
rating text,
most_popular_in text
)
CREATE TABLE song (
song_name text,
artist_name text,
country text,
f_id number,
genre_is text,
rating number,
languages text,
releasedate time,
resolution number
)
CREATE TABLE artist (
artist_na... | What are the names of the artists who sang the shortest song? | SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id = T2.f_id ORDER BY T2.duration LIMIT 1 | spider |
CREATE TABLE table_name_91 (
date VARCHAR,
visitor VARCHAR
) | When did San Jose visit the St. Louis? | SELECT date FROM table_name_91 WHERE visitor = "san jose" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.