context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_48 (
heat INTEGER,
time VARCHAR,
nationality VARCHAR
) | What was the highest heat with a time slower than 48.87 from sweden? | SELECT MAX(heat) FROM table_name_48 WHERE time > 48.87 AND nationality = "sweden" | sql_create_context |
CREATE TABLE table_name_26 (
country VARCHAR,
score VARCHAR
) | What is Country, when Score is 71-71-69=211? | SELECT country FROM table_name_26 WHERE score = 71 - 71 - 69 = 211 | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperio... | what has been the total amount of input patient 006-200601 received on 09/20/2104? | SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-200601')) AND intakeoutput.cellpath LIKE '%i... | eicu |
CREATE TABLE table_1198175_1 (
name VARCHAR,
born VARCHAR
) | What is the name when born is december 30, 1957 detroit, mi? | SELECT name FROM table_1198175_1 WHERE born = "December 30, 1957 Detroit, MI" | sql_create_context |
CREATE TABLE table_203_646 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
) | where was the last competition held according to this chart ? | SELECT "venue" FROM table_203_646 ORDER BY "year" DESC LIMIT 1 | squall |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate n... | how many hematological effect of infection - leukocytosis patients since 2104 were diagnosed during the same hospital encounter after being diagnosed with s/p thoracotomy - lung reduction surgery? | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hematological effect of infection - leukocytosis' AND STRFTIME('%y', diag... | eicu |
CREATE TABLE table_53782 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | How low was the attendance at the game that ended with a home team score of 16.13 (109)? | SELECT MIN("Crowd") FROM table_53782 WHERE "Home team score" = '16.13 (109)' | wikisql |
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... | Is there a 5 -credit Scandinavian Civilization course ? | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Scandinavian Civilization%' OR name LIKE '%Scandinavian Civilization%') AND credits = 5 | advising |
CREATE TABLE table_name_48 (
version VARCHAR,
length VARCHAR,
remixed_by VARCHAR
) | What is the version shown for the Length of 5:20, and shows Remixed by ? | SELECT version FROM table_name_48 WHERE length = "5:20" AND remixed_by = "—" | sql_create_context |
CREATE TABLE table_26621 (
"Reference" text,
"Author" text,
"Section Size" text,
"Violins" real,
"Violas" real,
"Celli" real,
"Basses" real
) | How many cellos are suggested in the reference with section size for 20 players? | SELECT "Celli" FROM table_26621 WHERE "Section Size" = '20 players' | wikisql |
CREATE TABLE table_72079 (
"Entered office as Head of State or Government" text,
"Began time as senior G8 leader" text,
"Ended time as senior G8 leader" text,
"Person" text,
"Office" text
) | When did the Prime Minister of Italy take office? | SELECT "Entered office as Head of State or Government" FROM table_72079 WHERE "Office" = 'Prime Minister of Italy' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,... | 沈雅懿患者的检验报告单对应的检验结果指标均异常都是哪些?列出对应的检验报告单号都是啥? | SELECT jybgb.BGDH 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 NOT ... | css |
CREATE TABLE table_name_13 (
venue VARCHAR,
home_team VARCHAR
) | Where was South Melbourne played? | SELECT venue FROM table_name_13 WHERE home_team = "south melbourne" | sql_create_context |
CREATE TABLE table_204_662 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"attendance" number,
"bye" text
) | what is the total number of points scored against the opponents for september ? | SELECT SUM("result") FROM table_204_662 WHERE "date" = 9 | squall |
CREATE TABLE table_name_59 (
to_par VARCHAR,
player VARCHAR
) | What is Justin Leonard's To par? | SELECT to_par FROM table_name_59 WHERE player = "justin leonard" | sql_create_context |
CREATE TABLE table_train_104 (
"id" int,
"migraines" bool,
"depression" bool,
"mini_mental_state_examination_mmse" int,
"systolic_blood_pressure_sbp" int,
"renal_disease" bool,
"alzheimer" bool,
"estimated_glomerular_filtration_rate_egfr" int,
"diastolic_blood_pressure_dbp" int,
... | sitting blood pressure > 160 / 100 mm hg. physician evaluation | SELECT * FROM table_train_104 WHERE systolic_blood_pressure_sbp >= 160 OR diastolic_blood_pressure_dbp >= 100 | criteria2sql |
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, visualize a bar chart about the distribution of name and the sum of code , and group by attribute name, could you show by the y-axis in descending? | SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code DESC | nvbench |
CREATE TABLE table_name_48 (
venue VARCHAR,
competition VARCHAR
) | What is the Venue of the 2002 World Cup Qualification? | SELECT venue FROM table_name_48 WHERE competition = "2002 world cup qualification" | sql_create_context |
CREATE TABLE table_30813 (
"Series #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | What is the episode series number of 'St. Joan'? | SELECT "Series #" FROM table_30813 WHERE "Title" = 'St. Joan' | wikisql |
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... | 在2004年6月24日到2014年6月10日这段时间里,编码为6291859的医院所有非异地结算的医疗就诊记录都是哪些? | SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '6291859' AND gwyjzb.IN_HOSP_DATE BETWEEN '2004-06-24' AND '2014-06-10' UNION SELECT * FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '6291859' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2004-06-24' AND '2014-06-10' EXCEPT SELECT * FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '629185... | css |
CREATE TABLE table_name_92 (
the_winner VARCHAR,
the_presenter VARCHAR
) | Who won when the presenter was Tatiana Stefanidou? | SELECT the_winner FROM table_name_92 WHERE the_presenter = "tatiana stefanidou" | sql_create_context |
CREATE TABLE table_204_707 (
id number,
"year" number,
"english title" text,
"chinese title" text,
"director" text,
"role" text
) | what was the first film zhao dan starred in ? | SELECT "english title" FROM table_204_707 ORDER BY "year" LIMIT 1 | squall |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
g... | Do you find that PSYCH 405 is more of a challenge than PSYCH 619 ? | SELECT COUNT(*) > 0 FROM course AS COURSE_0, course AS COURSE_1, program_course AS PROGRAM_COURSE_0, program_course AS PROGRAM_COURSE_1 WHERE COURSE_0.department = 'PSYCH' AND COURSE_0.number = 405 AND COURSE_1.department = 'PSYCH' AND COURSE_1.number = 619 AND PROGRAM_COURSE_0.course_id = COURSE_0.course_id AND PROGRA... | advising |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostFeedback (
Id number,
PostId numb... | The top 100 longest posts on the site. | SELECT Posts.Id AS "post_link", PostTypes.Name AS "type", LENGTH(Body) AS Length, OwnerUserId AS "userlink", CreationDate, Score FROM Posts JOIN PostTypes ON PostTypeId = PostTypes.Id ORDER BY Length DESC LIMIT 100 | sede |
CREATE TABLE dorm (
dormid number,
dorm_name text,
student_capacity number,
gender text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE lives_in (
stuid number,
dorm... | How many students are from each city, and which cities have more than one cities? | SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1 | spider |
CREATE TABLE table_6520 (
"Nation" text,
"Removal treaty (year signed)" text,
"Years of major emigration" text,
"Total number emigrated or forcibly removed" text,
"Number stayed in Southeast" text,
"Deaths from warfare" text
) | How many of those who stayed in the southeast had 19,600 emigrated or forcibly removed? | SELECT "Number stayed in Southeast" FROM table_6520 WHERE "Total number emigrated or forcibly removed" = '19,600' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 施弘益的患者在01年1月9日到2013年11月22日内被开出右佐匹克隆片的总共有几次呢? | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '施弘益' AND t_kc22.STA_DATE BETWEEN '2001-01-09' AND '2013-11-22' AND t_kc22.SOC_SRT_DIRE_NM = '右佐匹克隆片' | css |
CREATE TABLE table_name_67 (
home VARCHAR,
date VARCHAR
) | What home has February 10 as the date? | SELECT home FROM table_name_67 WHERE date = "february 10" | sql_create_context |
CREATE TABLE company (
Market_Value_in_Billion INTEGER
) | What is the maximum and minimum market value of companies? | SELECT MAX(Market_Value_in_Billion), MIN(Market_Value_in_Billion) FROM company | 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,... | 从二0一三年七月三十日到二0二0年十月一日期间,谷维素片总共被开出了多少,总金额共有多少 | SELECT SUM(QTY), SUM(AMOUNT) FROM t_kc22 WHERE SOC_SRT_DIRE_NM = '谷维素片' AND STA_DATE BETWEEN '2013-07-30' AND '2020-10-01' | css |
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Dorm (
dormid INTEGER,
dor... | What is the total capacity of dorms for each gender? Give me a bar chart. | SELECT gender, SUM(student_capacity) FROM Dorm GROUP BY gender | nvbench |
CREATE TABLE table_17763 (
"Model Number" text,
"Clock Speed" text,
"L2" text,
"L3" text,
"FSB Speed" text,
"Multiplier" text,
"Cores" real,
"Threads per core" real,
"Voltage" text,
"TDP (W)" text,
"Socket" text,
"Release Date" text,
"Price ( USD )" text
) | What's the price (in USD) of the model whose L3 is 18 mb? | SELECT "Price ( USD )" FROM table_17763 WHERE "L3" = '18 MB' | wikisql |
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 procedures (
... | what is the number of patients who have drug code vera120sr? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "VERA120SR" | mimicsql_data |
CREATE TABLE table_name_99 (
attendance INTEGER,
venue VARCHAR,
series VARCHAR
) | Name the most that attendend when the venue was td banknorth garden and the series of montreal leads 3-1 | SELECT MAX(attendance) FROM table_name_99 WHERE venue = "td banknorth garden" AND series = "montreal leads 3-1" | sql_create_context |
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
date_account_opened DATETIME,
account_name VARCHAR(50),
other_account_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
account_id INTEGER,
invoice_number INTEGER,
transaction_type VA... | Show the number of accounts for all accounts by the customer with first name 'Meaghan' opened in each day. Bin the account open day by weekday in a bar chart. | SELECT date_account_opened, COUNT(date_account_opened) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = 'Meaghan' | nvbench |
CREATE TABLE table_name_67 (
Id VARCHAR
) | What is the 2008 result when 2012 and 2005 are both QF? | SELECT 2008 FROM table_name_67 WHERE 2012 = "qf" AND 2005 = "qf" | sql_create_context |
CREATE TABLE table_32849 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the average total when gold is 0, bronze is 0, and silver is smaller than 1? | SELECT AVG("Total") FROM table_32849 WHERE "Gold" = '0' AND "Bronze" = '0' AND "Silver" < '1' | wikisql |
CREATE TABLE table_204_360 (
id number,
"year" number,
"host" text,
"gold" text,
"silver" text,
"bronze" text
) | which country has brought home the most gold ? | SELECT "gold" FROM table_204_360 GROUP BY "gold" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_29395291_2 (
subscribers__2006___thousands_ INTEGER,
provider VARCHAR
) | What is the maximum number of 2006 subscribers for Glo Mobile? | SELECT MAX(subscribers__2006___thousands_) FROM table_29395291_2 WHERE provider = "Glo Mobile" | sql_create_context |
CREATE TABLE team (
name VARCHAR,
team_id VARCHAR
)
CREATE TABLE salary (
team_id VARCHAR,
salary INTEGER
) | What are the name and id of the team offering the lowest average salary? | SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) LIMIT 1 | 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,
... | 医疗机构4013101的肾内在2000年2月29起日2018年9月12日结束处理的住院就诊数总共多少? | SELECT COUNT(*) FROM zyjzjlb WHERE YLJGDM = '4013101' AND JZKSMC = '肾内科' AND RYDJSJ BETWEEN '2000-02-29' AND '2018-09-12' | css |
CREATE TABLE table_67775 (
"Year" real,
"Role" text,
"Author" text,
"Radio Station/Production Company" text,
"Release/Air Date" text
) | Role of narrator, and a Year larger than 2009, and a Release/Air Date of 7 october 2010 belongs to what author? | SELECT "Author" FROM table_67775 WHERE "Role" = 'narrator' AND "Year" > '2009' AND "Release/Air Date" = '7 october 2010' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | give me the number of patients whose gender is m and primary disease is guillain barre syndrome? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.diagnosis = "GUILLAIN BARRE SYNDROME" | mimicsql_data |
CREATE TABLE table_29598261_1 (
hometown VARCHAR,
name VARCHAR
) | what is the hometown for mike ladd? | SELECT hometown FROM table_29598261_1 WHERE name = "Mike Ladd" | sql_create_context |
CREATE TABLE table_57911 (
"Year" real,
"Title" text,
"Original channel" text,
"Role" text,
"Note" text
) | what is the title when the year is after 2011 and the original channel is nhk? | SELECT "Title" FROM table_57911 WHERE "Year" > '2011' AND "Original channel" = 'nhk' | wikisql |
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 prescriptions... | provide the number of patients whose admission year is less than 2175 and diagnoses short title is chronic liver dis nec? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2175" AND diagnoses.short_title = "Chronic liver dis NEC" | mimicsql_data |
CREATE TABLE accounts (
account_id number,
customer_id number,
account_name text,
other_account_details text
)
CREATE TABLE financial_transactions (
transaction_id number,
previous_transaction_id number,
account_id number,
card_id number,
transaction_type text,
transaction_date ... | What is the customer id of the customer with the most accounts, and how many accounts does this person have? | SELECT customer_id, COUNT(*) FROM accounts GROUP BY customer_id ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE airport_aircraft (
id number,
airport_id number,
aircraft_id number
)
CREATE TABLE airport (
airport_id number,
airport_name text,
total_passengers number,
%_change_2007 text,
international_passengers number,
domestic_passengers number,
transit_passengers number,
... | List the name of the aircraft that has been named winning aircraft the most number of times. | SELECT T1.aircraft FROM aircraft AS T1 JOIN match AS T2 ON T1.aircraft_id = T2.winning_aircraft GROUP BY T2.winning_aircraft ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_name_12 (
finishes VARCHAR,
stage_wins VARCHAR,
starts VARCHAR,
points VARCHAR
) | What is the number of finishes associated with 13 starts, more than 169 points, and 96 stage wins? | SELECT finishes FROM table_name_12 WHERE starts = 13 AND points > 169 AND stage_wins = 96 | sql_create_context |
CREATE TABLE table_66641 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" text
) | What was the score of the game where stafford rangers was the away team? | SELECT "Score" FROM table_66641 WHERE "Away team" = 'stafford rangers' | wikisql |
CREATE TABLE Ref_Incident_Type (
incident_type_code VARCHAR(10),
incident_type_description VARCHAR(80)
)
CREATE TABLE Students (
student_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(40),
last_name VARCHAR(40),
cell_mobile_number VARCHAR(40),
email_addr... | Give me the comparison about the sum of monthly_rental over the date_address_from , and group by attribute other_details and bin date_address_from by weekday. | SELECT date_address_from, SUM(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_36185 (
"Game" real,
"February" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
) | What's the lowest February for less than 57 points? | SELECT MIN("February") FROM table_36185 WHERE "Points" < '57' | wikisql |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | For those products with a price between 60 and 120, return a bar chart about the distribution of name and manufacturer . | SELECT Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 | nvbench |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
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,
JSB... | 我想知道患者窦嘉美之前就诊的医院 | SELECT mzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND per... | css |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | provide the number of patients whose ethnicity is hispanic/latino - puerto rican and drug type is base? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE table_32025 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | When there was a draw, what was the time? | SELECT "Time" FROM table_32025 WHERE "Res." = 'draw' | wikisql |
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 semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE... | I 'm looking for the easiest class I can take to fulfill the Core requirement . | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_co... | advising |
CREATE TABLE table_name_32 (
away_team VARCHAR,
home_team VARCHAR
) | What team was the away team when the home team was Hereford United? | SELECT away_team FROM table_name_32 WHERE home_team = "hereford united" | sql_create_context |
CREATE TABLE table_name_36 (
crowd INTEGER,
venue VARCHAR
) | What was the average crowd attendance for the Junction Oval venue? | SELECT AVG(crowd) FROM table_name_36 WHERE venue = "junction oval" | sql_create_context |
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real... | Compare the average of artists' age by country in a bar graph. | SELECT Country, AVG(Age) FROM artist GROUP BY Country | nvbench |
CREATE TABLE table_24910733_2 (
episode VARCHAR,
rating VARCHAR
) | How many episodes received rating of 8.2? | SELECT COUNT(episode) FROM table_24910733_2 WHERE rating = "8.2" | sql_create_context |
CREATE TABLE table_68677 (
"Year" text,
"Title" text,
"( Title in English )" text,
"Director" text,
"Character" text
) | What is the year of the TV series directed by Soroush Sehat? | SELECT "Year" FROM table_68677 WHERE "Director" = 'soroush sehat' | wikisql |
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimme... | Give me the comparison about meter_100 over the meter_600 , display X in descending order. | SELECT meter_600, meter_100 FROM swimmer ORDER BY meter_600 DESC | nvbench |
CREATE TABLE table_33062 (
"Year" text,
"League" text,
"Reg. Season" text,
"Playoffs" text,
"Attendance Average" text
) | What is the average attendance of the team that had a regular season result of 2nd aisa, 24-16? | SELECT "Attendance Average" FROM table_33062 WHERE "Reg. Season" = '2nd aisa, 24-16' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE chartevents (
row_id number,
subject_i... | since 5 years ago, what are the top four most frequent procedures given to patients in the same hospital visit after diagnosis of adv eff fibrinolysis agt? | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_i... | mimic_iii |
CREATE TABLE table_77133 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | What is the home team with scarborough as the away team? | SELECT "Home team" FROM table_77133 WHERE "Away team" = 'scarborough' | wikisql |
CREATE TABLE table_name_75 (
rank INTEGER,
name VARCHAR,
birth VARCHAR
) | What rank is He Yingqin who was born before 1890? | SELECT AVG(rank) FROM table_name_75 WHERE name = "he yingqin" AND birth < 1890 | sql_create_context |
CREATE TABLE table_name_1 (
score VARCHAR,
team VARCHAR
) | What is the Score with a Team that is @ portland? | SELECT score FROM table_name_1 WHERE team = "@ portland" | sql_create_context |
CREATE TABLE table_76096 (
"Week of" text,
"Tier" text,
"Winner" text,
"Runner-up" text,
"Semi finalists" text
) | Who are the semi finalists on the week of 12 june, when the runner-up is listed as Lori McNeil? | SELECT "Semi finalists" FROM table_76096 WHERE "Week of" = '12 june' AND "Runner-up" = 'lori mcneil' | wikisql |
CREATE TABLE table_30720 (
"Athens XI" text,
"PIFA Colaba FC u-17" text,
"Tata Power" text,
"Dadar XI \u2018B\u2019" text,
"IDBI" text,
"World Network Services" text,
"United FC" text,
"Good Shepherd" text
) | what is the dadar xi b where pifa colaba is sporting options? | SELECT "Dadar XI \u2018B\u2019" FROM table_30720 WHERE "PIFA Colaba FC u-17" = 'Sporting Options' | wikisql |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Comments (
Id number,
PostId num... | Comments on my posts containing two given phrases (case insensitive). | SELECT c.Id AS "comment_link", c.Text, c.UserId AS "user_link", c.CreationDate FROM Comments AS c INNER JOIN Posts AS p ON c.PostId = p.Id WHERE (p.OwnerUserId = '##UserId?8297##') AND (c.Text LIKE '%##Word1?chat##%' COLLATE Latin1_General_CI_AI) AND (c.Text LIKE '%##Word2?here##%' COLLATE Latin1_General_CI_AI) | sede |
CREATE TABLE customer_orders (
order_date VARCHAR,
customer_id VARCHAR
)
CREATE TABLE customers (
customer_name VARCHAR,
customer_id VARCHAR
) | Find the customer name and date of the orders that have the status 'Delivered'. | SELECT t1.customer_name, t2.order_date FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id WHERE order_status = "Delivered" | sql_create_context |
CREATE TABLE table_77602 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the score of the away team while playing at the arden street oval? | SELECT "Away team score" FROM table_77602 WHERE "Venue" = 'arden street oval' | wikisql |
CREATE TABLE txmzjzjlb (
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... | 门诊诊断病人方鹏云为精神分裂症的检测指标162731的结果定量及其单位各是什么呀? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZ... | css |
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
)
... | what is the number of patients whose age is less than 61 and lab test name is monocytes? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "61" AND lab.label = "Monocytes" | mimicsql_data |
CREATE TABLE table_24574 (
"Train No." text,
"Train Name" text,
"Destination" text,
"Category" text,
"Frequency" text
) | What is the frequency of trains numbered 12671/12672? | SELECT "Frequency" FROM table_24574 WHERE "Train No." = '12671/12672' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | 查一下病患葛映波的医疗记录,分别列出医疗费总额高于6981.35元的入院诊断疾病名和编码 | SELECT gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_NM = '葛映波' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6981.35) UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '葛映波' AND fgwyjzb.... | css |
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... | Top 10 Zero score questions with highest view count. | SELECT Id AS "post_link", ViewCount FROM Posts AS p WHERE Score = 0 ORDER BY ViewCount DESC LIMIT 10 | sede |
CREATE TABLE table_204_858 (
id number,
"date" text,
"time" text,
"opponent#" text,
"rank#" text,
"site" text,
"tv" text,
"result" text,
"attendance" number
) | what is the different between the number of people who attended august 30th and the number of people who attended november 1st | SELECT ABS((SELECT "attendance" FROM table_204_858 WHERE "date" = 'august 30') - (SELECT "attendance" FROM table_204_858 WHERE "date" = 'november 1')) | squall |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | give me the number of patients whose gender is m and item id is 51148? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "M" AND lab.itemid = "51148" | mimicsql_data |
CREATE TABLE table_203_157 (
id number,
"year" number,
"film" text,
"role" text,
"language" text,
"notes" text
) | how many films has neha sharma been in ? | SELECT COUNT("film") FROM table_203_157 | squall |
CREATE TABLE table_70538 (
"Frame size" text,
"Width" real,
"Height" real,
"Mpix" real,
"Aspect Ratio" text,
"Maximum fps" real,
"Maximum fps HDRx" real,
"least compression at 24 fps" text,
"least compression at maximum fps" text
) | What is the lowest maximum of fps with a width of 3072 and a height less than 1620? | SELECT MIN("Maximum fps") FROM table_70538 WHERE "Width" = '3072' AND "Height" < '1620' | wikisql |
CREATE TABLE table_26998135_2 (
replaced_by VARCHAR,
date_of_vacancy VARCHAR
) | Who is the replaced by when the date of vacancy is 27 december 2010? | SELECT replaced_by FROM table_26998135_2 WHERE date_of_vacancy = "27 December 2010" | sql_create_context |
CREATE TABLE table_204_29 (
id number,
"rank" number,
"lane" number,
"name" text,
"nationality" text,
"time" text,
"notes" text
) | what is the total number of names ? | SELECT COUNT("name") FROM table_204_29 | squall |
CREATE TABLE table_name_50 (
visitor VARCHAR,
series VARCHAR
) | What is the Visitor with a Series with 3 2? | SELECT visitor FROM table_name_50 WHERE series = "3 – 2" | sql_create_context |
CREATE TABLE table_20212 (
"#" real,
"Season" real,
"Bowl game" text,
"Result" text,
"Opponent" text,
"Stadium" text,
"Location" text,
"Attendance" text
) | What is the lowest # in Atlanta, GA with the Georgia Bulldogs as an opponent? | SELECT MIN("#") FROM table_20212 WHERE "Location" = 'Atlanta, GA' AND "Opponent" = 'Georgia Bulldogs' | wikisql |
CREATE TABLE table_name_41 (
team VARCHAR,
circuit VARCHAR
) | What was the team features at Oran Park Raceway? | SELECT team FROM table_name_41 WHERE circuit = "oran park raceway" | sql_create_context |
CREATE TABLE table_10959 (
"Year" real,
"Result" text,
"Award" text,
"Category" text,
"Film or series" text,
"Character" text
) | What character won the best dramatic performance award? | SELECT "Character" FROM table_10959 WHERE "Category" = 'best dramatic performance' | wikisql |
CREATE TABLE table_29612224_1 (
colors VARCHAR,
location VARCHAR
) | How many different combinations of team colors are there in all the schools in Maroa, Illinois? | SELECT COUNT(colors) FROM table_29612224_1 WHERE location = "Maroa, Illinois" | sql_create_context |
CREATE TABLE table_24419 (
"Year" real,
"Song Title" text,
"Artist" text,
"Genre" text,
"Original Game" text,
"Band Tier/Venue" text,
"Exportable to GH5/BH" text
) | What is every song title for 2007? | SELECT "Song Title" FROM table_24419 WHERE "Year" = '2007' | 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... | how many patients whose primary disease is overdose and lab test abnormal status is delta? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "OVERDOSE" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_60816 (
"Year" real,
"Grand Slam" text,
"Round" text,
"Winner" text,
"Loser" text
) | In which year is Nerida Gregory listed as the loser? | SELECT AVG("Year") FROM table_60816 WHERE "Loser" = 'nerida gregory' | wikisql |
CREATE TABLE table_6224 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Attendance" real
) | Game site of candlestick park had what opponent? | SELECT "Opponent" FROM table_6224 WHERE "Game site" = 'candlestick park' | wikisql |
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... | 42849404这个病人在医疗就诊14468972682中,开的什么药及其每次的用量和使用频次 | SELECT SOC_SRT_DIRE_NM, EACH_DOSAGE, USE_FRE FROM t_kc22 WHERE MED_CLINIC_ID = '14468972682' | css |
CREATE TABLE table_2105 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" real,
"Division" text
) | How many teams have skyhawks as a nickname? | SELECT COUNT("Division") FROM table_2105 WHERE "Nickname" = 'Skyhawks' | wikisql |
CREATE TABLE table_204_937 (
id number,
"rank" number,
"lane" number,
"athlete" text,
"time" number
) | name the only athlete from sri lanka . | SELECT "athlete" FROM table_204_937 WHERE "athlete" = 'sri' | squall |
CREATE TABLE Things (
thing_id INTEGER,
organization_id INTEGER,
Type_of_Thing_Code CHAR(15),
service_type_code CHAR(10),
service_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_details VARCHAR(255)
)
CREATE TABLE Services (
service_id INTEGER,
organiz... | Please use a bar chart to compare the number of customers of each customer's move in date, and rank by the total number from low to high. | SELECT date_moved_in, COUNT(date_moved_in) FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY date_moved_in ORDER BY COUNT(date_moved_in) | nvbench |
CREATE TABLE table_name_87 (
date VARCHAR,
opponent VARCHAR,
result VARCHAR,
name VARCHAR
) | What is the date of the match with a result of ud 12/12 between Pernell Whitaker and James Mcgirt? | SELECT date FROM table_name_87 WHERE result = "ud 12/12" AND name = "pernell whitaker" AND opponent = "james mcgirt" | sql_create_context |
CREATE TABLE table_3120 (
"Rank" text,
"Player" text,
"Nationality" text,
"Team" text,
"Opponent" text,
"Score" text,
"Competition" text,
"Vote percentage" text
) | What team was ranked in 7th? | SELECT "Team" FROM table_3120 WHERE "Rank" = '7th' | wikisql |
CREATE TABLE table_train_66 (
"id" int,
"pregnancy_or_lactation" bool,
"white_blood_cell_count_wbc" int,
"acute_pyelonephritis" bool,
"intrabdominal_infection" bool,
"body_weight" float,
"oxygen_therapy_by_face_mask" bool,
"temperature" float,
"heart_rate" int,
"paco2" float,
... | 1 or more of the following infections: a ) primary or secondary bacteremia by gram negative bacteria, b ) acute pyelonephritis, or c ) intrabdominal infection. | SELECT * FROM table_train_66 WHERE (CASE WHEN bacteremia_by_gram_negative_bacteria = 1 THEN 1 ELSE 0 END + CASE WHEN acute_pyelonephritis = 1 THEN 1 ELSE 0 END + CASE WHEN intrabdominal_infection = 1 THEN 1 ELSE 0 END) >= 1 | criteria2sql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.