context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_65708 ( "Score" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
What 2011 has 12.7% as the 2010?
SELECT "2011" FROM table_65708 WHERE "2010" = '12.7%'
wikisql
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
列出在零二年六月一日到零三年三月二十七日内手术量排倒数的30个科室的ID和名称
SELECT MED_ORG_DEPT_CD, MED_ORG_DEPT_NM FROM t_kc22 WHERE STA_DATE BETWEEN '2002-06-01' AND '2003-03-27' AND MED_INV_ITEM_TYPE = '手术费' GROUP BY MED_ORG_DEPT_CD ORDER BY COUNT(*) LIMIT 30
css
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
医疗机构5433552现在一共多少人在院?
SELECT COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '5433552' AND qtb.HOSP_STS > 0 UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '5433552' AND gyb.HOSP_STS > 0 UNION SELECT COUNT(*) FROM zyb WHERE zyb.MED_SER_ORG_NO = '5433552' AND zyb.HOSP_STS > 0 UNION SELECT COUNT(*) FROM mzb WHERE mzb.MED_SER_ORG_NO = '...
css
CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE advisor ( s_ID varchar(5), i_ID varchar(5) ) CREATE TABLE teaches ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0) ) CREA...
Give me a histogram for what are the names and average salaries for departments with average salary higher than 42000?, and list in ascending by the y axis.
SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name ORDER BY AVG(salary)
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...
when did patient 030-34260 get the enteral water flushes last time in a day before?
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-34260')) AND intakeoutput.cellpath LIKE '%intake%...
eicu
CREATE TABLE table_name_77 ( gain VARCHAR, long VARCHAR, avg_g VARCHAR )
How much Gain has a Long of 29, and an Avg/G smaller than 33.7?
SELECT COUNT(gain) FROM table_name_77 WHERE long = 29 AND avg_g < 33.7
sql_create_context
CREATE TABLE table_19328 ( "Rank" real, "Name" text, "Nationality" text, "1st (m)" text, "2nd (m)" text, "Points" text, "Overall WC points (Rank)" text )
Who is shown for the 2nd (m) of 220.5?
SELECT "Name" FROM table_19328 WHERE "2nd (m)" = '220.5'
wikisql
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId nu...
Probability of a closed question to get reopened. NowClosed: the questions closed now. ClosedOnce: questions closed at least once. This query does not see the now deleted questions.
SELECT COUNT(ClosedDate) AS NowClosed, COUNT(*) AS ClosedOnce FROM Posts WHERE Id IN (SELECT DISTINCT PostId FROM PostHistory WHERE PostHistoryTypeId = 10)
sede
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, ...
data explorer query to find winner of (proposed) new contest. https://photo.meta.stackexchange.com/questions/5899/sql-help-wanted-data-explorer-query-to-find-winner-of-proposed-new-contest/5900#5900
SELECT p.Id, p.CreationDate, DATEADD(ww, -1, GETDATE()), DATEADD(ww, 0, GETDATE()) FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = 'lens'
sede
CREATE TABLE table_16835 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text )
Which country is the player that went to Oregon?
SELECT "Nationality" FROM table_16835 WHERE "School/Club Team" = 'Oregon'
wikisql
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE labevents ( row_id number, ...
what is the unabbreviated version of the necator americanus?
SELECT d_icd_diagnoses.long_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'necator americanus' UNION SELECT d_icd_procedures.long_title FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'necator americanus'
mimic_iii
CREATE TABLE table_name_40 ( cardinalatial_title VARCHAR, elector VARCHAR, elevated VARCHAR, place_of_birth VARCHAR )
What's the Cardinalatial Title has the Elevated of December 18, 1182, the Place of birth of Lucca, and the Electo rof Pandolfo?
SELECT cardinalatial_title FROM table_name_40 WHERE elevated = "december 18, 1182" AND place_of_birth = "lucca" AND elector = "pandolfo"
sql_create_context
CREATE TABLE table_name_10 ( tag_team VARCHAR, time VARCHAR )
Name the Tag Team with a Time of 03:34?
SELECT tag_team FROM table_name_10 WHERE time = "03:34"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospita...
has patient 006-195541 had laboratory tests until 104 months ago?
SELECT COUNT(*) > 0 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-195541')) AND DATETIME(lab.labresulttime) <= DATETIME(CURRENT_TIME(), '-104 month')
eicu
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostNotices ( Id number, PostId number, PostNot...
Posts tagged with only one selected tag, plus the score and number of answers. Finds posts tagged only with the one tag input below.
SELECT Id AS "post_link", Score, AnswerCount FROM Posts WHERE PostTypeId = 1 AND Tags = '<##Tag##>' AND ClosedDate IS NULL ORDER BY CreationDate DESC
sede
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE chartevents ( row_id number, subject_id number, had...
get the id of the patients who had been diagnosed with prim central sleep apnea until 2104.
SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'prim central sleep apnea') AND STRFTIME('%y', diagnoses_icd.charttime) <= ...
mimic_iii
CREATE TABLE table_12244 ( "7:00 am" text, "8:00 am" text, "9:00 am" text, "11:00 am" text, "noon" text, "12:30 pm" text, "1:00 pm" text, "1:30 pm" text, "2:00 pm" text, "3:00 pm" text, "3:30 pm" text, "4:00 pm" text, "4:30 pm" text, "5:00 pm" text, "6:30 pm" ...
What is on at 1:30pm before One Life to Live at 2:00pm?
SELECT "1:30 pm" FROM table_12244 WHERE "2:00 pm" = 'one life to live'
wikisql
CREATE TABLE table_name_39 ( opponent VARCHAR, save VARCHAR )
Who is the opponent with a save of ||33,453||36 27?
SELECT opponent FROM table_name_39 WHERE save = "||33,453||36–27"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ...
how many patients whose insurance is medicare and diagnoses icd9 code is 3019?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.icd9_code = "3019"
mimicsql_data
CREATE TABLE table_51427 ( "Player" text, "Height" text, "School" text, "Hometown" text, "College" text, "NBA Draft" text )
What is the player that went to st. benedict's prep?
SELECT "Player" FROM table_51427 WHERE "School" = 'st. benedict''s prep'
wikisql
CREATE TABLE table_name_64 ( pick VARCHAR, round VARCHAR, position VARCHAR )
How many Pick has a Round smaller than 13, and a Position of fullback?
SELECT COUNT(pick) FROM table_name_64 WHERE round < 13 AND position = "fullback"
sql_create_context
CREATE TABLE table_20451 ( "Country" text, "Name" text, "Host" text, "Channel" text, "First Premiere" text, "Regular Judge" text, "Seasons" real )
Name the number of regular judge when host is bernie chan
SELECT COUNT("Regular Judge") FROM table_20451 WHERE "Host" = 'Bernie Chan'
wikisql
CREATE TABLE table_60911 ( "Season" real, "Years" text, "Final Standing" real, "Points" real, "Top Goal Scorer" text )
What is the final standing in 1981 82?
SELECT "Final Standing" FROM table_60911 WHERE "Years" = '1981–82'
wikisql
CREATE TABLE table_name_83 ( ground VARCHAR, competition VARCHAR, time VARCHAR )
What is the ground of the tim trophy competition, which had a time of 23:00 cet?
SELECT ground FROM table_name_83 WHERE competition = "tim trophy" AND time = "23:00 cet"
sql_create_context
CREATE TABLE table_52253 ( "Race" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Race Winner" text, "Constructor" text, "Report" text )
What was the pole position for the belgian grand prix?
SELECT "Pole Position" FROM table_52253 WHERE "Race" = 'belgian grand prix'
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
provide the number of patients whose insurance is medicare and diagnoses short title is neutropenia nos?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.short_title = "Neutropenia NOS"
mimicsql_data
CREATE TABLE table_55675 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
Tell me the time/retired with Laps of 47 and driver of ren arnoux
SELECT "Time/Retired" FROM table_55675 WHERE "Laps" = '47' AND "Driver" = 'rené arnoux'
wikisql
CREATE TABLE table_31661 ( "Date" text, "Result" text, "Opponent" text, "Method" text, "Round" real )
What resulted after 4 rounds with Ed Mahone?
SELECT "Result" FROM table_31661 WHERE "Round" > '4' AND "Opponent" = 'ed mahone'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid ...
when did patient 025-44495 get its first sputum, expectorated microbiology test this month?
SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44495')) AND microlab.culturesite = 'sputum, expectorated' AN...
eicu
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
find the number of urgent hospital admission patients before the year 2194.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.admityear < "2194"
mimicsql_data
CREATE TABLE table_16422 ( "Location" text, "Monday" text, "Tuesday" text, "Wednesday" text, "Thursday" text, "Friday" text, "Saturday" text, "Sunday" text )
what's the tuesday time with location being millhopper
SELECT "Tuesday" FROM table_16422 WHERE "Location" = 'Millhopper'
wikisql
CREATE TABLE Transactions_Lots ( transaction_id INTEGER, lot_id INTEGER ) CREATE TABLE Lots ( lot_id INTEGER, investor_id INTEGER, lot_details VARCHAR(255) ) CREATE TABLE Investors ( investor_id INTEGER, Investor_details VARCHAR(255) ) CREATE TABLE Ref_Transaction_Types ( transaction_...
Bar chart x axis lot details y axis the number of lot details, rank in ascending by the total number.
SELECT lot_details, COUNT(lot_details) FROM Lots GROUP BY lot_details ORDER BY COUNT(lot_details)
nvbench
CREATE TABLE table_204_641 ( id number, "pos" text, "no" number, "driver" text, "constructor" text, "laps" number, "time/retired" text, "grid" number, "points" number )
what is the difference in points between chris amon and jim clark ?
SELECT ABS((SELECT "points" FROM table_204_641 WHERE "driver" = 'chris amon') - (SELECT "points" FROM table_204_641 WHERE "driver" = 'jim clark'))
squall
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, ...
How many patients discharge location is snf and were diagnosed with the primary disease upper gi bleed?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.diagnosis = "UPPER GI BLEED"
mimicsql_data
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, Rejecti...
Which tags had the most bounties offered in past 30 days?.
SELECT COUNT(*) AS Bounty_Num, SUM(Votes.BountyAmount) AS Bounty_Amt, Tags.TagName FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.Id = PostTags.PostId AND Posts.PostTypeId = 1 AND Posts.CreationDate >= DATEADD(day, -30, GETDATE()) AND Posts.CreationDate <= GETDATE() INNER JOIN Votes...
sede
CREATE TABLE table_1500 ( "Finish" text, "Race" text, "Distance" text, "Jockey" text, "Time" text, "Victory Margin (in lengths)" text, "Runner up" text, "Track" text, "Surface" text, "Date" text )
With a date of 8/3/08, what was the length of the victory margin?
SELECT COUNT("Victory Margin (in lengths)") FROM table_1500 WHERE "Date" = '8/3/08'
wikisql
CREATE TABLE table_name_60 ( year INTEGER, chassis VARCHAR, points VARCHAR )
What is the earliest year with a mp4-17d chassis and less than 142 points.
SELECT MIN(year) FROM table_name_60 WHERE chassis = "mp4-17d" AND points < 142
sql_create_context
CREATE TABLE table_name_16 ( regular_season_champion_s_ VARCHAR, record VARCHAR, tournament_champion VARCHAR )
Which Regular Season Champion(s) has a Record of 9 0, and a Tournament Champion of north carolina?
SELECT regular_season_champion_s_ FROM table_name_16 WHERE record = "9–0" AND tournament_champion = "north carolina"
sql_create_context
CREATE TABLE table_name_44 ( tickets_sold___available VARCHAR, gross_revenue__2011_ VARCHAR )
How many tickets were sold/available when the gross revenue (2011) was $366,916?
SELECT tickets_sold___available FROM table_name_44 WHERE gross_revenue__2011_ = "$366,916"
sql_create_context
CREATE TABLE table_name_74 ( place VARCHAR, score VARCHAR )
what place has score 66-74-68-73=281
SELECT place FROM table_name_74 WHERE score = 66 - 74 - 68 - 73 = 281
sql_create_context
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, show me about the distribution of name and the sum of revenue , and group by attribute name in a bar chart, I want to list by the Name in ascending please.
SELECT T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name
nvbench
CREATE TABLE table_16388478_4 ( home_team VARCHAR )
What is the home team score where the home team is Fremantle?
SELECT home_team AS score FROM table_16388478_4 WHERE home_team = "Fremantle"
sql_create_context
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE medication ( medicatio...
what was the top five most frequent diagnoses that patients were given after receiving antihyperlipidemic agent - hmg-coa reductase inhibitor in the same month since 2105?
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antihyperlipidemic agent - hmg-coa reduc...
eicu
CREATE TABLE gyb ( 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...
从03年9月28日开始到08年10月10日这段时间,列出医院2646735所有姓冯的患者的医疗就诊记录数量是哪些呢?
SELECT * FROM qtb WHERE qtb.MED_SER_ORG_NO = '2646735' AND qtb.IN_HOSP_DATE BETWEEN '2003-09-28' AND '2008-10-10' AND qtb.PERSON_NM LIKE '冯%' UNION SELECT * FROM gyb WHERE gyb.MED_SER_ORG_NO = '2646735' AND gyb.IN_HOSP_DATE BETWEEN '2003-09-28' AND '2008-10-10' AND gyb.PERSON_NM LIKE '冯%' UNION SELECT * FROM zyb WHERE ...
css
CREATE TABLE table_name_82 ( acquisition_via VARCHAR, school_club_team VARCHAR )
Which is the acquisition via that has a school or club team of state?
SELECT acquisition_via FROM table_name_82 WHERE school_club_team = "state"
sql_create_context
CREATE TABLE table_40981 ( "Rank" real, "Name" text, "Years" text, "Matches" real, "Goals" real )
What is the Rank for Viktors Dobrecovs with less than 325 Matches?
SELECT AVG("Rank") FROM table_40981 WHERE "Name" = 'viktors dobrecovs' AND "Matches" < '325'
wikisql
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total...
The 200 -level classes , are they available in Spring or Summer terms ?
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 200 AND 200 + 100 AND semester.semester IN ('SP', 'SU', 'SS') AND semester.semester_i...
advising
CREATE TABLE table_47383 ( "Name" text, "Born-Died" text, "Term start" text, "Term end" text, "Political Party" text )
What is the Term Start date of the Progressive Party Prime Minister?
SELECT "Term start" FROM table_47383 WHERE "Political Party" = 'progressive party'
wikisql
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
Find suggested duplicates that haven't led to question closure in a tag. Locate old dupe suggestions where the flag has timed out
SELECT p.Id AS "post_link", p.CreationDate FROM Comments AS c JOIN Posts AS p ON c.PostId = p.Id JOIN PostTags AS pt ON pt.PostId = p.Id JOIN Tags AS t ON t.Id = pt.TagId WHERE c.Text LIKE '%possible duplicate%' AND p.ClosedDate IS NULL AND p.PostTypeId = 1 AND t.TagName = @Tag ORDER BY p.Id
sede
CREATE TABLE table_66073 ( "Period" text, "Internet Explorer" text, "Firefox" text, "Chrome" text, "Safari" text, "Opera" text, "Other Mozilla" text, "Mobile" text )
What percentage of users were using mobile browsers during the period in which 9.00% were using Chrome?
SELECT "Mobile" FROM table_66073 WHERE "Chrome" = '9.00%'
wikisql
CREATE TABLE table_66747 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Time" text, "Att." real, "Record" text )
Who was the opponent with the time 3:59?
SELECT "Opponent" FROM table_66747 WHERE "Time" = '3:59'
wikisql
CREATE TABLE table_73724 ( "Stage" real, "Winner" text, "General Classification" text, "Youth Classification" text, "Mountains Classification" text, "Sprint Classification" text, "Most Courageous" text, "Team Classification" text )
When Brett Lancaster won the general classification, who won the team calssification?
SELECT "Team Classification" FROM table_73724 WHERE "General Classification" = 'Brett Lancaster'
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 aged below 79 years have lab test fluid as urine?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "79" AND lab.fluid = "Urine"
mimicsql_data
CREATE TABLE table_42497 ( "Year" real, "Winner" text, "School" text, "Position" text, "Points" text, "% of Points Possible" text )
What is the year of the winner from the army school, plays the halfback position, and has a % of points possible of 39.01%?
SELECT SUM("Year") FROM table_42497 WHERE "School" = 'army' AND "Position" = 'halfback' AND "% of Points Possible" = '39.01%'
wikisql
CREATE TABLE table_name_94 ( romaji_title VARCHAR, japanese_title VARCHAR )
Which romaji title, has Japanese title of 3?
SELECT romaji_title FROM table_name_94 WHERE japanese_title = "菊次郎とさき 3"
sql_create_context
CREATE TABLE table_49456 ( "Year" real, "Album" text, "Artist" text, "Song" text, "Note" text )
Which artist was 2003?
SELECT "Artist" FROM table_49456 WHERE "Year" = '2003'
wikisql
CREATE TABLE table_36337 ( "ISSN" text, "Language" text, "Country" text, "Frequency" text, "Publication range" text, "Status" text, "Document Type" text )
What is the language for a journal that has a frequency of 3 times per year and has an ISSN number of 1136-7385?
SELECT "Language" FROM table_36337 WHERE "Frequency" = '3 times per year' AND "ISSN" = '1136-7385'
wikisql
CREATE TABLE table_name_14 ( tournament VARCHAR, date VARCHAR )
what is the tournament on august 17, 2008?
SELECT tournament FROM table_name_14 WHERE date = "august 17, 2008"
sql_create_context
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, U...
Questions with answers more than 5.
SELECT Q.Id AS QId, Q.Title AS QTitle, Q.Body AS QBody, G.Id AS GId, G.Body AS GBody, Q.Score AS QScore, G.Score AS GScore, Q.ViewCount AS QViewCount, G.ViewCount AS GViewCount, Q.Tags AS QTags, G.Title AS GTitle FROM Posts AS G, (SELECT * FROM Posts WHERE ParentId IS NULL AND AnswerCount >= 5) AS Q WHERE G.ParentId = ...
sede
CREATE TABLE table_25549 ( "Year" real, "Dates" text, "Champion" text, "Country" text, "Score" text, "Margin of victory" text, "Tournament location" text, "Purse ( $ )" real, "Winners share ($)" real )
What was the winner share (in $) in the year when Se Ri Pak (2) was the champion?
SELECT MIN("Winners share ($)") FROM table_25549 WHERE "Champion" = 'Se Ri Pak (2)'
wikisql
CREATE TABLE table_name_35 ( call_sign VARCHAR, frequency_mhz VARCHAR, erp_w VARCHAR )
What is the call sign of the MHz Frequency less than 94.9 and an ERP W of 170?
SELECT call_sign FROM table_name_35 WHERE frequency_mhz < 94.9 AND erp_w = 170
sql_create_context
CREATE TABLE table_name_39 ( michelle INTEGER, discipline VARCHAR )
How did michelle do in archery?
SELECT AVG(michelle) FROM table_name_39 WHERE discipline = "archery"
sql_create_context
CREATE TABLE table_28498999_6 ( reset_points VARCHAR, player VARCHAR )
what is the number of pieces where the person is charley hoffman
SELECT COUNT(reset_points) FROM table_28498999_6 WHERE player = "Charley Hoffman"
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime t...
did patient 027-85328 excreted any output (ml)-urethral catheter diana acuna, rn latex;straight-tip 14 fr. since 09/2105?
SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-85328')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutpu...
eicu
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperio...
when was patient 018-20179 first admitted to the hospital through the operating room since 1 year ago?
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '018-20179' AND patient.hospitaladmitsource = 'operating room' AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-1 year') ORDER BY patient.hospitaladmittime LIMIT 1
eicu
CREATE TABLE table_name_28 ( to_par VARCHAR, finish VARCHAR )
When the finish was t31 what was the To par?
SELECT to_par FROM table_name_28 WHERE finish = "t31"
sql_create_context
CREATE TABLE table_204_775 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
how many gold and silver medals in total did china receive ?
SELECT "gold" + "silver" FROM table_204_775 WHERE "nation" = 'china'
squall
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, ...
患者被门诊诊断为疾病Z80.670的检测指标849746的参考值范围下限和上限分别是什么?
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDBM = 'Z80.670' AND jyjgzbb.JCZBDM = '849746' UNION SELECT jyjgzbb.CKZFWX...
css
CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_o...
Which tests have 'Pass' results? Return the dates when the tests were taken, and count them by a line chart, and I want to display by the X-axis in asc.
SELECT date_test_taken, COUNT(date_test_taken) FROM Student_Tests_Taken WHERE test_result = "Pass" ORDER BY date_test_taken
nvbench
CREATE TABLE mzb ( 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...
在08年10月25日到15年12月6日这段日子病人吕莹玉使用的药品有多些是自付比例低于0.73的呢?
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 '2008-10-25' AND '2015-12-06' AND t_kc22.SELF_PAY_PRO < 0.73 UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_NM = '吕莹玉' AND t_k...
css
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
从01.3.7开始,截止到03.11.9,药品109251736总共被医院开出给患者78775126多少次
SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '78775126' AND t_kc22.STA_DATE BETWEEN '2001-03-07' AND '2003-11-09' AND t_kc22.SOC_SRT_DIRE_CD = '109251736' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHE...
css
CREATE TABLE table_52319 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the score of the Home team of geelong?
SELECT "Home team score" FROM table_52319 WHERE "Home team" = 'geelong'
wikisql
CREATE TABLE table_name_32 ( number VARCHAR, season VARCHAR )
What number has 2002-2003 as the season?
SELECT number FROM table_name_32 WHERE season = "2002-2003"
sql_create_context
CREATE TABLE procedures ( 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, ...
give me the number of patients whose diagnoses short title is routine circumcision and drug type is additive?
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.short_title = "Routine circumcision" AND prescriptions.drug_type = "ADDITIVE"
mimicsql_data
CREATE TABLE table_59996 ( "Election" text, "First member" text, "First party" text, "Second member" text, "Second party" text )
What is the first party with second member Hon. Rowland Hill, in the 1857 election?
SELECT "First party" FROM table_59996 WHERE "Second member" = 'hon. rowland hill' AND "Election" = '1857'
wikisql
CREATE TABLE table_12094300_1 ( interview VARCHAR, preliminaries VARCHAR )
What is the interview score when the preliminaries score is 8.400?
SELECT interview FROM table_12094300_1 WHERE preliminaries = "8.400"
sql_create_context
CREATE TABLE table_25061 ( "Name" text, "#" real, "Position" text, "Height" text, "Weight" real, "Year" text, "Home Town" text, "High School" text )
How many height entries are there for players from lagos, nigeria?
SELECT COUNT("Height") FROM table_25061 WHERE "Home Town" = 'Lagos, Nigeria'
wikisql
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostLinks ( Id...
TOP golang users in Denver.
WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id =...
sede
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, ...
81766246008住院就诊的患者出院病区的代码和名称分别是啥?在这个病区的哪个床位出院的
SELECT CYBQDM, CYBQMC, CYCWH FROM zyjzjlb WHERE JZLSH = '81766246008'
css
CREATE TABLE table_name_10 ( date VARCHAR, home_team VARCHAR )
On what date is Hawthorn the home team?
SELECT date FROM table_name_10 WHERE home_team = "hawthorn"
sql_create_context
CREATE TABLE table_16519 ( "Team" text, "Stadium" text, "Capacity" real, "Highest" real, "Lowest" real, "Average" real )
What is the lowest attendance that East End Park has ever had?
SELECT MIN("Lowest") FROM table_16519 WHERE "Stadium" = 'East End Park'
wikisql
CREATE TABLE table_20730 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text, "Time" text )
How many days was the away team's score 11.8 (74)?
SELECT COUNT("Date") FROM table_20730 WHERE "Away team score" = '11.8 (74)'
wikisql
CREATE TABLE table_name_60 ( rank INTEGER, player VARCHAR )
What's jim colbert's highest rank?
SELECT MAX(rank) FROM table_name_60 WHERE player = "jim colbert"
sql_create_context
CREATE TABLE airports ( apid number, name text, city text, country text, x number, y number, elevation number, iata text, icao text ) CREATE TABLE airlines ( alid number, name text, iata text, icao text, callsign text, country text, active text ) CREATE ...
What is the number of airports per country, ordered from most to least?
SELECT COUNT(*), country FROM airports GROUP BY country ORDER BY COUNT(*) DESC
spider
CREATE TABLE table_name_94 ( partner VARCHAR, score_in_final VARCHAR )
Which Partner has a Score in Final of 6 1, 6 2?
SELECT partner FROM table_name_94 WHERE score_in_final = "6–1, 6–2"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
count the number of patients whose language is cape and admission location is phys referral/normal deli?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.admission_location = "PHYS REFERRAL/NORMAL DELI"
mimicsql_data
CREATE TABLE table_64018 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the average number of golds for teams with 1 bronze, less than 3 silver, and a total over 2?
SELECT AVG("Gold") FROM table_64018 WHERE "Bronze" = '1' AND "Total" > '2' AND "Silver" < '3'
wikisql
CREATE TABLE table_16341 ( "Model" text, "RU" real, "Max processors" text, "Processor frequency" text, "Max memory" text, "Max disk capacity" text, "GA Date" text )
What ga date do the models with 1.0, 1.2, 1.4ghz processor frequencies have?
SELECT "GA Date" FROM table_16341 WHERE "Processor frequency" = '1.0, 1.2, 1.4GHz'
wikisql
CREATE TABLE table_29046 ( "Date" text, "Time" text, "Visiting team" text, "Home team" text, "Site" text, "Broadcast" text, "Result" text, "Attendance" real )
What was the result in the game broadcast on the Big East Network?
SELECT "Result" FROM table_29046 WHERE "Broadcast" = 'Big East Network'
wikisql
CREATE TABLE table_38173 ( "Tournament" text, "2009" text, "2010" text, "2011" text, "2012" text )
Which tournament had a 2009 result of 1R?
SELECT "Tournament" FROM table_38173 WHERE "2009" = '1r'
wikisql
CREATE TABLE table_203_521 ( id number, "year" number, "division" number, "league" text, "regular season" text, "playoffs" text, "open cup" text )
what is the only year that did not qualify appears under the playoffs column ?
SELECT "year" FROM table_203_521 WHERE "playoffs" = 'did not qualify'
squall
CREATE TABLE table_7779 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Notes" text )
What competition took place in a year later than 2009 with team notes?
SELECT "Competition" FROM table_7779 WHERE "Year" > '2009' AND "Notes" = 'team'
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...
医疗机构3974649做项目165044266-n的检查记录有多少
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '3974649' AND t_kc22.SOC_SRT_DIRE_CD = '165044266-n'
css
CREATE TABLE table_name_64 ( race INTEGER, flap VARCHAR, podium VARCHAR, pole VARCHAR )
How many races had 4 podiums, 5 poles and more than 3 Flaps?
SELECT SUM(race) FROM table_name_64 WHERE podium = 4 AND pole = 5 AND flap > 3
sql_create_context
CREATE TABLE fgwyjzb ( 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, ...
之前,患者戚玉树做的检查有哪些?
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '戚玉树' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLIN...
css
CREATE TABLE table_74416 ( "Name" text, "Country" text, "Years" text, "Games" real, "Minutes" real, "Conceded" real, "Shutouts" real, "Int. caps" real )
What is the lowest overall amount of shutouts?
SELECT MIN("Shutouts") FROM table_74416
wikisql
CREATE TABLE table_name_41 ( previous_conference VARCHAR, school VARCHAR )
The school of Portage was in what conference previous?
SELECT previous_conference FROM table_name_41 WHERE school = "portage"
sql_create_context
CREATE TABLE table_name_12 ( channel INTEGER, aspect VARCHAR, psip_short_name VARCHAR )
Name the highest Channel with an Aspect of 4:3, and a PSIP Short Name of ibc-tv?
SELECT MAX(channel) FROM table_name_12 WHERE aspect = "4:3" AND psip_short_name = "ibc-tv"
sql_create_context
CREATE TABLE table_65125 ( "Player" text, "Int'l Debut" text, "Year" text, "Cross Code Debut" text, "Date" text, "Position" text )
What year did Coenraad Breytenbach have their Int'l Debut?
SELECT "Year" FROM table_65125 WHERE "Player" = 'coenraad breytenbach'
wikisql
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostsWithDe...
Where did X rant the most?.
SELECT p.Id AS "post_link", LENGTH(p.Body) AS "length", p.Score AS "score" FROM Users AS u JOIN Posts AS p ON p.OwnerUserId = u.Id WHERE u.Id = '##UserId##' ORDER BY 'score', 'length' DESC
sede