context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medication...
in 2105 patient 006-47576 had been prescribed maalox?
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-47576')) AND medication.drugname = 'maalox' AND STRFTIME('%y', medicat...
eicu
CREATE TABLE table_name_58 ( name VARCHAR, source VARCHAR )
What player is associated with soenderjyske.dk?
SELECT name FROM table_name_58 WHERE source = "soenderjyske.dk"
sql_create_context
CREATE TABLE table_203_486 ( id number, "place" number, "team" text, "matches" number, "won" number, "drawn" number, "lost" number, "difference" text, "points" number )
how many teams won at least 2 games throughout the 1951 world ice hockey championships ?
SELECT COUNT("team") FROM table_203_486 WHERE "won" >= 2
squall
CREATE TABLE table_49026 ( "School Year" text, "Volleyball" text, "Cross Country" text, "Soccer" text, "Tennis" text, "Golf" text )
What is School Year, when Cross Country is Lexington, when Soccer is Ashland, and when Volleyball is Wooster?
SELECT "School Year" FROM table_49026 WHERE "Cross Country" = 'lexington' AND "Soccer" = 'ashland' AND "Volleyball" = 'wooster'
wikisql
CREATE TABLE table_203_61 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
what was the total number of medals won by madagascar ?
SELECT "total" FROM table_203_61 WHERE "nation" = 'madagascar'
squall
CREATE TABLE table_32595 ( "Rank" real, "Player" text, "Nation" text, "Assist" real, "Games" real, "Years" text )
How many games had an assist number greater than 54?
SELECT SUM("Games") FROM table_32595 WHERE "Assist" > '54'
wikisql
CREATE TABLE table_18349697_1 ( province VARCHAR, _community VARCHAR, age VARCHAR )
What is the province where the age of the contestant is 27?
SELECT province, _community FROM table_18349697_1 WHERE age = 27
sql_create_context
CREATE TABLE qtb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
4063324这所医疗机构在20零六年九月三十到零九年的六月二十二号所有就诊记录里就诊患者是未就业人员的数目
SELECT COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '4063324' AND qtb.IN_HOSP_DATE BETWEEN '2006-09-30' AND '2009-06-22' AND qtb.INSURED_STS = '未就业' UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '4063324' AND gyb.IN_HOSP_DATE BETWEEN '2006-09-30' AND '2009-06-22' AND gyb.INSURED_STS = '未就业' UNION SELECT COU...
css
CREATE TABLE table_40944 ( "Season" text, "Round" text, "Opponents" text, "Home leg" text, "Away leg" text, "Aggregate" text )
What is the home leg who are opponents of rotor volgograd
SELECT "Home leg" FROM table_40944 WHERE "Opponents" = 'rotor volgograd'
wikisql
CREATE TABLE table_name_43 ( opponents VARCHAR, djurgården_scorers VARCHAR )
What are the Opponents that have Djurg rden scorers of sj lund (2)?
SELECT opponents FROM table_name_43 WHERE djurgården_scorers = "sjölund (2)"
sql_create_context
CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15), Budget_Type_Description VARCHAR(255) ) CREATE TABLE Documents ( Document_ID INTEGER, Document_Type_Code CHAR(15), Project_ID INTEGER, Document_Date DATETIME, Document_Name VARCHAR(255), Document_Description VARCHAR(255), Oth...
Pie chart. what is the project id and detail for the project with at least two documents?
SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID
nvbench
CREATE TABLE table_name_97 ( team VARCHAR, venue VARCHAR )
What team plays in Dinamo, Brest?
SELECT team FROM table_name_97 WHERE venue = "dinamo, brest"
sql_create_context
CREATE TABLE table_34782 ( "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponent in the final" text, "Score" text )
What is the Opponent from the final with a Partner named jorgelina cravero?
SELECT "Opponent in the final" FROM table_34782 WHERE "Partner" = 'jorgelina cravero'
wikisql
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE days ( days_code varchar, day_name varchar ) CR...
i'd like to have flight from DENVER to PITTSBURGH
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBU...
atis
CREATE TABLE table_12890 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text, "Streak" text )
Which Record has an Opponent of milwaukee bucks?
SELECT "Record" FROM table_12890 WHERE "Opponent" = 'milwaukee bucks'
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...
provide the number of patients whose admission year is less than 2203 and lab test name is carboxyhemoglobin?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2203" AND lab.label = "Carboxyhemoglobin"
mimicsql_data
CREATE TABLE table_name_38 ( points INTEGER, year VARCHAR )
Name the sum of points for 1992
SELECT SUM(points) FROM table_name_38 WHERE year = 1992
sql_create_context
CREATE TABLE table_203_134 ( id number, "place" text, "player" text, "country" text, "score" text, "to par" number )
what is the total number of players who tied for fourth , seventh , and tenth combined ?
SELECT COUNT("player") FROM table_203_134 WHERE "place" IN (4, 7, 10)
squall
CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE paperfield ( fieldid int, paperid int )...
which papers in icml 2014 had lasso in them ?
SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'lasso' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2014 AND venue.venueid = paper.venueid AND venue.venuename = 'icml'
scholar
CREATE TABLE table_18914438_1 ( best VARCHAR, career VARCHAR )
What was the Best score during the game played from 1971-1984?
SELECT best FROM table_18914438_1 WHERE career = "1971-1984"
sql_create_context
CREATE TABLE table_55229 ( "Event" text, "Record" text, "Athlete" text, "Nationality" text, "Date" text )
What was the date of the discus throw for Bulgaria?
SELECT "Date" FROM table_55229 WHERE "Nationality" = 'bulgaria' AND "Event" = 'discus throw'
wikisql
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, ...
患者邹嘉禧在09年10月29日到11年7月16日,是找的哪些工号及姓名的医务人员检测指标704270的
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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.J...
css
CREATE TABLE table_74143 ( "Date" text, "Player" text, "Injury" text, "Date of injury" text, "Number of matches (Total)" text, "Source" text )
How many times was the date october 3, 2010?
SELECT COUNT("Player") FROM table_74143 WHERE "Date" = 'October 3, 2010'
wikisql
CREATE TABLE table_19744915_18 ( couple VARCHAR, rank VARCHAR )
When 9 is the rank who are the couple?
SELECT couple FROM table_19744915_18 WHERE rank = 9
sql_create_context
CREATE TABLE table_name_55 ( event VARCHAR, opponent VARCHAR )
Which event had Carlos Alexandre Pereira as opponent?
SELECT event FROM table_name_55 WHERE opponent = "carlos alexandre pereira"
sql_create_context
CREATE TABLE table_name_77 ( opponents_in_the_final VARCHAR, date VARCHAR, score_in_the_final VARCHAR )
What Opponents in the final had a match in 1984 with a Score in the final of 7 6, 6 1?
SELECT opponents_in_the_final FROM table_name_77 WHERE date = 1984 AND score_in_the_final = "7–6, 6–1"
sql_create_context
CREATE TABLE Student_Course_Enrolment ( course_id VARCHAR ) CREATE TABLE Courses ( course_name VARCHAR, course_id VARCHAR )
What is the name of each course and the corresponding number of student enrollment?
SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name
sql_create_context
CREATE TABLE table_73916 ( "Outcome" text, "No." text, "Date" text, "Championship" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
How many championships are there on the date January 9, 2005?
SELECT COUNT("Championship") FROM table_73916 WHERE "Date" = 'January 9, 2005'
wikisql
CREATE TABLE table_name_2 ( yards INTEGER, long VARCHAR, avg VARCHAR, player VARCHAR )
Which Yards have an avg of 11.8, and a Player of brent celek, and a Long larger than 44?
SELECT AVG(yards) FROM table_name_2 WHERE avg = 11.8 AND player = "brent celek" AND long > 44
sql_create_context
CREATE TABLE table_62981 ( "Year" real, "Category" text, "Nominee(s)" text, "Episode" text, "Result" text )
What is the result when the nominee(s) of janine sherman?
SELECT "Result" FROM table_62981 WHERE "Nominee(s)" = 'janine sherman'
wikisql
CREATE TABLE Apartment_Buildings ( building_id INTEGER, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80) ) CREATE TABLE Apartments ( apt_id INTEGER, ...
What is the booking start dates of the apartments with type code 'Duplex'? Bin the year into weekday interval with a bar chart.
SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex"
nvbench
CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int ) CREATE TABLE Scientists ( SSN int, Name Char(30) ) CREATE TABLE AssignedTo ( Scientist int, Project char(4) )
Give me a histogram for what are the names of projects that require more than 300 hours, and how many scientists are assigned to each?, list from high to low by the the total number .
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project WHERE T1.Hours > 300 GROUP BY T1.Name ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_name_40 ( b_score INTEGER, position VARCHAR, a_score VARCHAR )
what is the score for the 5th position and a score less than 7
SELECT MIN(b_score) FROM table_name_40 WHERE position = "5th" AND a_score < 7
sql_create_context
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewT...
Posts where the title contains the given string.
SELECT Id AS "post_link", Title FROM Posts WHERE Title LIKE '%##text?he##%' ORDER BY Id DESC
sede
CREATE TABLE technician ( technician_id real, Name text, Team text, Starting_Year real, Age int ) CREATE TABLE machine ( Machine_ID int, Making_Year int, Class text, Team text, Machine_series text, value_points real, quality_rank int ) CREATE TABLE repair ( repair_I...
List the number of the name of technicians whose team is not 'NYY'.
SELECT Name, COUNT(Name) FROM technician WHERE Team <> "NYY" GROUP BY Name
nvbench
CREATE TABLE table_18095719_2 ( pole_position VARCHAR, round VARCHAR )
Who had pole position in round 7?
SELECT pole_position FROM table_18095719_2 WHERE round = 7
sql_create_context
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TI...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, what is the relationship between salary and commission_pct ?
SELECT SALARY, COMMISSION_PCT FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
nvbench
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) 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, ...
患者84544410的直接胆红素二代指标在06年11月10日-13年2月14日期间是怎样的
(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 table_204_582 ( id number, "model" text, "launch" text, "code name" text, "fab (nm)" number, "bus interface" text, "memory (mib)" text, "core clock (mhz)" number, "memory clock (mhz)" number, "config core1" text, "fillrate\nmoperations/s" number, "fillrate\nm...
what is the number of mpixels/s that voodoo banshee had ?
SELECT "fillrate\nmpixels/s" FROM table_204_582 WHERE "model" = 'voodoo banshee'
squall
CREATE TABLE table_name_91 ( nationality VARCHAR, team VARCHAR )
What is the nationality for milwaukee hawks?
SELECT nationality FROM table_name_91 WHERE team = "milwaukee hawks"
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...
从零零年一月二十四号到零四年四月十四号,患者85533304这个甲状腺摄取实验情况怎么样
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 SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostNoticeTypes ( Id...
Get user reputation on a given site.
SELECT Reputation FROM "##Site##".Users WHERE AccountId = '##aUId##'
sede
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, ...
Last 10 Posts From Me.
SELECT * FROM Posts WHERE OwnerUserId = @UserId ORDER BY LastActivityDate DESC LIMIT 10
sede
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 demographic (...
give me the number of patients whose diagnoses long title is heart valve replaced by transplant and drug type is base?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Heart valve replaced by transplant" AND prescriptions.drug_type = "BASE"
mimicsql_data
CREATE TABLE table_name_27 ( language VARCHAR, content VARCHAR )
What is Language, when Content is Monoscopio?
SELECT language FROM table_name_27 WHERE content = "monoscopio"
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
provide the number of patients whose days of hospital stay is greater than 6 and diagnoses icd9 code is 60000?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "6" AND diagnoses.icd9_code = "60000"
mimicsql_data
CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_p...
What are the upper-level elective options for the Fall and Winter ?
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (semester.semester = ...
advising
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number,...
what were the numbers of patients admitted to hospital since 2104?
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE STRFTIME('%y', admissions.admittime) >= '2104'
mimic_iii
CREATE TABLE table_name_87 ( prominence__m_ INTEGER, elevation__m_ VARCHAR )
What is the lowest prominence for a peak with elevation of 3,615 meters?
SELECT MIN(prominence__m_) FROM table_name_87 WHERE elevation__m_ = 3 OFFSET 615
sql_create_context
CREATE TABLE table_name_44 ( date VARCHAR, record VARCHAR )
On what date did the Cavaliers have a record of 9-14?
SELECT date FROM table_name_44 WHERE record = "9-14"
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...
What number of patients whose discharge location is snf had the primary disease of pneumonia human immunodefiency virus but not tuberculosis?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.diagnosis = "PNEUMONIA;HUMAN IMMUNODEFIENCY VIRUS;RULE OUT TUBERCULOSIS"
mimicsql_data
CREATE TABLE table_name_59 ( goals VARCHAR, player VARCHAR )
What are the goals of Mile Sterjovski as a player?
SELECT goals FROM table_name_59 WHERE player = "mile sterjovski"
sql_create_context
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
在中医门诊诊察的35311934275病人的编号以及名称分别是什么?
SELECT mzjzjlb.MZZYZDZZBM, mzjzjlb.MZZYZDZZMC FROM mzjzjlb WHERE mzjzjlb.JZLSH = '35311934275'
css
CREATE TABLE table_27756572_6 ( high_points VARCHAR, team VARCHAR )
Who and what were the high points player for the game against Detroit?
SELECT high_points FROM table_27756572_6 WHERE team = "Detroit"
sql_create_context
CREATE TABLE table_name_85 ( loss VARCHAR, date VARCHAR )
On May 29 which team had the loss?
SELECT loss FROM table_name_85 WHERE date = "may 29"
sql_create_context
CREATE TABLE table_name_60 ( week INTEGER, record VARCHAR, attendance VARCHAR )
Name the most week for record of 1-2 and attendance more than 61,602
SELECT MAX(week) FROM table_name_60 WHERE record = "1-2" AND attendance > 61 OFFSET 602
sql_create_context
CREATE TABLE table_name_55 ( high_points VARCHAR, high_rebounds VARCHAR )
What is the High points of charles oakley , kevin willis (11)?
SELECT high_points FROM table_name_55 WHERE high_rebounds = "charles oakley , kevin willis (11)"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, ...
知不知道住院就诊18256092603的门诊中医诊断编号是什么
SELECT zyjzjlb.MZZYZDZZBM FROM zyjzjlb WHERE zyjzjlb.JZLSH = '18256092603'
css
CREATE TABLE table_75649 ( "Game" real, "January" real, "Opponent" text, "Score" text, "Record" text, "Points" real )
Which Points is the lowest one that has a Score of 1 4, and a January smaller than 18?
SELECT MIN("Points") FROM table_75649 WHERE "Score" = '1–4' AND "January" < '18'
wikisql
CREATE TABLE table_45822 ( "Name" text, "Height" text, "Weight" text, "Spike" text, "2008 club" text )
What was the name of the player from Olympiacos in 2008?
SELECT "Name" FROM table_45822 WHERE "2008 club" = 'olympiacos'
wikisql
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
Create a pie chart showing all_games_percent across acc regular season.
SELECT ACC_Regular_Season, All_Games_Percent FROM basketball_match
nvbench
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 regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE employees ( EMPLOYEE_I...
For employees without the letter M in their first name, give me a line chart to show the salary change over their hire date using a line chart.
SELECT HIRE_DATE, SALARY FROM employees WHERE NOT FIRST_NAME LIKE '%M%'
nvbench
CREATE TABLE table_78101 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the highest rank a team with 1 silver and less than 5 bronze medals has?
SELECT MAX("Rank") FROM table_78101 WHERE "Silver" = '1' AND "Bronze" < '5'
wikisql
CREATE TABLE table_27589 ( "June 10-11" text, "March 27-29" text, "January 15-16" text, "November 3" text, "August 21-22" text )
What is january 15-16 when november 3 is 153?
SELECT "January 15-16" FROM table_27589 WHERE "November 3" = '153'
wikisql
CREATE TABLE zyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
陈玲玲这个病人在07年4月17到14年6月22日买过多少次西药
SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '陈玲玲' AND t_kc22.STA_DATE BETWEEN '2007-04-17' AND '2014-06-22' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_NM = '陈玲玲' A...
css
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CR...
just show me the top five most common diagnoses in 2105?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE STRFTIME('%y', diagnoses_icd.charttime) = '2105' GROUP BY diagnoses_icd.icd9_code) AS t1 WHERE t...
mimic_iii
CREATE TABLE table_27322 ( "Region" text, "Prison inmates Men" real, "Prison inmates Women" real, "Prison inmates Total" real, "Incarceration rate Male" real, "Incarceration rate Female" real, "Incarceration rate Total" real, "Country comparison" text )
What is the male incarceration rate of maule?
SELECT MAX("Incarceration rate Male") FROM table_27322 WHERE "Region" = 'Maule'
wikisql
CREATE TABLE table_name_43 ( date VARCHAR, record VARCHAR )
Which Date has a Record of 21 10?
SELECT date FROM table_name_43 WHERE record = "21–10"
sql_create_context
CREATE TABLE table_204_250 ( id number, "date" text, "opponent#" text, "rank#" text, "site" text, "result" text, "attendance" number )
what site at most is taken place ?
SELECT "site" FROM table_204_250 GROUP BY "site" ORDER BY COUNT(*) DESC LIMIT 1
squall
CREATE TABLE table_66344 ( "Rank" real, "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
When rank is 33, what is the smallest lane?
SELECT MIN("Lane") FROM table_66344 WHERE "Rank" = '33'
wikisql
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airli...
all am flights departing PITTSBURGH arriving DENVER
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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DE...
atis
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...
how many patients with procedure titled replacement of tube or enterostomy device of small intestine had blood gas as lab test category?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Replacement of tube or enterostomy device of small intestine" AND lab."CATEGORY" = "Blood Gas"
mimicsql_data
CREATE TABLE table_22645714_5 ( tournament_venue__city_ VARCHAR, conference VARCHAR )
How many locations are listed for the Big 12 Conference?
SELECT COUNT(tournament_venue__city_) FROM table_22645714_5 WHERE conference = "Big 12 conference"
sql_create_context
CREATE TABLE table_name_73 ( att_cmp_int VARCHAR, effic VARCHAR, gp_gs VARCHAR )
What is the att-cmp-int with an effic smaller than 117.88 and a gp-gs of 10-0?
SELECT att_cmp_int FROM table_name_73 WHERE effic < 117.88 AND gp_gs = "10-0"
sql_create_context
CREATE TABLE table_name_44 ( issue INTEGER, artist VARCHAR, spoofed_title VARCHAR )
Which issue was the Spoofed title Route 67 for which Mort Drucker was the artist?
SELECT SUM(issue) FROM table_name_44 WHERE artist = "mort drucker" AND spoofed_title = "route 67"
sql_create_context
CREATE TABLE table_204_889 ( id number, "date" text, "week (stage)" text, "song choice" text, "original artist" text, "theme" text, "result" text )
what song was in the first week ?
SELECT "song choice" FROM table_204_889 WHERE "week (stage)" = 1
squall
CREATE TABLE table_19089486_1 ( clubs_involved INTEGER, leagues_entering_this_round VARCHAR, round VARCHAR )
Name the least clubs involved for leagues being none for semi finals
SELECT MIN(clubs_involved) FROM table_19089486_1 WHERE leagues_entering_this_round = "none" AND round = "Semi finals"
sql_create_context
CREATE TABLE table_name_66 ( player VARCHAR, to_par VARCHAR )
Which player had a To par of +11?
SELECT player FROM table_name_66 WHERE to_par = "+11"
sql_create_context
CREATE TABLE table_name_76 ( scores_by_each_individual_judge VARCHAR, total_score_week VARCHAR, co_contestant__yaar_vs_pyaar_ VARCHAR )
What Scores by each individual judge has a Total score/week of 51/60, and a Co-contestant (Yaar vs. Pyaar) of tina sachdev?
SELECT scores_by_each_individual_judge FROM table_name_76 WHERE total_score_week = "51/60" AND co_contestant__yaar_vs_pyaar_ = "tina sachdev"
sql_create_context
CREATE TABLE table_11390711_4 ( english_name VARCHAR, abbreviation VARCHAR )
Which colleges have the english abbreviation MTC?
SELECT english_name FROM table_11390711_4 WHERE abbreviation = "MTC"
sql_create_context
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, ...
在哪几次医疗记录中给病人59512324售卖的药品均价超过9835.59元?医疗就诊编号都是多少?
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '59512324' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 9835.59)
css
CREATE TABLE table_name_52 ( score VARCHAR, date VARCHAR )
WHAT SCORE WAS ON 1999-05-31?
SELECT score FROM table_name_52 WHERE date = "1999-05-31"
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 daily minimum of chest tube b amount output of patient 007-1517 on the first icu visit?
SELECT MIN(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 = '007-1517') AND NOT patient.unitdischargetime IS ...
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...
门诊诊断为患有疾病M79.046的病人的籍贯名称叫什么?籍贯代码是什么?相应人数有多少?
SELECT hz_info.person_info_JGDM, hz_info.person_info_JGMC, COUNT(hz_info.RYBH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.JZZDBM = 'M79.046' GROUP BY hz_info.person_info_JGDM
css
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE chartevents...
how many times since 6 years ago rifampin was prescribed for patient 16066?
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16066) AND prescriptions.drug = 'rifampin' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-6 year')
mimic_iii
CREATE TABLE table_4114 ( "Townland" text, "s Acre" real, "Barony" text, "Civil parish" text, "Poor law union" text )
What is the maximum acres in Castledermot?
SELECT MAX("s Acre") FROM table_4114 WHERE "Civil parish" = 'Castledermot'
wikisql
CREATE TABLE table_40335 ( "Year" text, "GP/GS" text, "Shots" real, "Goals" real, "Assists" real, "Points" real )
What is the total number of Points that were in a Year that was 2005?
SELECT COUNT("Points") FROM table_40335 WHERE "Year" = '2005'
wikisql
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, ...
Monthly activity distribution by year of registration.
WITH Raw AS (SELECT TIME_TO_STR(Users.CreationDate, '%Y') AS UserYear, DATEFROMPARTS(TIME_TO_STR(Posts.CreationDate, '%Y'), TIME_TO_STR(Posts.CreationDate, '%-M'), 1) AS PostMonth, COUNT(*) AS Count FROM Posts, Users WHERE Posts.OwnerUserId = Users.Id AND Posts.OwnerUserId > 0 GROUP BY TIME_TO_STR(Users.CreationDate, '...
sede
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH te...
门诊给08451089这个病人诊断为高血压病,看看编号为516626的这个检测指标的结果定量及其单位
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb...
css
CREATE TABLE table_28059992_5 ( pick__number INTEGER, player VARCHAR )
What draft pick number was Andy Brereton?
SELECT MIN(pick__number) FROM table_28059992_5 WHERE player = "Andy Brereton"
sql_create_context
CREATE TABLE table_204_616 ( id number, "township" text, "fips" number, "population\ncenter" text, "population" number, "population\ndensity\n/km2 (/sq mi)" text, "land area\nkm2 (sq mi)" text, "water area\nkm2 (sq mi)" text, "water %" text, "geographic coordinates" text )
how many townships are in leavenworth county ?
SELECT COUNT("township") FROM table_204_616
squall
CREATE TABLE table_name_79 ( country VARCHAR, director VARCHAR )
Which Country has the Director Chen Kaige?
SELECT country FROM table_name_79 WHERE director = "chen kaige"
sql_create_context
CREATE TABLE table_name_78 ( long VARCHAR, car VARCHAR, yards VARCHAR )
What is the long for the player with under 30 carries and 0 yards?
SELECT long FROM table_name_78 WHERE car < 30 AND yards = "0"
sql_create_context
CREATE TABLE table_11474 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
When Richmond is the Away team, what did they score?
SELECT "Away team score" FROM table_11474 WHERE "Away team" = 'richmond'
wikisql
CREATE TABLE table_2562572_43 ( dominant_religion__2002_ VARCHAR, largest_ethnic_group__2002_ VARCHAR, type VARCHAR )
What was the 2002 dominant religion when the largest ethnic group (2002) was slovaks and type is village?
SELECT dominant_religion__2002_ FROM table_2562572_43 WHERE largest_ethnic_group__2002_ = "Slovaks" AND type = "village"
sql_create_context
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, find name and code , and group by attribute headquarter, and visualize them by a bar chart, I want to display by the total number from low to high please.
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Code
nvbench
CREATE TABLE table_25822 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Opponent in the final" text, "Score in the final" text )
In which championship did John Newcombe play against Ken Rosewall in the final match?
SELECT "Championship" FROM table_25822 WHERE "Opponent in the final" = 'Ken Rosewall'
wikisql
CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE status ( station_i...
For the days with the 3 largest maximum gust speeds, calculate the average mean humidity of each month (bin date into month level).
SELECT date, AVG(mean_humidity) FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3
nvbench
CREATE TABLE table_79129 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text )
What is Finish, when Year(s) Won is '1991'?
SELECT "Finish" FROM table_79129 WHERE "Year(s) won" = '1991'
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
provide the number of patients whose days of hospital stay is greater than 29 and procedure long title is exteriorization of small intestine?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "29" AND procedures.long_title = "Exteriorization of small intestine"
mimicsql_data