context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_60028 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text )
What is Score, when Attendance is '349'?
SELECT "Score" FROM table_60028 WHERE "Attendance" = '349'
wikisql
CREATE TABLE table_24383 ( "Title" text, "Total copies sold" text, "Sales breakdown" text, "Genre" text, "Release date" text, "Developer" text, "Publisher" text )
Who published the title in the pet-raising simulator genre?
SELECT "Publisher" FROM table_24383 WHERE "Genre" = 'Pet-raising simulator'
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...
有多少人得过抽动障碍这个病
SELECT COUNT(qtb.PERSON_ID) FROM qtb WHERE qtb.IN_DIAG_DIS_NM = '抽动障碍' UNION SELECT COUNT(gyb.PERSON_ID) FROM gyb WHERE gyb.IN_DIAG_DIS_NM = '抽动障碍' UNION SELECT COUNT(zyb.PERSON_ID) FROM zyb WHERE zyb.IN_DIAG_DIS_NM = '抽动障碍' UNION SELECT COUNT(mzb.PERSON_ID) FROM mzb WHERE mzb.IN_DIAG_DIS_NM = '抽动障碍'
css
CREATE TABLE table_27713583_11 ( date VARCHAR, team VARCHAR )
Name the date for cleveland
SELECT date FROM table_27713583_11 WHERE team = "Cleveland"
sql_create_context
CREATE TABLE table_31046 ( "City/Municipality" text, "Population (2010)" real, "Area (km\u00b2)" text, "Pop. density (per km\u00b2)" text, "Income Classification" text )
When 318676 is the population of 2010 and 1st class is the income classification what is the area in kilometers squared?
SELECT "Area (km\u00b2)" FROM table_31046 WHERE "Income Classification" = '1st Class' AND "Population (2010)" = '318676'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
what is minimum age of patients whose discharge location is disch-tran to psych hosp and primary disease is brain mass;intracranial hemorrhage?
SELECT MIN(demographic.age) FROM demographic WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE"
mimicsql_data
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAno...
Stackoverflow users from Perm', Russia.
SELECT * FROM Users WHERE Location LIKE '%Ekaterinburg%' OR Location LIKE '%Yekaterinburg%' ORDER BY Reputation
sede
CREATE TABLE Financial_transactions ( account_id VARCHAR )
Show the account id with most number of transactions.
SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGui...
Number of Questions and Duplicates over time.
WITH AllQ AS (SELECT DATEADD(MONTH, DATEDIFF(MONTH, 0, MIN(CreationDate)), 0) AS YearMon, LOG(COUNT(*), 10) AS Num FROM Posts WHERE Posts.PostTypeId = 1 GROUP BY YEAR(CreationDate), MONTH(CreationDate)), Dupes AS (SELECT DATEADD(MONTH, DATEDIFF(MONTH, 0, MIN(Posts.CreationDate)), 0) AS YearMon, LOG(COUNT(*), 10) AS Num...
sede
CREATE TABLE table_30837 ( "By-election" real, "Electorate" text, "Date" text, "Incumbent" text, "Reason" text, "Winner" text )
When edward shaw is the winner what is the date?
SELECT "Date" FROM table_30837 WHERE "Winner" = 'Edward Shaw'
wikisql
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER )
Visualize a bar chart for what is average age for different job title?
SELECT job, AVG(age) FROM Person GROUP BY job
nvbench
CREATE TABLE Royal_Family ( Royal_Family_ID INTEGER, Royal_Family_Details VARCHAR(255) ) CREATE TABLE Shops ( Shop_ID INTEGER, Shop_Details VARCHAR(255) ) CREATE TABLE Photos ( Photo_ID INTEGER, Tourist_Attraction_ID INTEGER, Name VARCHAR(255), Description VARCHAR(255), Filename VA...
List all the possible ways to get to attractions, together with the number of attractions accessible by these methods by a pie chart.
SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There
nvbench
CREATE TABLE table_177766_1 ( per VARCHAR, rank VARCHAR )
This constellation with a ranking of 51 has how many percentages on record?
SELECT COUNT(per) AS ­cent­age FROM table_177766_1 WHERE rank = 51
sql_create_context
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
is the hemoglobin value of patient 86555 last measured on the first hospital visit less than the value second to last measured on the first hospital visit?
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 86555 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label ...
mimic_iii
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE outputevents ( ...
when was the first time patient 19059 was prescribed in 02/this year?
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19059) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', prescriptions.startdate) = '02...
mimic_iii
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, Delet...
Developers who are interested in JavaScript.
SELECT DisplayName, Reputation FROM Users ORDER BY Reputation DESC
sede
CREATE TABLE table_56206 ( "Date" text, "Round" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real )
Tell me the result for venue of a
SELECT "Result" FROM table_56206 WHERE "Venue" = 'a'
wikisql
CREATE TABLE table_32619 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
How many people attended the game at Lake Oval?
SELECT "Crowd" FROM table_32619 WHERE "Venue" = 'lake oval'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_items ( row_id num...
what is the actual number of patients discharged from a hospital since 1 year ago?
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE NOT admissions.dischtime IS NULL AND DATETIME(admissions.dischtime) >= DATETIME(CURRENT_TIME(), '-1 year')
mimic_iii
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 microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime tim...
until 2104, what were the four most common input events?
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT inputevents_cv.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM inputevents_cv WHERE STRFTIME('%y', inputevents_cv.charttime) <= '2104' GROUP BY inputevents_cv.itemid) AS t1 WHERE t1.c1 <= 4)
mimic_iii
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...
In what area have I gotten the most B+ 's ?
SELECT DISTINCT DERIVED_TABLEalias0.DERIVED_FIELDalias1 FROM (SELECT AREAalias0.area, COUNT(*) INNER JOIN student_record ON student_record.course_id = AREAalias0.course_id WHERE student_record.grade LIKE 'B+' AND student_record.student_id = 1 GROUP BY AREAalias0.area) AS DERIVED_TABLEalias0 WHERE DERIVED_TABLEalias0.DE...
advising
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, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE airline ( ...
i like to see the information for flights from PITTSBURGH to SAN FRANCISCO leaving PITTSBURGH after 12pm
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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.departure_time > 1200 AND flight.to_airport = AIRPORT_SERVICE_1...
atis
CREATE TABLE table_name_85 ( games_played INTEGER, position VARCHAR, goals_for_against VARCHAR )
What is the highest number of games played of the club with a position number less than 4 and a 29-24 goals for/against?
SELECT MAX(games_played) FROM table_name_85 WHERE position < 4 AND goals_for_against = "29-24"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CRE...
what is the drug that patient 010-8740 was allergic to when they came to the hospital last time?
SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-8740' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hos...
eicu
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...
病人57205871就诊科室名称不包含内分泌在医院3643376中的所有门诊就诊记录的流水号是多少?
SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzj...
css
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE cost ( row_id number, ...
when did patient 52898 receive a gastric tube irrigat nec procedure for the first time since 2105?
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'gastric tube irrigat nec') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52898) AND...
mimic_iii
CREATE TABLE table_29826 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Which team played them when andray blatche , javale mcgee (20) had the high points?
SELECT "Team" FROM table_29826 WHERE "High points" = 'Andray Blatche , JaVale McGee (20)'
wikisql
CREATE TABLE table_19797 ( "#" real, "Episode" text, "Writer" text, "Director" text, "Original air date" text, "Viewing figure" text )
What is the # for the episode with viewing figures of 7.02 million ?
SELECT MAX("#") FROM table_19797 WHERE "Viewing figure" = '7.02 million'
wikisql
CREATE TABLE table_name_75 ( player VARCHAR, nationality VARCHAR, pick VARCHAR )
Who is the player from Canada with a 199 pick?
SELECT player FROM table_name_75 WHERE nationality = "canada" AND pick = "199"
sql_create_context
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 me about the distribution of ACC_Road and School_ID , and group by attribute ACC_Home in a bar chart, and show x axis in ascending order.
SELECT ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road
nvbench
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE m...
calculate the length of stay of the last stay of patient 005-46456 in the icu.
SELECT STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-46456') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1
eicu
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, ...
编号02892545699的医疗就诊时由哪个医疗机构的科室负责费用明细项目93212772778的,查一下科室的编码和名称
SELECT t_kc22.MED_ORG_DEPT_CD, t_kc22.MED_ORG_DEPT_NM FROM t_kc22 WHERE t_kc22.MED_EXP_DET_ID = '93212772778'
css
CREATE TABLE actor ( aid int, gender text, name text, nationality text, birth_city text, birth_year int ) CREATE TABLE classification ( id int, msid int, gid int ) CREATE TABLE genre ( gid int, genre text ) CREATE TABLE made_by ( id int, msid int, pid int ) CR...
How many movies did ' Humphrey Bogart ' act in before 1942 ?
SELECT COUNT(DISTINCT (movie.title)) FROM actor, cast, movie WHERE actor.name = 'Humphrey Bogart' AND cast.aid = actor.aid AND movie.mid = cast.msid AND movie.release_year < 1942
imdb
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
查询在2001年7月30日到2020年3月8日期间医院1741866有多少科室在门诊就诊中开出低于5张检验报告单
SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM txmzjzjlb JOIN jybgb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE txmzjzjlb.YLJGDM = '1741866' AND jybgb.BGRQ BETWEEN '2001-07-30' AND '2020-03-08' GROUP BY jybgb.KSBM HAVING COUNT(*) < 5 UNION SELECT jybgb.KSBM FROM ftxmzjzjlb J...
css
CREATE TABLE table_24178 ( "Episode" text, "Broadcast date" text, "Run time" text, "Viewers (in millions)" text, "Archive" text )
Which archive has a run time of 23:48?
SELECT "Archive" FROM table_24178 WHERE "Run time" = '23:48'
wikisql
CREATE TABLE table_56626 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
What was roberto travern's record when he fought against john salter?
SELECT "Record" FROM table_56626 WHERE "Opponent" = 'john salter'
wikisql
CREATE TABLE table_80291 ( "NBR number" real, "Year" real, "Original operator" text, "Class" text, "Wheel arrangement" text, "Road number" real, "Location" text )
Which original operator is in the 25nc class?
SELECT "Original operator" FROM table_80291 WHERE "Class" = '25nc'
wikisql
CREATE TABLE table_name_91 ( round INTEGER, nationality VARCHAR, pick VARCHAR )
What is the sum of Round, when Nationality is 'United States', and when Pick is '125'?
SELECT SUM(round) FROM table_name_91 WHERE nationality = "united states" AND pick = 125
sql_create_context
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate tim...
User's Favorited Posts. Ordered by Date Favorited (DESC)..
SELECT PostId AS "post_link", v.CreationDate AS "favorited_on" FROM Votes AS v INNER JOIN Posts AS p ON p.Id = v.PostId WHERE UserId = 25197 AND VoteTypeId = 5 ORDER BY v.CreationDate DESC
sede
CREATE TABLE table_204_872 ( id number, "name" text, "completed" text, "architect" text, "location" text, "year of listing & ref(s)" number )
what is the difference , in years , between the completion dates of 53 king street and castlefield congregational chapel ?
SELECT ABS((SELECT "completed" FROM table_204_872 WHERE "name" = '53 king street') - (SELECT "completed" FROM table_204_872 WHERE "name" = 'castlefield congregational chapel'))
squall
CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE paperfield ( ...
Since 2004 who has published works about fibromyalgia and diet ?
SELECT DISTINCT writes.authorid FROM keyphrase, paper, paperkeyphrase, writes WHERE keyphrase.keyphrasename IN ('fibromyalgia', 'diet') AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year > 2004 AND writes.paperid = paper.paperid GROUP BY writes.authorid
scholar
CREATE TABLE table_name_38 ( result VARCHAR, attendance VARCHAR )
What is the result of the game when the attendance is 56,906?
SELECT result FROM table_name_38 WHERE attendance = "56,906"
sql_create_context
CREATE TABLE table_name_52 ( enrollment VARCHAR, nickname VARCHAR )
What is the total enrollment at the school that has the nickname of the Fightin' Blue Hens?
SELECT COUNT(enrollment) FROM table_name_52 WHERE nickname = "fightin' blue hens"
sql_create_context
CREATE TABLE table_21349 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real, "Competition" text, "Man of the Match" text )
Name the man of the match for 24th
SELECT "Man of the Match" FROM table_21349 WHERE "Date" = '24th'
wikisql
CREATE TABLE table_name_91 ( grid VARCHAR, driver VARCHAR )
What was the grid of Buddy Rice?
SELECT grid FROM table_name_91 WHERE driver = "buddy rice"
sql_create_context
CREATE TABLE table_name_10 ( attendance INTEGER, record VARCHAR )
Record of 11 12 involved what average attendance figures?
SELECT AVG(attendance) FROM table_name_10 WHERE record = "11–12"
sql_create_context
CREATE TABLE table_7914 ( "Name" text, "League" real, "FA Cup" real, "League Cup" real, "Total" real )
what is the lowest total when the league cup is more than 0, the name is hei ar helguson and the league is less than 3?
SELECT MIN("Total") FROM table_7914 WHERE "League Cup" > '0' AND "Name" = 'heiðar helguson' AND "League" < '3'
wikisql
CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Reviewer ( rID int, name text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date )
In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently, and count them by a line chart
SELECT year, COUNT(year) FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID = T2.mID WHERE T2.stars >= 4 ORDER BY T1.year
nvbench
CREATE TABLE table_26218783_7 ( sd INTEGER, status VARCHAR )
What is the highest sd when the status is second round lost to iveta bene ov ?
SELECT MAX(sd) FROM table_26218783_7 WHERE status = "Second round lost to Iveta Benešová"
sql_create_context
CREATE TABLE table_name_7 ( class_aA VARCHAR, class_aAA VARCHAR, giddings VARCHAR, school_year VARCHAR )
What is the Class AA in the 2010-11 school year with a class AAA of Giddings?
SELECT class_aA FROM table_name_7 WHERE class_aAA = giddings AND school_year = "2010-11"
sql_create_context
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
患者49189270有多少次住院发生在2006年4月30日到2019年3月21日之间?
SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.PERSON_ID = '49189270' AND t_kc21.IN_HOSP_DATE BETWEEN '2006-04-30' AND '2019-03-21' AND t_kc21.CLINIC_TYPE = '住院'
css
CREATE TABLE publication ( Publication_ID int, Book_ID int, Publisher text, Publication_Date text, Price real ) CREATE TABLE book ( Book_ID int, Title text, Issues real, Writer text )
Draw a bar chart of publisher versus the total number, sort from low to high by the bars.
SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher ORDER BY Publisher
nvbench
CREATE TABLE table_name_53 ( total INTEGER, silver VARCHAR, rank VARCHAR )
What is the total when silver is more than 3, and rank is 2?
SELECT MAX(total) FROM table_name_53 WHERE silver > 3 AND rank = "2"
sql_create_context
CREATE TABLE table_36775 ( "Rank" real, "Name" text, "Nationality" text, "1st (m)" real, "2nd (m)" real, "Points" real, "Overall FHT points" text, "Overall WC points (Rank)" text )
What is the highest number of points that has a 1st of 121.5?
SELECT MAX("Points") FROM table_36775 WHERE "1st (m)" = '121.5'
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...
病人任阳焱在门诊诊断为2型糖尿病的检测指标983934的结果定量和单位是多少啊?
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_70571 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What's the average total if the Bronze is 5 and the Silver is less than 4?
SELECT AVG("Total") FROM table_70571 WHERE "Bronze" = '5' AND "Silver" < '4'
wikisql
CREATE TABLE table_36484 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text )
Who was the opponent during the tournament in Kuwait?
SELECT "Opponent in the final" FROM table_36484 WHERE "Tournament" = 'kuwait'
wikisql
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname ...
What grades have I earned in courses which Prof. Cargo taught ?
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 '%Cargo%' AND student_record.student_id = 1
advising
CREATE TABLE table_17216 ( "Institution" text, "Location" text, "Founded" real, "Type" text, "Enrollment" real, "Nickname" text, "Joined" real )
3488 is the enrollment amount of what college?
SELECT "Institution" FROM table_17216 WHERE "Enrollment" = '3488'
wikisql
CREATE TABLE table_train_61 ( "id" int, "white_blood_cell_count_wbc" int, "in_another_study" bool, "systolic_blood_pressure_sbp" int, "trauma" bool, "temperature" float, "anc" int, "hypotension" bool, "heart_rate" int, "paco2" float, "gastrointestinal_disease" bool, "burn...
2 or more systemic inflammatory response syndrome ( sirs ) criteria : temperature < / = 36 c or > / = 38 c ; heart rate > / = 90 beats per minute ; mechanical ventilation for acute respiratory process or respiratory rate > / = 20 breaths per minute or paco2 < 32 mmhg ; wbc > / = 12000 / mm3 or < / = 4000 / mm3 or > 10 ...
SELECT * FROM table_train_61 WHERE (CASE WHEN temperature < 36 OR temperature > 38 THEN 1 ELSE 0 END + CASE WHEN heart_rate > 90 THEN 1 ELSE 0 END + CASE WHEN respiratory_rate > 20 OR paco2 < 32 THEN 1 ELSE 0 END + CASE WHEN white_blood_cell_count_wbc > 12000 OR white_blood_cell_count_wbc < 4000 OR immature_form > 10 T...
criteria2sql
CREATE TABLE building ( building_id text, Name text, Street_address text, Years_as_tallest text, Height_feet int, Floors int ) CREATE TABLE Institution ( Institution_id text, Institution text, Location text, Founded real, Type text, Enrollment int, Team text, Pri...
Let institution types as the X-axis and the number of institutions for each type as Y-axis, the visualization type is bar chart, rank bars in descending order.
SELECT Type, COUNT(*) FROM Institution GROUP BY Type ORDER BY Type DESC
nvbench
CREATE TABLE table_53352 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which home team scored a 15.16 (106)?
SELECT "Home team" FROM table_53352 WHERE "Home team score" = '15.16 (106)'
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 )
A bar chart about what is the total revenue of each manufacturer?, and show by the total number of revenue in asc.
SELECT Name, SUM(Revenue) FROM Manufacturers GROUP BY Name ORDER BY SUM(Revenue)
nvbench
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 death status is 0 and drug name is loperamide?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.expire_flag = "0" AND prescriptions.drug = "Loperamide"
mimicsql_data
CREATE TABLE table_3950 ( "Order" real, "Episode" text, "Original airdate" text, "Timeslot" text, "Viewers (millions)" text, "Nightly rank" real, "Weekly rank" text )
Which episode was #1 in the order?
SELECT "Episode" FROM table_3950 WHERE "Order" = '1'
wikisql
CREATE TABLE Student ( advisor VARCHAR )
Show all advisors who have at least two students.
SELECT advisor FROM Student GROUP BY advisor HAVING COUNT(*) >= 2
sql_create_context
CREATE TABLE table_44874 ( "State" text, "Preliminary Average" text, "Interview" text, "Swimsuit" text, "Evening Gown" text, "Semifinal Average" text )
What is the evening gown score for the contestant from Mississippi?
SELECT "Evening Gown" FROM table_44874 WHERE "State" = 'mississippi'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
How many patients have their marital status as widowed and operated for procedure icd9 code 4610?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "WIDOWED" AND procedures.icd9_code = "4610"
mimicsql_data
CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15), Budget_Type_Description VARCHAR(255) ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Accounts ( Account_ID INTEGER, Statement_I...
What are the different statement ids on accounts, and the number of accounts for each. Visualize by scatter chart.
SELECT Statement_ID, COUNT(*) FROM Accounts GROUP BY Statement_ID
nvbench
CREATE TABLE table_26430 ( "Profile" text, "Bandwidth ( MHz )" text, "Number of carriers" real, "Carrier bandwidth (kHz)" text, "Power ( dBm )" text, "Max. downstream throughput ( Mbit/s )" real )
List all dbm's when profiles are 8a.
SELECT "Power ( dBm )" FROM table_26430 WHERE "Profile" = '8a'
wikisql
CREATE TABLE table_6774 ( "Season" text, "Round" text, "Date" text, "Home" text, "Away" text, "Result" text )
What season had a date of 30 august 1980
SELECT "Season" FROM table_6774 WHERE "Date" = '30 august 1980'
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 marital status is divorced and diagnoses short title is heart valve transplant?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "DIVORCED" AND diagnoses.short_title = "Heart valve transplant"
mimicsql_data
CREATE TABLE table_68233 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Record" text )
What was the record at the game that had a loss of Spillner (1-8)?
SELECT "Record" FROM table_68233 WHERE "Loss" = 'spillner (1-8)'
wikisql
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, ...
when did patient 1372 since 102 months ago last get a mrsa screen microbiology test?
SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1372) AND microbiologyevents.spec_type_desc = 'mrsa screen' AND DATETIME(microbiologyevents.charttime) >= DATETIME(CURRENT_TIME(), '-102 month') ORDER ...
mimic_iii
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
孙文心病患在一三年八月十二日到一八年六月十一日内期间主要看哪位医生?
SELECT gwyjzb.OUT_DIAG_DOC_CD, gwyjzb.OUT_DIAG_DOC_NM FROM gwyjzb WHERE gwyjzb.PERSON_NM = '孙文心' AND gwyjzb.IN_HOSP_DATE BETWEEN '2013-08-12' AND '2018-06-11' GROUP BY gwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT fgwyjzb.OUT_DIAG_DOC_CD, fgwyjzb.OUT_DIAG_DOC_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM...
css
CREATE TABLE table_name_63 ( nhl_team VARCHAR, college_junior_club_team__league_ VARCHAR )
which NHL team has a College/Junior/Club Team (League) of shattuck-saint mary's school (midget major aaa)?
SELECT nhl_team FROM table_name_63 WHERE college_junior_club_team__league_ = "shattuck-saint mary's school (midget major aaa)"
sql_create_context
CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) ) CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) )
What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision. Plot them as bar chart.
SELECT state, enr FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes'
nvbench
CREATE TABLE table_830 ( "County" text, "Bush #" real, "Bush %" text, "Kerry #" real, "Kerry %" text, "Others #" real, "Others %" text, "Total" real )
what is the minimum kerry # with bush % being 78.40%
SELECT MIN("Kerry #") FROM table_830 WHERE "Bush %" = '78.40%'
wikisql
CREATE TABLE table_70737 ( "Model" text, "Build date" text, "Total produced" real, "Wheel arrangement" text, "Prime mover" text, "Power output" text )
What model has a total produced more than 5 and a prime move of 12-251c?
SELECT "Model" FROM table_70737 WHERE "Total produced" > '5' AND "Prime mover" = '12-251c'
wikisql
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...
Draw a scatter chart about the correlation between Team_ID and All_Games_Percent , and group by attribute All_Home.
SELECT Team_ID, All_Games_Percent FROM basketball_match GROUP BY All_Home
nvbench
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugsto...
how many days have elapsed since the first time that patient 004-13127 stayed in ward 236 in this hospital visit?
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '004-13127' AND patient.wardid = 236 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime LIMIT 1
eicu
CREATE TABLE table_35052 ( "gzip" text, "bzip2" text, "LHA/LZH" text, "StuffIt" text, "StuffIt X" text, "ISO/CD Image" text )
What is the stuffit that has bzip and LHA/LZH of no?
SELECT "StuffIt" FROM table_35052 WHERE "bzip2" = 'no' AND "LHA/LZH" = 'no'
wikisql
CREATE TABLE table_1507852_1 ( category VARCHAR, attribute VARCHAR )
How many categories are there when the attribute is 'onreset'?
SELECT COUNT(category) FROM table_1507852_1 WHERE attribute = "onreset"
sql_create_context
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 varchar(2) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL v...
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of job_id and department_id in a bar chart, list in ascending by the DEPARTMENT_ID please.
SELECT JOB_ID, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY DEPARTMENT_ID
nvbench
CREATE TABLE table_name_25 ( cancelable VARCHAR, attribute VARCHAR )
Name the cancelable for onmouseover
SELECT cancelable FROM table_name_25 WHERE attribute = "onmouseover"
sql_create_context
CREATE TABLE table_30709 ( "Sl. No" real, "Category wise" text, "Single lane" real, "Intermediate lane" real, "Double lane" real, "Multi lane" real, "Total" real )
What is every category wise when the multi lane is 677?
SELECT "Category wise" FROM table_30709 WHERE "Multi lane" = '677'
wikisql
CREATE TABLE Stay ( StayID INTEGER, Patient INTEGER, Room INTEGER, StayStart DATETIME, StayEnd DATETIME ) CREATE TABLE Physician ( EmployeeID INTEGER, Name VARCHAR(30), Position VARCHAR(30), SSN INTEGER ) CREATE TABLE Room ( RoomNumber INTEGER, RoomType VARCHAR(30), Blo...
Display a bar chart for how many medications are prescribed for each brand?, and I want to display in desc by the x axis.
SELECT Name, COUNT(*) FROM Medication AS T1 JOIN Prescribes AS T2 ON T1.Code = T2.Medication GROUP BY T1.Brand ORDER BY Name DESC
nvbench
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_diagnoses ( ...
what are the genders of patient 7107?
SELECT patients.gender FROM patients WHERE patients.subject_id = 7107
mimic_iii
CREATE TABLE table_17015_2 ( pe̍h_ōe_jī VARCHAR, chinese VARCHAR )
Name the pe h- e-j for
SELECT pe̍h_ōe_jī FROM table_17015_2 WHERE chinese = "前金區"
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, ...
how many days elapsed since patient 006-122712 received the last procedure in their current hospital visit?
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-122712...
eicu
CREATE TABLE table_name_31 ( goals_scored INTEGER, club VARCHAR, wins VARCHAR )
How many goals scored have utenis utena as the club, with wins less than 8?
SELECT SUM(goals_scored) FROM table_name_31 WHERE club = "utenis utena" AND wins < 8
sql_create_context
CREATE TABLE table_44022 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What was the Week number on November 20, 1977?
SELECT SUM("Week") FROM table_44022 WHERE "Date" = 'november 20, 1977'
wikisql
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...
在2007-08-06到2021-12-19期间内,患者70148968被开出的所有检验报告单中的标本采集部位需要列出来
SELECT jybgb.BBCJBW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_in...
css
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...
从08年10月22日起的2年内,患者66306240的395514指标情况记录
SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.RYBH = '...
css
CREATE TABLE ftxmzjzjlb ( 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...
门诊就诊96534570351给出的诊断和诊断编号是什么
SELECT txmzjzjlb.JZZDBM, txmzjzjlb.JZZDSM FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '96534570351' UNION SELECT ftxmzjzjlb.JZZDBM, ftxmzjzjlb.JZZDSM FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '96534570351'
css
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...
算下药品数与单个药品价格乘积在医疗花费11966451012的明细费用记录里的结果
SELECT t_kc22.QTY * t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_EXP_DET_ID = '11966451012'
css
CREATE TABLE table_25505 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What was the score against houston?
SELECT "Score" FROM table_25505 WHERE "Team" = 'Houston'
wikisql
CREATE TABLE routes ( rid number, dst_apid number, dst_ap text, src_apid number, src_ap text, alid number, airline text, codeshare text ) CREATE TABLE airlines ( alid number, name text, iata text, icao text, callsign text, country text, active text ) CREATE ...
What is the name of the airline with the most routes?
SELECT T1.name FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_23981771_1 ( song_title VARCHAR, artist VARCHAR )
What is the song for Dixie Chicks?
SELECT song_title FROM table_23981771_1 WHERE artist = "Dixie Chicks"
sql_create_context
CREATE TABLE table_47270 ( "Name" text, "Years" text, "League" real, "Scottish Cup" real, "League Cup" real, "Europe" real, "Total" real )
Which League Cup has a Scottish Cup larger than 69?
SELECT SUM("League Cup") FROM table_47270 WHERE "Scottish Cup" > '69'
wikisql