context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE membership_register_branch (
Member_ID int,
Branch_ID text,
Register_Year text
)
CREATE TABLE branch (
Branch_ID int,
Name text,
Open_year text,
Address_road text,
City text,
membership_amount text
)
CREATE TABLE purchase (
Member_ID int,
Branch_ID text,
Ye... | Count the hometown by hometown, I want to sort by the X-axis in asc. | SELECT Hometown, COUNT(Hometown) FROM member GROUP BY Hometown ORDER BY Hometown | nvbench |
CREATE TABLE table_name_41 (
finish VARCHAR,
rank VARCHAR,
start VARCHAR
) | With a Rank of 19, and a Start of 14, what was the finish? | SELECT finish FROM table_name_41 WHERE rank = "19" AND start = "14" | sql_create_context |
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... | 查一下38345577816这个医疗就诊中,开出的所有名称中包含消炎的药品及其金额 | SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM, AMOUNT FROM t_kc22 WHERE MED_CLINIC_ID = '38345577816' AND SOC_SRT_DIRE_NM LIKE '%消炎%' | css |
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 ... | 列出患者奚经略所有检验结果指标记录中的检测方法在2007-09-21到2008-12-08内有什么? | (SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy... | css |
CREATE TABLE table_6430 (
"Year" real,
"Pick" real,
"Player" text,
"Position" text,
"College" text
) | What is the earliest year for Alabama with a pick under 26? | SELECT MIN("Year") FROM table_6430 WHERE "College" = 'alabama' AND "Pick" < '26' | wikisql |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_seme... | In courses taught by Prof. Fraker , what grades have I gotten ? | SELECT DISTINCT student_record.grade FROM student_record INNER JOIN offering_instructor ON student_record.offering_id = offering_instructor.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE LOWER(instructor.name) LIKE '%Fraker%' AND student_record.student_id = 1 | advising |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
... | For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of email and commission_pct , could you display from high to low by the total number? | SELECT EMAIL, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT DESC | nvbench |
CREATE TABLE table_name_72 (
gold INTEGER,
bronze VARCHAR,
total VARCHAR,
silver VARCHAR
) | What is the highest amount of gold medals awarded to a team with more than 9 silver, 7 bronze and more than 13 medals total? | SELECT MAX(gold) FROM table_name_72 WHERE total > 13 AND silver > 9 AND bronze = 7 | sql_create_context |
CREATE TABLE table_29672 (
"Week #" text,
"Theme" text,
"Song Choice" text,
"Original Artist" text,
"Order #" text,
"Result" text
) | What was the theme when original artist Rosana's song was performed? | SELECT "Theme" FROM table_29672 WHERE "Original Artist" = 'Rosana' | wikisql |
CREATE TABLE table_74646 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text,
"Driver" text
) | What chassis does the shadow built car use? | SELECT "Chassis" FROM table_74646 WHERE "Constructor" = 'shadow' | 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... | Get me the number of american indian or alaska native patients who have procedure icd9 code 5101. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND procedures.icd9_code = "5101" | mimicsql_data |
CREATE TABLE table_30589 (
"Version" text,
"Release" text,
"Release date" text,
"End of maintenance" text,
"Requirement" text
) | What's the version in the 1.0.4 release? | SELECT "Version" FROM table_30589 WHERE "Release" = '1.0.4' | wikisql |
CREATE TABLE table_203_24 (
id number,
"date" text,
"home team" text,
"score" text,
"away team" text,
"notes" text
) | on what date did the home team score zero points against their opponent ? | SELECT "date" FROM table_203_24 WHERE "score" = 0 | squall |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | A bar chart shows the distribution of Name and Weight , rank by the y-axis in asc. | SELECT Name, Weight FROM people ORDER BY Weight | nvbench |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
Rejecti... | Find the longest-living answer on the Overlapping Polyglots challenge. | SELECT Id AS "post_link", OwnerUserId AS "user_link", Score, CreationDate, CAST((JULIANDAY(LEAD(Posts.CreationDate, 1, CURRENT_TIMESTAMP()) OVER (PARTITION BY ParentId, PostTypeId ORDER BY CreationDate)) - JULIANDAY(Posts.CreationDate)) * 24.0 AS INT) AS SurvivalTime FROM Posts WHERE PostTypeId = @answerType AND Parent... | sede |
CREATE TABLE table_61842 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text,
"Streak" text
) | What was the record for Dec 16? | SELECT "Record" FROM table_61842 WHERE "Date" = 'dec 16' | wikisql |
CREATE TABLE table_76081 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the Nation when there is a total less than 27, gold is less than 1, and bronze is more than 1? | SELECT "Nation" FROM table_76081 WHERE "Total" < '27' AND "Gold" < '1' AND "Bronze" > '1' | wikisql |
CREATE TABLE table_name_92 (
wins INTEGER,
season VARCHAR,
team VARCHAR
) | What is the largest amount of wins that was before the 2007 season, as well as the Team being silverstone motorsport academy? | SELECT MAX(wins) FROM table_name_92 WHERE season < 2007 AND team = "silverstone motorsport academy" | sql_create_context |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,... | tell me the amount of ostomy (output) that patient 20801 had on 04/02/last year? | SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20801)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'ost... | mimic_iii |
CREATE TABLE table_25375093_1 (
f_laps INTEGER
) | Name the least f/laps | SELECT MIN(f_laps) FROM table_25375093_1 | sql_create_context |
CREATE TABLE table_name_17 (
away_team VARCHAR,
home_team VARCHAR
) | What was the away team's score when Collingwood was the home team? | SELECT away_team AS score FROM table_name_17 WHERE home_team = "collingwood" | sql_create_context |
CREATE TABLE table_name_32 (
best INTEGER,
name VARCHAR
) | What is the total best for Bruno junqueira | SELECT SUM(best) FROM table_name_32 WHERE name = "bruno junqueira" | sql_create_context |
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... | whats the first height of patient 012-18025 since 07/2104? | SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-18025') AND NOT patient.admissionheight IS NULL AND STRFTIME('%y-%m', patient.unitadmittime) >= '2104-07' ORDER BY patient.unitadmittime LIMIT 1 | eicu |
CREATE TABLE table_19287 (
"Celebrity" text,
"Famous for" text,
"Entered" text,
"Exited" text,
"Finished" text
) | What position did Nell McAndrew finish? | SELECT "Finished" FROM table_19287 WHERE "Celebrity" = 'Nell McAndrew' | wikisql |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
... | Open posts with closed votes by year. | SELECT p.Id AS "post_link", COUNT(v.Id) AS TotalVotes FROM Posts AS p INNER JOIN Votes AS v ON p.Id = v.PostId WHERE v.VoteTypeId = 6 AND p.ClosedDate IS NULL AND YEAR(p.CreationDate) = @year AND p.ViewCount < 100 GROUP BY p.Id ORDER BY totalvotes DESC | sede |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTask... | Tags by % of closed questions. | SELECT t.TagName, ROUND(AVG(CASE WHEN p.ClosedDate IS NULL THEN 0.0 ELSE 100.0 END), 2) AS "Close %", COUNT(*) AS "# of questions" FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId GROUP BY t.TagName HAVING COUNT(*) >= 20 ORDER BY 2 DESC LIMIT 100 | sede |
CREATE TABLE table_name_3 (
home_team VARCHAR,
venue VARCHAR
) | What was the home team score for the game played at Princes Park? | SELECT home_team AS score FROM table_name_3 WHERE venue = "princes park" | sql_create_context |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
... | what's the name of the specimen test that was first given to patient 031-17834 in 10/this year? | SELECT microlab.culturesite FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-17834')) AND DATETIME(microlab.culturetakentime, 'start of year') ... | eicu |
CREATE TABLE locations (
location_id number,
location_name text,
address text,
other_details text
)
CREATE TABLE features (
feature_id number,
feature_details text
)
CREATE TABLE shops (
shop_id number,
shop_details text
)
CREATE TABLE ref_hotel_star_ratings (
star_rating_code tex... | Which tourist attraction is associated with the photo 'game1'? Return its name. | SELECT T2.name FROM photos AS T1 JOIN tourist_attractions AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id WHERE T1.name = "game1" | spider |
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,... | 列出开出的所有名称不包含补肺的医疗就诊37643909503中有多少药品及其金额? | SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM, AMOUNT FROM t_kc22 WHERE MED_CLINIC_ID = '37643909503' AND NOT SOC_SRT_DIRE_NM LIKE '%补肺%' | css |
CREATE TABLE table_67982 (
"Competition" text,
"Venue" text,
"Year" real,
"Category" text,
"Result" text
) | What are the categories of events that occurred after 2007 that were World Championships? | SELECT "Category" FROM table_67982 WHERE "Year" > '2007' AND "Competition" = 'world championships' | wikisql |
CREATE TABLE table_26873 (
"Rank" real,
"Country" text,
"Disposable USD 2011" real,
"Disposable USD growth" real,
"Compulsory deduction" text,
"Gross USD 2011" real
) | What is Australia's Disposable USD growth? | SELECT MAX("Disposable USD growth") FROM table_26873 WHERE "Country" = 'Australia' | wikisql |
CREATE TABLE table_28380 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by:" text,
"Original air date" text
) | Who are all writers with original air date of October 23, 1996? | SELECT "Written by:" FROM table_28380 WHERE "Original air date" = 'October 23, 1996' | wikisql |
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,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | I have fulfilled what prerequisites for REEES 695 already ? | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, student_record WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.department = 'REEES' AND COURSE_1.number =... | advising |
CREATE TABLE problem_log (
problem_log_id number,
assigned_to_staff_id number,
problem_id number,
problem_category_code text,
problem_status_code text,
log_entry_date time,
log_entry_description text,
log_entry_fix text,
other_log_details text
)
CREATE TABLE problem_status_codes (
... | What are the ids of the problems which are reported before 1978-06-26? | SELECT problem_id FROM problems WHERE date_problem_reported < "1978-06-26" | spider |
CREATE TABLE table_name_24 (
date VARCHAR,
winner VARCHAR
) | What is the date where the winner was Tom Kite (10)? | SELECT date FROM table_name_24 WHERE winner = "tom kite (10)" | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | give the number of patients whose admission type is emergency and the lab test name is cd3 cells percentage. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.label = "CD3 Cells, Percent" | mimicsql_data |
CREATE TABLE table_21669 (
"Season in Tamil" text,
"English Transliteration" text,
"English Translation" text,
"Season in Sanskrit" text,
"Season in English" text,
"Tamil Months" text,
"Gregorian Months" text
) | What is every English translation when Tamil months is M rkazhi, Tai? | SELECT "English Translation" FROM table_21669 WHERE "Tamil Months" = 'mārkazhi, tai' | wikisql |
CREATE TABLE table_178389_1 (
church_name VARCHAR,
location_of_the_church VARCHAR
) | What is the church name for the church located in Kyrkjeb ? | SELECT church_name FROM table_178389_1 WHERE location_of_the_church = "Kyrkjebø" | sql_create_context |
CREATE TABLE table_469 (
"Year" text,
"Champion" text,
"Country" text,
"Score" text,
"Tournament location" text,
"Purse ($)" real,
"Winners share ($)" real
) | What is the location of the tournament that the share of winning is 7000? | SELECT "Tournament location" FROM table_469 WHERE "Winners share ($)" = '7000' | wikisql |
CREATE TABLE table_11727969_1 (
peru_vs_world__percent_ INTEGER,
species_in_the_world VARCHAR
) | what's the maximum peru vs. world (percent) with 9672 species in the world | SELECT MAX(peru_vs_world__percent_) FROM table_11727969_1 WHERE species_in_the_world = 9672 | sql_create_context |
CREATE TABLE table_name_63 (
city VARCHAR,
feb VARCHAR
) | Name the city with Feb of 66 f / 18.9 c | SELECT city FROM table_name_63 WHERE feb = "66 °f / 18.9 °c" | sql_create_context |
CREATE TABLE table_73835 (
"meas. num" real,
"passed" text,
"YES votes" real,
"NO votes" real,
"% YES" text,
"Const. Amd.?" text,
"type" text,
"description" text
) | what is the measure number for the init type? | SELECT "meas. num" FROM table_73835 WHERE "type" = 'Init' | 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... | What upper level electives are offered before noon ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.end_time <= '12:00:00' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semest... | advising |
CREATE TABLE table_22875514_3 (
player VARCHAR,
field_goals VARCHAR
) | Which player has 18-50 .360 field goals? | SELECT player FROM table_22875514_3 WHERE field_goals = "18-50 .360" | sql_create_context |
CREATE TABLE table_67112 (
"School" text,
"Team" text,
"Division Record" text,
"Overall Record" text,
"Season Outcome" text
) | What team belongs to Delmar? | SELECT "Team" FROM table_67112 WHERE "School" = 'delmar' | wikisql |
CREATE TABLE table_33276 (
"Club" text,
"Played" real,
"Lost" real,
"Drawn" real,
"Against" real,
"Diff." real,
"Points" real
) | What is the total difference for teams that played less than 6 games? | SELECT SUM("Diff.") FROM table_33276 WHERE "Played" < '6' | wikisql |
CREATE TABLE table_name_90 (
result VARCHAR,
category VARCHAR
) | What was the result for the nomination of Best Revival of a Musical? | SELECT result FROM table_name_90 WHERE category = "best revival of a musical" | sql_create_context |
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,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 76007171号这个病人在入院3592922号医院时科室名称不包有脑外科这仨字的住院就诊记录列出都有啥? | SELECT * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb... | css |
CREATE TABLE table_name_50 (
official_name VARCHAR,
area_km_2 VARCHAR
) | What is the Official Name of the Community with an Area km 2 of 16.13? | SELECT official_name FROM table_name_50 WHERE area_km_2 = 16.13 | sql_create_context |
CREATE TABLE table_name_7 (
to_par VARCHAR,
player VARCHAR
) | What was the to par for Tino Schuster? | SELECT to_par FROM table_name_7 WHERE player = "tino schuster" | sql_create_context |
CREATE TABLE shop (
shop_id number,
shop_name text,
location text,
open_date text,
open_year number
)
CREATE TABLE device (
device_id number,
device text,
carrier text,
package_version text,
applications text,
software_platform text
)
CREATE TABLE stock (
shop_id number... | What are the carriers of devices that are not in stock anywhere? | SELECT carrier FROM device WHERE NOT device_id IN (SELECT device_id FROM stock) | spider |
CREATE TABLE resultsdata15 (
sample_pk number,
commod text,
commtype text,
lab text,
pestcode text,
testclass text,
concen number,
lod number,
conunit text,
confmethod text,
confmethod2 text,
annotate text,
quantitate text,
mean text,
extract text,
determi... | When is sample 3763 collected? | SELECT year, month, day FROM sampledata15 WHERE sample_pk = 3763 | pesticide |
CREATE TABLE table_4949 (
"Race Title" text,
"Circuit" text,
"City / State" text,
"Date" text,
"Winner" text
) | What is the City/State of the Oran Park race? | SELECT "City / State" FROM table_4949 WHERE "Race Title" = 'oran park' | wikisql |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | 编码为37183972735的检验报告单的检验项目代码和名称分别是啥? | SELECT JYXMDM, JYXMMC FROM jybgb WHERE BGDH = '37183972735' | css |
CREATE TABLE table_2937 (
"Season" real,
"Lowest" real,
"Low Team" text,
"Average" real,
"Highest" real,
"High Team" text,
"2nd Highest" real,
"2nd Team" text
) | How many entries for highest when the low team was baltimore rays? | SELECT COUNT("Highest") FROM table_2937 WHERE "Low Team" = 'Baltimore Rays' | wikisql |
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,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | 患者87197835在2013-01-25以前的检验报告单是在哪些门诊就诊的?列出门诊就诊流水号 | SELECT wdmzjzjlb.JZLSH 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 = '87197835' AND NOT wdmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2013-01-25') UNION SELECT bdmzjzjlb.JZLSH FROM hz_info JOIN... | css |
CREATE TABLE table_name_31 (
pages_per_minute__color_ VARCHAR,
max_page_size VARCHAR,
dimensions__mm_ VARCHAR
) | What is the pages per minute (color) of the machine that has a max page size of a4 and dimensions (mm) of 303 x 94 x 60? | SELECT pages_per_minute__color_ FROM table_name_31 WHERE max_page_size = "a4" AND dimensions__mm_ = "303 x 94 x 60" | sql_create_context |
CREATE TABLE table_69792 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
) | What is the gender for Otama? | SELECT "Gender" FROM table_69792 WHERE "Area" = 'otama' | wikisql |
CREATE TABLE table_60699 (
"Season" text,
"League" text,
"Teams" text,
"Home" text,
"Away" text
) | What season has a league 3rd liga, and away of 1-0? | SELECT "Season" FROM table_60699 WHERE "League" = '3rd liga' AND "Away" = '1-0' | 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
) | What are the number of the names of all products? | SELECT Name, COUNT(Name) FROM Products GROUP BY Name | nvbench |
CREATE TABLE table_name_96 (
opposing_teams VARCHAR,
status VARCHAR,
date VARCHAR
) | What is Opposing Teams, when Status is 'Test Match', and when Date is '25/11/2000'? | SELECT opposing_teams FROM table_name_96 WHERE status = "test match" AND date = "25/11/2000" | sql_create_context |
CREATE TABLE table_28978 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.S. viewers (millions)" text
) | What is the latest episode written by John Shiban & Thomas Schnauz? | SELECT MAX("No. in series") FROM table_28978 WHERE "Written by" = 'John Shiban & Thomas Schnauz' | wikisql |
CREATE TABLE table_25204 (
"Year" real,
"Network" text,
"Race caller" text,
"s Host" text,
"s Analyst" text,
"Reporters" text,
"Trophy presentation" text
) | Name the analysts | SELECT "s Analyst" FROM table_25204 | wikisql |
CREATE TABLE table_37833 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Wins" real
) | What is listed as the lowest Year with a Wins that's smaller than 0? | SELECT MIN("Year") FROM table_37833 WHERE "Wins" < '0' | wikisql |
CREATE TABLE table_204_278 (
id number,
"name of president" text,
"picture" text,
"life span" text,
"year of presidency" text,
"place of conference" text
) | which location had the most conferences listed ? | SELECT "place of conference" FROM table_204_278 GROUP BY "place of conference" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE movie (
movie_id number,
title text,
year number,
director text,
budget_million number,
gross_worldwide number
)
CREATE TABLE book_club (
book_club_id number,
year number,
author_or_editor text,
book_title text,
publisher text,
category text,
result text... | Show all movie titles, years, and directors, ordered by budget. | SELECT title, year, director FROM movie ORDER BY budget_million | spider |
CREATE TABLE table_66709 (
"Riding" text,
"Candidate's Name" text,
"Gender" text,
"Residence" text,
"Occupation" text,
"Votes" real,
"Rank" text
) | What is John Marvin Wierenga's occupation? | SELECT "Occupation" FROM table_66709 WHERE "Candidate's Name" = 'john marvin wierenga' | wikisql |
CREATE TABLE table_63578 (
"Name" text,
"Height" text,
"Weight" text,
"Spike" text,
"2008 club" text
) | What Weight has a 2008 Club of Acqua Paradiso Gabeca? | SELECT "Weight" FROM table_63578 WHERE "2008 club" = 'acqua paradiso gabeca' | wikisql |
CREATE TABLE salary (
year number,
team_id text,
league_id text,
player_id text,
salary number
)
CREATE TABLE player_award (
player_id text,
award_id text,
year number,
league_id text,
tie text,
notes text
)
CREATE TABLE hall_of_fame (
player_id text,
yearid number,... | Which birth place has the most player awards? | SELECT birth_country FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.birth_country ORDER BY COUNT(*) DESC LIMIT 1 | thehistoryofbaseball |
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
depa... | show me the flight with the smallest seating capacity which leaves PITTSBURGH and arrives in BALTIMORE on 6 14 | SELECT DISTINCT FLIGHT_0.flight_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days A... | atis |
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... | find the number of female patients whose diagnoses is titled lap surg convert to open. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.short_title = "Lap surg convert to open" | mimicsql_data |
CREATE TABLE table_11959669_6 (
game INTEGER,
location_attendance VARCHAR
) | What is the game that the location attendance is pepsi center 19,894? | SELECT MAX(game) FROM table_11959669_6 WHERE location_attendance = "Pepsi Center 19,894" | sql_create_context |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0... | For those employees who did not have any job in the past, show me about the correlation between employee_id and department_id in a scatter chart. | SELECT EMPLOYEE_ID, DEPARTMENT_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) | nvbench |
CREATE TABLE table_name_35 (
to_par VARCHAR,
country VARCHAR
) | What is South Africa's to par? | SELECT to_par FROM table_name_35 WHERE country = "south africa" | sql_create_context |
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,... | 在医院0616625中,查一下患者邹慧巧的就诊科室名字中没有病理科的所有门诊就诊记录的流水号有哪些 | SELECT wdmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '邹慧巧' AND hz_info.YLJGDM = '0616625' AND NOT wdmzjzjlb.JZKSMC LIKE '%病理科%' UNION SELECT bdmzjz... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | provide the number of patients whose admission year is less than 2194 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.admityear < "2194" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_61580 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
) | What player from the United States had a total of 297? | SELECT "Player" FROM table_61580 WHERE "Country" = 'united states' AND "Total" = '297' | wikisql |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,... | information on flights from BOSTON to WASHINGTON | 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 = 'WASHING... | atis |
CREATE TABLE status (
station_id number,
bikes_available number,
docks_available number,
time text
)
CREATE TABLE station (
id number,
name text,
lat number,
long number,
dock_count number,
city text,
installation_date text
)
CREATE TABLE trip (
id number,
duration ... | Which start station had the most trips starting from August? Give me the name and id of the station. | SELECT start_station_name, start_station_id FROM trip WHERE start_date LIKE "8/%" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number... | Get body and score of questions in specified date interval. | SELECT Body, Score, CreationDate FROM Posts WHERE PostTypeId = 1 AND CreationDate BETWEEN '##Startdate:string##' AND '##Enddate:string##' | sede |
CREATE TABLE table_1081235_1 (
name_of_lava_dome VARCHAR,
last_eruption_or_growth_episode VARCHAR
) | Which lava domes erupted or had a growth episode during the Holocene period? | SELECT name_of_lava_dome FROM table_1081235_1 WHERE last_eruption_or_growth_episode = "Holocene" | sql_create_context |
CREATE TABLE table_27713030_3 (
location_attendance VARCHAR,
date VARCHAR
) | What is the location and attendance on October 18? | SELECT location_attendance FROM table_27713030_3 WHERE date = "October 18" | 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... | calculate the total number of patients diagnosed with obstructive chronic bronchitis with acute bronchitis | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Obstructive chronic bronchitis with acute bronchitis" | mimicsql_data |
CREATE TABLE table_203_633 (
id number,
"title" text,
"year" number,
"platform" text,
"developer" text,
"publisher" text
) | what number of swat games were made for microsoft windows ? | SELECT COUNT("title") FROM table_203_633 WHERE "platform" = 'microsoft windows' | squall |
CREATE TABLE table_401 (
"Name" text,
"Position" text,
"Height" text,
"Weight(lbs)" real,
"Born" text,
"College" text,
"Drafted" text,
"Pro Team" text
) | What is the name when the position is de and college is ohio state? | SELECT "Name" FROM table_401 WHERE "Position" = 'DE' AND "College" = 'Ohio State' | wikisql |
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE ... | Is it true that Geoffrey E. Hinton has more citations than Yann Lecun ? | SELECT DISTINCT author.authorname, COUNT(writes.paperid) FROM author, writes WHERE author.authorname IN ('Geoffrey E. Hinton', 'Yann Lecun') AND writes.authorid = author.authorid GROUP BY author.authorname ORDER BY COUNT(writes.paperid) DESC | scholar |
CREATE TABLE store_district (
store_id number,
district_id number
)
CREATE TABLE product (
product_id number,
product text,
dimensions text,
dpi number,
pages_per_minute_color number,
max_page_size text,
interface text
)
CREATE TABLE store (
store_id number,
store_name text... | Find the total population of the districts where the area is bigger than the average city area. | SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district) | spider |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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
)
CR... | tell me the total magnesium sulfate dose that patient 11426 has been prescribed until 36 months ago? | SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11426) AND prescriptions.drug = 'magnesium sulfate' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-36 month') | mimic_iii |
CREATE TABLE table_name_72 (
opponent VARCHAR,
player VARCHAR,
event VARCHAR
) | Who was the opponent in the 2011 event with less than 113 players? | SELECT opponent FROM table_name_72 WHERE player < 113 AND event = 2011 | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | give me the number of patients whose admission type is urgent and procedure icd9 code is 5771? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.icd9_code = "5771" | mimicsql_data |
CREATE TABLE table_2911781_3 (
constructor VARCHAR,
grand_prix VARCHAR
) | What was the constructor in the Belgian Grand Prix round? | SELECT constructor FROM table_2911781_3 WHERE grand_prix = "Belgian grand_prix" | sql_create_context |
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,... | show me the evening flights from PHILADELPHIA to ATLANTA | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | atis |
CREATE TABLE table_61819 (
"Rank" real,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What's the rank that has a total of less than 1? | SELECT SUM("Rank") FROM table_61819 WHERE "Total" < '1' | wikisql |
CREATE TABLE table_name_73 (
record__conf_ VARCHAR,
conference VARCHAR
) | What is the recorded conference that was a Wac Conference? | SELECT record__conf_ FROM table_name_73 WHERE conference = "wac" | sql_create_context |
CREATE TABLE table_34474 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Events" real,
"Wins" real
) | How many earnings have Wins larger than 3? | SELECT SUM("Earnings ( $ )") FROM table_34474 WHERE "Wins" > '3' | wikisql |
CREATE TABLE table_name_31 (
date VARCHAR,
away_team VARCHAR
) | On what date is St Kilda the away team? | SELECT date FROM table_name_31 WHERE away_team = "st kilda" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | how many patients whose primary disease is left femur fracture and admission year is less than 2203? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LEFT FEMUR FRACTURE" AND demographic.admityear < "2203" | mimicsql_data |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | Who is the usual teacher of MO 899 ? | SELECT COUNT(instructor.name), instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'MO' AND course.number = 899 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = cour... | advising |
CREATE TABLE table_name_96 (
title VARCHAR,
language VARCHAR,
network VARCHAR
) | What is the title for the Korean progran on KBS2? | SELECT title FROM table_name_96 WHERE language = "korean" AND network = "kbs2" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.