context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_83 ( attendance INTEGER, date VARCHAR )
What was the attendance of april 17?
SELECT SUM(attendance) FROM table_name_83 WHERE date = "april 17"
sql_create_context
CREATE TABLE table_name_88 ( moving_from VARCHAR, transfer_window VARCHAR, source VARCHAR )
Where is the moving from location with a transfer window of summer and the source kerkida.net?
SELECT moving_from FROM table_name_88 WHERE transfer_window = "summer" AND source = "kerkida.net"
sql_create_context
CREATE TABLE table_33016 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
For the 1967 Cleveland Browns season what is the total number of times they played the Minnesota Vikings and had an atttendance smaller than 68,431?
SELECT COUNT("Week") FROM table_33016 WHERE "Opponent" = 'minnesota vikings' AND "Attendance" < '68,431'
wikisql
CREATE TABLE table_55597 ( "Year" real, "Network" text, "Play-by-play" text, "Color commentator(s)" text, "Ice level reporters" text )
Who did the play-by-play before 1992 with the Ice level reporter Mike Emrick?
SELECT "Play-by-play" FROM table_55597 WHERE "Year" < '1992' AND "Ice level reporters" = 'mike emrick'
wikisql
CREATE TABLE table_35747 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
What is the Score with an Outcome of runner-up, and a Partner that is elizabeth little?
SELECT "Score" FROM table_35747 WHERE "Outcome" = 'runner-up' AND "Partner" = 'elizabeth little'
wikisql
CREATE TABLE table_45287 ( "Rank" real, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the lest amount of bronzes that ranked 2 and has less silvers than 0?
SELECT MIN("Bronze") FROM table_45287 WHERE "Rank" = '2' AND "Silver" < '0'
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...
在编号为62645586的病人检查中有哪些检验报告单对应的检验结果指标全都异常?检验报告上面的单号是什么?
SELECT jybgb.BGDH 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_info...
css
CREATE TABLE table_28224 ( "Region" text, "Land area (km 2 )" text, "Rainfall by depth (mm/year)" real, "Rainfall by volume (km 3 /year)" text, "Surface run off (km 3 /year)" text, "Infiltration (km 3 /year)" text, "Evapotranspiration (km 3 /year)" text )
In the Central region, what was the infiltration (km 3 /year)?
SELECT "Infiltration (km 3 /year)" FROM table_28224 WHERE "Region" = 'Central'
wikisql
CREATE TABLE table_name_11 ( losses INTEGER, goals_for VARCHAR, wins VARCHAR, points VARCHAR )
How many losses altogether were had by teams that won 12 times, had 40-4 points, and more than 57 goals?
SELECT SUM(losses) FROM table_name_11 WHERE wins = 12 AND points = "40-4" AND goals_for > 57
sql_create_context
CREATE TABLE wrestler ( wrestler_id number, name text, reign text, days_held text, location text, event text ) CREATE TABLE elimination ( elimination_id text, wrestler_id text, team text, eliminated_by text, elimination_move text, time text )
Give the names and locations of all wrestlers.
SELECT name, location FROM wrestler
spider
CREATE TABLE table_name_30 ( long VARCHAR, gain VARCHAR, avg_g VARCHAR, loss VARCHAR )
What's the total long for an avg/g over 0.2, fewer than 2 loss, and a gain less than 8?
SELECT COUNT(long) FROM table_name_30 WHERE avg_g > 0.2 AND loss < 2 AND gain < 8
sql_create_context
CREATE TABLE table_203_446 ( id number, "name" text, "gender" text, "age" number, "from" text, "occupation" text, "prize money (usd)" text, "status" text )
what were the number of contestants that were male ?
SELECT COUNT("name") FROM table_203_446 WHERE "gender" = 'male'
squall
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE patient ( uniquep...
how many days have elapsed since patient 004-13127 last received a -monos lab test on their current hospital visit?
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-13127' AND patient.hospi...
eicu
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( BBCJBW text, BBDM tex...
哪位患者在门诊就诊中开出编码为04680290185检验报告单?
SELECT person_info.XM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZ...
css
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar...
Which courses available in Molecular Anthropology satisfy the MDE requirement ?
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Molecular Anthropology%' OR course.description LIKE '%Molecular Anthropology%' OR course.name LI...
advising
CREATE TABLE table_name_30 ( score VARCHAR, date VARCHAR )
What was the score of the game from July 18?
SELECT score FROM table_name_30 WHERE date = "july 18"
sql_create_context
CREATE TABLE table_33755 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Attendance" real )
What is the date before week 13 and Miami Dolphins as an opponent?
SELECT "Date" FROM table_33755 WHERE "Week" < '13' AND "Opponent" = 'miami dolphins'
wikisql
CREATE TABLE table_name_98 ( season_7 VARCHAR, season_6 VARCHAR )
Which Season 7 has a Season 6 of jim treliving?
SELECT season_7 FROM table_name_98 WHERE season_6 = "jim treliving"
sql_create_context
CREATE TABLE table_13770460_3 ( type VARCHAR, transfer_fee VARCHAR )
What is the type of the player whose transfer fee was 20m?
SELECT type FROM table_13770460_3 WHERE transfer_fee = "€20M"
sql_create_context
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE comment_instructor ( instructor_id int, ...
What 's the easiest way to fulfill the MDE requirement ?
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou...
advising
CREATE TABLE table_name_15 ( game VARCHAR, team VARCHAR )
Which game number did they play the Chicago team?
SELECT game FROM table_name_15 WHERE team = "chicago"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
what was patient 030-10559's first output time of the urine on 11/16/this year?
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-10559')) AND intakeoutput.cellpath LIKE '%output%...
eicu
CREATE TABLE table_61824 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text )
Incumbent John Sullivan has what as biggest first elected?
SELECT MAX("First elected") FROM table_61824 WHERE "Incumbent" = 'john sullivan'
wikisql
CREATE TABLE table_45136 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Location" text )
What is the opponent after round number 1 with a method of decision (unanimous)?
SELECT "Opponent" FROM table_45136 WHERE "Round" > '1' AND "Method" = 'decision (unanimous)'
wikisql
CREATE TABLE table_name_93 ( votes INTEGER, draw VARCHAR, artist VARCHAR )
How many votes did Yvetta Kadakas & Ivo Linna, who had less than 4 draws, have?
SELECT SUM(votes) FROM table_name_93 WHERE draw < 4 AND artist = "yvetta kadakas & ivo linna"
sql_create_context
CREATE TABLE table_51028 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Points difference" text, "Bonus Points" text, "Points" text )
What are the points against with a points difference?
SELECT "Points against" FROM table_51028 WHERE "Points difference" = 'points difference'
wikisql
CREATE TABLE table_37519 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text, "Report" text )
Which home team had an away team of the Brisbane Lions?
SELECT "Home team" FROM table_37519 WHERE "Away team" = 'brisbane lions'
wikisql
CREATE TABLE table_2603 ( "Rank" real, "Athlete" text, "Nation" text, "Olympics" text, "Gold" real, "Silver" real, "Bronze" real, "Total(min. 2 medals)" real )
What nation had the athlete sebastian coe category:articles with hcards?
SELECT "Nation" FROM table_2603 WHERE "Athlete" = 'Sebastian Coe Category:Articles with hCards'
wikisql
CREATE TABLE table_64490 ( "Japanese Title" text, "Romaji Title" text, "TV Station" text, "Episodes" real, "Average Ratings" text )
For the Japanese title that had 11 episodes, what is the average ratings?
SELECT "Average Ratings" FROM table_64490 WHERE "Episodes" = '11' AND "Japanese Title" = 'サプリ'
wikisql
CREATE TABLE table_53719 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text )
What is the date of the game where Dipietro earned a decision and Carolina was the visiting team?
SELECT "Date" FROM table_53719 WHERE "Decision" = 'dipietro' AND "Visitor" = 'carolina'
wikisql
CREATE TABLE table_204_910 ( id number, "rank" number, "name" text, "nationality" text, "result" number, "notes" text )
which country came in first ?
SELECT "nationality" FROM table_204_910 WHERE id = 1
squall
CREATE TABLE table_77366 ( "Movie Title" text, "Year" real, "Role" text, "Director" text, "Producer" text )
What year was Jamboree made?
SELECT "Year" FROM table_77366 WHERE "Movie Title" = 'jamboree'
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...
从2000年12月6日到2013年3月2日期间,列出患者58996582看病时给开出的所有药品的编码、名称、数量、单价、金额
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '58996582' AND t_kc21.IN_HOSP_DATE BETWEEN...
css
CREATE TABLE table_44945 ( "The Year" real, "Division" real, "League" text, "Regular Season" text, "Playoffs" text )
Which Year has a Division larger than 3?
SELECT MAX("The Year") FROM table_44945 WHERE "Division" > '3'
wikisql
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and revenue , and group by attribute name, display in asc by the X.
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name
nvbench
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program ( progr...
How many of the 9 -credit classes are upper level ?
SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 9 AND program_course.category LIKE 'ULCS'
advising
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Tags ( Id number, TagName text, C...
Tags: Spelling variants (AE/BE: o/ou).
WITH PostCounts AS (SELECT Tags.Id AS TagId, COUNT(Posts.Id) AS PostCount FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Tags ON PostTags.TagId = Tags.Id GROUP BY Tags.Id), Variants AS (SELECT * FROM (SELECT REPLACE(TagName, 'ou', 'o') AS vname, * FROM Tags) AS r WHERE vname != TagName) SELECT ...
sede
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, ...
在08年5月15日到08年10月14日内患者67621156所有检验结果指标记录中的检测方法是什么?
SELECT jyjgzbb.JCFF FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH...
css
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...
看看被门诊诊断为疾病U99.814的患者柏志国的检测指标095190的结果定量是什么?单位又是什么
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb 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 = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJ...
css
CREATE TABLE table_name_81 ( mountains_classification VARCHAR, team_classification VARCHAR )
Which Mountains classification has a Team classification of quick step?
SELECT mountains_classification FROM table_name_81 WHERE team_classification = "quick step"
sql_create_context
CREATE TABLE table_455 ( "Episode" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" text, "Result" text )
What is the order number for songs by the original artist Luis Fonsi?
SELECT "Order #" FROM table_455 WHERE "Original artist" = 'Luis Fonsi'
wikisql
CREATE TABLE table_name_94 ( home_team VARCHAR, attendance VARCHAR, away_team VARCHAR )
What is Home Team, when Attendance is '112', and when Away Team is 'Kentish Town'?
SELECT home_team FROM table_name_94 WHERE attendance = "112" AND away_team = "kentish town"
sql_create_context
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime ti...
what were the three most frequently prescribed drugs at the same time, since 2 years ago, among the patients who were prescribed with heparin flush port (10units/ml)?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'heparin flush port (10units/ml)' AND DATETIME(prescriptions.start...
mimic_iii
CREATE TABLE table_10267 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
When st kilda played as the Away team which date was that?
SELECT "Date" FROM table_10267 WHERE "Away team" = 'st kilda'
wikisql
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
how many patients whose primary disease is brain mass;intracranial hemorrhage and lab test fluid is joint fluid?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND lab.fluid = "Joint Fluid"
mimicsql_data
CREATE TABLE table_65002 ( "World record" text, "Snatch" text, "Yang Lian ( CHN )" text, "98kg" text, "Santo Domingo , Dominican" text )
What is the figure for Santo Domingo, Dominican for the world record in the clean & jerk?
SELECT "Santo Domingo , Dominican" FROM table_65002 WHERE "World record" = 'clean & jerk'
wikisql
CREATE TABLE table_203_355 ( id number, "year" number, "total" number, "romanians" text, "hungarians" text, "roma" text )
what were the total number of times the romanians had a population percentage above 70 % ?
SELECT COUNT(*) FROM table_203_355 WHERE "romanians" > 70
squall
CREATE TABLE camera_lens ( id int, brand text, name text, focal_length_mm real, max_aperture real ) CREATE TABLE mountain ( id int, name text, Height real, Prominence real, Range text, Country text ) CREATE TABLE photos ( id int, camera_lens_id int, mountain_id ...
A bar chart for what are the number of the names of photos taken with the lens brand 'Sigma' or 'Olympus'?, and sort by the names in descending please.
SELECT T1.name, COUNT(T1.name) FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' GROUP BY T1.name ORDER BY T1.name DESC
nvbench
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...
Give me a bar chart for team_id of each all neutral, I want to rank by the bar from low to high.
SELECT All_Neutral, Team_ID FROM basketball_match ORDER BY All_Neutral
nvbench
CREATE TABLE college ( cname text, state text, enr number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) CREATE TABLE player ( pid number, pname text, ycard text, hs number )
What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students?
SELECT cname FROM college WHERE enr < 13000 AND state = "AZ" UNION SELECT cname FROM college WHERE enr > 15000 AND state = "LA"
spider
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
How is Nitroglycerin SL administered?
SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Nitroglycerin SL"
mimicsql_data
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
give me the number of patients whose insurance is private and procedure icd9 code is 4105?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.icd9_code = "4105"
mimicsql_data
CREATE TABLE table_name_3 ( conductor VARCHAR, orchestra VARCHAR )
Who is the conductor when the chicago symphony orchestra is featured?
SELECT conductor FROM table_name_3 WHERE orchestra = "chicago symphony orchestra"
sql_create_context
CREATE TABLE table_name_81 ( Id VARCHAR )
Which 2007 has a 2003 of 1r?
SELECT 2007 FROM table_name_81 WHERE 2003 = "1r"
sql_create_context
CREATE TABLE table_13338 ( "Name" text, "Platform" text, "Indication" text, "Status" text, "Collaboration" text )
What company collaborated in pre-clinical autoimmune disease and inflammation?
SELECT "Collaboration" FROM table_13338 WHERE "Status" = 'pre-clinical' AND "Indication" = 'autoimmune disease and inflammation'
wikisql
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, Vote...
Count of posts by age in days.
WITH PostAge AS (SELECT Id, DATEDIFF(day, CreationDate, @LastVote) AS Age FROM Posts WHERE PostTypeId = '##PostTypeId:int?2##'), PostsByAge AS (SELECT Age, COUNT(*) AS Count FROM PostAge GROUP BY Age) SELECT Age, Count, SUM(Count) OVER (ORDER BY Age DESC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS RollingCount...
sede
CREATE TABLE table_15265 ( "Rank" real, "Population" real, "Name" text, "Former Name" text, "Municipality" text )
What is the rank of the town with a population of 258?
SELECT COUNT("Rank") FROM table_15265 WHERE "Population" = '258'
wikisql
CREATE TABLE table_27906667_2 ( legs_won INTEGER, player VARCHAR )
How many legs were own by alan tabern?
SELECT MAX(legs_won) FROM table_27906667_2 WHERE player = "Alan Tabern"
sql_create_context
CREATE TABLE table_16268026_3 ( state VARCHAR, interview VARCHAR )
What state has an interview of 8.313 (8) ?
SELECT state FROM table_16268026_3 WHERE interview = "8.313 (8)"
sql_create_context
CREATE TABLE table_8688 ( "Winner" text, "Country" text, "Winter Olympics" text, "FIS Nordic World Ski Championships" text, "Holmenkollen" text )
The winner Arnfinn Bergmann has what under country?
SELECT "Country" FROM table_8688 WHERE "Winner" = 'arnfinn bergmann'
wikisql
CREATE TABLE table_78391 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
What kind of surface was the tournament at Pune played on?
SELECT "Surface" FROM table_78391 WHERE "Tournament" = 'pune'
wikisql
CREATE TABLE table_name_9 ( word__number INTEGER, name VARCHAR, subframe__number VARCHAR )
What is the average word count with crs and subframes lesser than 2?
SELECT AVG(word__number) FROM table_name_9 WHERE name = "crs" AND subframe__number < 2
sql_create_context
CREATE TABLE table_name_4 ( position INTEGER, draws VARCHAR, goals_against VARCHAR, goals_for VARCHAR )
Name the average position when the goals against are more than 42 and draws less than 16 with goals of 44
SELECT AVG(position) FROM table_name_4 WHERE goals_against > 42 AND goals_for = 44 AND draws < 16
sql_create_context
CREATE TABLE table_name_9 ( date VARCHAR, site VARCHAR )
Which date had a site of N/A?
SELECT date FROM table_name_9 WHERE site = "n/a"
sql_create_context
CREATE TABLE table_13464416_6 ( record VARCHAR, high_assists VARCHAR )
how many times have there been helps by damon stoudamire (13)
SELECT COUNT(record) FROM table_13464416_6 WHERE high_assists = "Damon Stoudamire (13)"
sql_create_context
CREATE TABLE table_20854943_2 ( loa__metres_ VARCHAR, yacht VARCHAR )
How many LOA (metres) reported for Black Jack?
SELECT COUNT(loa__metres_) FROM table_20854943_2 WHERE yacht = "Black Jack"
sql_create_context
CREATE TABLE Fault_Log ( fault_log_entry_id INTEGER, asset_id INTEGER, recorded_by_staff_id INTEGER, fault_log_entry_datetime DATETIME, fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_co...
A bar chart about the number of faults for different fault short name, order by the bar in ascending.
SELECT fault_short_name, COUNT(fault_short_name) FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY fault_short_name ORDER BY fault_short_name
nvbench
CREATE TABLE table_name_79 ( team VARCHAR, game VARCHAR )
Who was the team for game 34?
SELECT team FROM table_name_79 WHERE game = 34
sql_create_context
CREATE TABLE table_name_60 ( date VARCHAR, score VARCHAR )
What was the date of the game with a score of 2 1?
SELECT date FROM table_name_60 WHERE score = "2–1"
sql_create_context
CREATE TABLE table_67930 ( "Year" text, "League" text, "Reg. Season" text, "Playoffs" text, "Avg. attendance \u2020" text )
What regular season had an average attendance of 1,242?
SELECT "Reg. Season" FROM table_67930 WHERE "Avg. attendance \u2020" = '1,242'
wikisql
CREATE TABLE table_name_10 ( channel VARCHAR, digital_terrestrial_channel VARCHAR, position VARCHAR, analogue_terrestrial_channel VARCHAR, internet VARCHAR )
What is the channel when the analogue terrestrial channel shows n/a, and the internet is itv.com, with a position larger than 6, and digital terrestrial channel is 6 27 (+1)?
SELECT channel FROM table_name_10 WHERE analogue_terrestrial_channel = "n/a" AND internet = "itv.com" AND position > 6 AND digital_terrestrial_channel = "6 27 (+1)"
sql_create_context
CREATE TABLE table_28715942_6 ( arranger_s_ VARCHAR, track VARCHAR )
Who is the arranger for 'I KIssed a Girl'?
SELECT arranger_s_ FROM table_28715942_6 WHERE track = "I Kissed a Girl"
sql_create_context
CREATE TABLE table_53427 ( "Name" text, "League" real, "FA Cup" real, "League Cup" real, "Total" real )
What is the lowest number of goals scored by a player in the normal league games where more than 8 total goals were scored?
SELECT MIN("League") FROM table_53427 WHERE "Total" > '8'
wikisql
CREATE TABLE table_43785 ( "Name" text, "Latitude" text, "Longitude" text, "Diameter (km)" real, "Year named" real )
How long is the diameter that has a longitude of 8.0e?
SELECT "Diameter (km)" FROM table_43785 WHERE "Longitude" = '8.0e'
wikisql
CREATE TABLE table_77901 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
What is the top grid that laps less than 66 and a retried engine?
SELECT MAX("Grid") FROM table_77901 WHERE "Time/Retired" = 'engine' AND "Laps" < '66'
wikisql
CREATE TABLE table_name_96 ( elimination VARCHAR, wrestler VARCHAR )
What is the Elimination for Candice?
SELECT elimination FROM table_name_96 WHERE wrestler = "candice"
sql_create_context
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
在06年4月14日到2019年11月24日之间患者16067327所有检验结果指标记录中的检测方法都有什么?
(SELECT jyjgzbb.JCFF 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_i...
css
CREATE TABLE table_1140083_2 ( rnd VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR )
How many rounds were won with James Hunt as pole position and John Watson as fastest lap?
SELECT COUNT(rnd) FROM table_1140083_2 WHERE pole_position = "James Hunt" AND fastest_lap = "John Watson"
sql_create_context
CREATE TABLE table_29743928_5 ( int_caps INTEGER )
What is the lowest value for int. caps?
SELECT MIN(int_caps) FROM table_29743928_5
sql_create_context
CREATE TABLE table_204_878 ( id number, "model" text, "release date" text, "sensor\nres., size" text, "lens (35 mm equiv.)\nzoom, aperture" text, "screen\nsize, pixels" text, "dimensions\nw (mm) \u00d7 h (mm) \u00d7 d (mm)" text, "weight" text, "features" text )
how many models weighed between 100 and 200 grams ?
SELECT COUNT("model") FROM table_204_878 WHERE "weight" >= 100 AND "weight" <= 200
squall
CREATE TABLE table_201_19 ( id number, "rank" number, "title" text, "studio" text, "director" text, "actors" text, "gross" text )
how many movies did 20th century fox create that were in the top 10 grossing films of 1965 ?
SELECT COUNT("title") FROM table_201_19 WHERE "title" IN (SELECT "title" FROM table_201_19 ORDER BY "gross" DESC LIMIT 10) AND "studio" = '20th century fox'
squall
CREATE TABLE table_name_65 ( score_points VARCHAR, total VARCHAR )
With Olympic Bronze Medalist as the total what are the score points?
SELECT score_points FROM table_name_65 WHERE total = "olympic bronze medalist"
sql_create_context
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
what's the name of the drug that patient 030-77189 was prescribed two or more times in 12/2102?
SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030...
eicu
CREATE TABLE table_name_7 ( week INTEGER, record VARCHAR )
Which week did the Seattle Seahawks have a record of 6-6?
SELECT AVG(week) FROM table_name_7 WHERE record = "6-6"
sql_create_context
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal bool...
First Time Posts that are on bounty questions.
SELECT COUNT(DISTINCT p.Id) AS QuestionWithBounty, COUNT(DISTINCT Answer.Id) AS BountyAnswers, SUM(CASE WHEN PostsBeforeBounty.Id IS NULL THEN 1 ELSE 0 END) AS FirstTimePosts FROM Posts AS P INNER JOIN Votes AS bStart ON p.Id = bStart.PostId AND bStart.VoteTypeId = 8 INNER JOIN Posts AS Answer ON Answer.ParentId = p.Id...
sede
CREATE TABLE table_2383498_4 ( last_year_in_qld_cup VARCHAR, qld_cup_premierships VARCHAR )
How many values of last year in QLD Cup if QLD Cup Premierships is 1996, 2001?
SELECT COUNT(last_year_in_qld_cup) FROM table_2383498_4 WHERE qld_cup_premierships = "1996, 2001"
sql_create_context
CREATE TABLE table_203_872 ( id number, "year" number, "location(s)" text, "number of contestants" number, "ladies winner" text, "men's winner" text )
what is the name of the location listed first on this list ?
SELECT "location(s)" FROM table_203_872 WHERE id = 1
squall
CREATE TABLE table_75462 ( "Date" text, "Venue" text, "Opponents" text, "Score" text, "Competition" text )
Which Competition has a Score of 0-1, and Opponents of pkns fc?
SELECT "Competition" FROM table_75462 WHERE "Score" = '0-1' AND "Opponents" = 'pkns fc'
wikisql
CREATE TABLE table_13715 ( "Sr No" real, "Name" text, "Locale" text, "Height" text, "Floors" real, "Building Type" text )
what is the name when the sr no is less than 74 and floors is more than 36?
SELECT "Name" FROM table_13715 WHERE "Sr No" < '74' AND "Floors" > '36'
wikisql
CREATE TABLE course ( crs_code text, dept_code text, crs_description text, crs_credit number ) CREATE TABLE enroll ( class_code text, stu_num number, enroll_grade text ) CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_add...
How many professors have a Ph.D. in each department?
SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code
spider
CREATE TABLE table_name_13 ( tries VARCHAR, points VARCHAR )
How many tries did the player have which ended with 20 Points?
SELECT tries FROM table_name_13 WHERE points = 20
sql_create_context
CREATE TABLE table_38755 ( "Couple" text, "Score" text, "Style" text, "Music" text, "Result" text )
Which Score has a Couple comprised of jason & edyta, and a Style of freestyle?
SELECT "Score" FROM table_38755 WHERE "Couple" = 'jason & edyta' AND "Style" = 'freestyle'
wikisql
CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE varchar(5), EMP_HIREDATE datetime, EMP...
Bar chart x axis dept code y axis minimal stu gpa
SELECT DEPT_CODE, MIN(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE
nvbench
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) 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,...
what is a drug that patient 76372 was prescribed two or more times during this month?
SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 76372) AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 ...
mimic_iii
CREATE TABLE table_204_770 ( id number, "season" number, "date" text, "jia-a/csl winner" text, "result" text, "fa cup winner" text, "scorers" text, "stadium" text )
how many had a total goals scored over 6 ?
SELECT COUNT(*) FROM table_204_770 WHERE "result" + "result" > 6
squall
CREATE TABLE table_39542 ( "Rank" real, "Place" text, "County" text, "Per Capita Income" text, "Median House- hold Income" text, "Median Family Income" text, "Population" real, "Number of Households" real )
What is the population where the rank is higher than 51 and the Median House-hold income is $25,250?
SELECT SUM("Population") FROM table_39542 WHERE "Rank" > '51' AND "Median House- hold Income" = '$25,250'
wikisql
CREATE TABLE manager_half ( player_id TEXT, year INTEGER, team_id TEXT, league_id TEXT, inseason INTEGER, half INTEGER, g INTEGER, w INTEGER, l INTEGER, rank INTEGER ) CREATE TABLE salary ( year INTEGER, team_id TEXT, league_id TEXT, player_id TEXT, salary IN...
Count the number of players who enter hall of fame for each year with a line chart, rank X-axis in asc order please.
SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid ORDER BY yearid
nvbench
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate n...
count the number of patients who have had a abscess microbiology test done since 2104.
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'abscess' AND STRFTIME('%y', microlab.culturetakentime) >= '2104')
eicu
CREATE TABLE table_38387 ( "Product" text, "Extensions" text, "Projects templates" text, "MSDN integration" text, "Debugging" text, "Profiling" text, "IntelliTrace" text, "Unit test" text, "Code coverage" text, "Test impact analysis" text, "Load testing" text, "Lab manage...
Which Architecture and modelling has a Unit test of no, and a Projects templates of limited?
SELECT "Architecture and modelling" FROM table_38387 WHERE "Unit test" = 'no' AND "Projects templates" = 'limited'
wikisql
CREATE TABLE table_58487 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text )
What was the attendance when the Hawks played?
SELECT COUNT("Attendance") FROM table_58487 WHERE "Home" = 'hawks'
wikisql