context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_95 ( debut_year INTEGER, player VARCHAR, games VARCHAR )
Which Debut year has a Player of noel carroll, and Games smaller than 12?
SELECT MAX(debut_year) FROM table_name_95 WHERE player = "noel carroll" AND games < 12
sql_create_context
CREATE TABLE table_28985 ( "Country" text, "Skip" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real, "Shot %" text )
Name the ends lost for canada
SELECT "Ends Lost" FROM table_28985 WHERE "Country" = 'Canada'
wikisql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
排序一下团伙成员苗建木最常去的哪些医院?
SELECT qtb.MED_SER_ORG_NO FROM qtb WHERE qtb.PERSON_NM = '苗建木' GROUP BY qtb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC UNION SELECT gyb.MED_SER_ORG_NO FROM gyb WHERE gyb.PERSON_NM = '苗建木' GROUP BY gyb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC UNION SELECT zyb.MED_SER_ORG_NO FROM zyb WHERE zyb.PERSON_NM = '苗建木' GROUP BY zyb.MED_...
css
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE cost ( row_id number, subject_id number, hadm...
what is the four most commonly used procedures that were given to patients in the same month after the diagnosis of anorexia until 2 years ago?
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi...
mimic_iii
CREATE TABLE table_24649082_1 ( title VARCHAR, directed_by VARCHAR )
What is the title of the episode directed by Charles Beeson?
SELECT title FROM table_24649082_1 WHERE directed_by = "Charles Beeson"
sql_create_context
CREATE TABLE table_203_56 ( id number, "star" text, "start\nyear" number, "end\nyear" number, "maximum\nyear" number, "maximum\nmagnitude" number, "distance at\nmaximum (ly)" number, "current\ndistance" number, "current\nmagnitude" number )
how much farther -lrb- in ly -rrb- is epsilon canis majoris than zeta sagittarii ?
SELECT (SELECT "distance at\nmaximum (ly)" FROM table_203_56 WHERE "star" = 'epsilon canis majoris') - (SELECT "distance at\nmaximum (ly)" FROM table_203_56 WHERE "star" = 'zeta sagittarii')
squall
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, ...
Enter a tilte for your query.
SELECT * FROM Comments WHERE UserId = 1505120
sede
CREATE TABLE MediaType ( MediaTypeId integer, Name varchar(120) ) CREATE TABLE Customer ( CustomerId integer, FirstName varchar(40), LastName varchar(20), Company varchar(80), Address varchar(70), City varchar(40), State varchar(40), Country varchar(40), PostalCode varchar(1...
A bar chart for what are the number of the phone numbers for each employee?, and could you show in descending by the Phone please?
SELECT Phone, COUNT(Phone) FROM Employee GROUP BY Phone ORDER BY Phone DESC
nvbench
CREATE TABLE table_7712 ( "Season" text, "Competition" text, "Round" text, "Opponent" text, "Home" text, "Away" text, "Agg." text )
What was the aggregate total for the match against Koper?
SELECT "Agg." FROM table_7712 WHERE "Opponent" = 'koper'
wikisql
CREATE TABLE table_name_1 ( total VARCHAR, bronze VARCHAR, host_city VARCHAR, gold VARCHAR )
What's the Total for a Mexico City game with a Gold of less than 4 and a Bronze of less than 2?
SELECT COUNT(total) FROM table_name_1 WHERE host_city = "mexico city" AND gold < 4 AND bronze < 2
sql_create_context
CREATE TABLE table_29235 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text )
What is the date of appointment when the date of vacancy is 15 march 2011?
SELECT "Date of appointment" FROM table_29235 WHERE "Date of vacancy" = '15 March 2011'
wikisql
CREATE TABLE table_13757 ( "Debut year" real, "Player" text, "Games" real, "Goals" real, "Years at club" text )
What are the most goals listed when Jack Trehey was the player, with the listed debut year of 1902, games less than 1?
SELECT MAX("Goals") FROM table_13757 WHERE "Debut year" = '1902' AND "Player" = 'jack trehey' AND "Games" < '1'
wikisql
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text te...
Top stackoverflow users in Rhode Island.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC), Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE UPPER(Location) LIKE '%RHODE ISLAND%' ORDER BY Reputation DESC
sede
CREATE TABLE table_23683 ( "Year" real, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text )
who won womens doubles in 2010
SELECT "Womens doubles" FROM table_23683 WHERE "Year" = '2010'
wikisql
CREATE TABLE table_41046 ( "Place" real, "Rider" text, "Country" text, "Machine" text, "Speed" text, "Time" text, "Points" real )
What is Speed, when Time is 1:24.23.0?
SELECT "Speed" FROM table_41046 WHERE "Time" = '1:24.23.0'
wikisql
CREATE TABLE table_name_12 ( tie_no VARCHAR, home_team VARCHAR )
When the home team was Woking, what was the tie no?
SELECT tie_no FROM table_name_12 WHERE home_team = "woking"
sql_create_context
CREATE TABLE table_name_34 ( rank VARCHAR, name VARCHAR )
What is the rank of the swimmer named Petria Thomas?
SELECT rank FROM table_name_34 WHERE name = "petria thomas"
sql_create_context
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId...
Users with only suggested edits and a lot of upvotes.
SELECT Users.Id AS "user_link", Users.Reputation, Users.CreationDate, Users.UpVotes, Users.DownVotes, Users.Location, Users.AboutMe FROM Users INNER JOIN SuggestedEdits ON SuggestedEdits.OwnerUserId = Users.Id LEFT OUTER JOIN Posts ON Posts.OwnerUserId = Users.Id WHERE Users.CreationDate > '2018-01-01' AND Reputation >...
sede
CREATE TABLE table_65986 ( "Rank" real, "Rowers" text, "Country" text, "Time" text, "Notes" text )
Who were the rowers from china wh had a rank smaller than 4?
SELECT "Rowers" FROM table_65986 WHERE "Rank" < '4' AND "Country" = 'china'
wikisql
CREATE TABLE table_203_871 ( id number, "#" number, "player" text, "pos" text, "pts" number, "tries" number, "conv" number, "pens" number, "drop" number, "opposition" text, "venue" text, "date" text )
how many players scored at least 25 or more points ?
SELECT COUNT(DISTINCT "player") FROM table_203_871 WHERE "pts" >= 25
squall
CREATE TABLE table_name_37 ( week_6_oct_5 VARCHAR, week_14_nov_30 VARCHAR )
Which Week 6 Oct 5 has a Week 14 Nov 30 of texas (11-1)?
SELECT week_6_oct_5 FROM table_name_37 WHERE week_14_nov_30 = "texas (11-1)"
sql_create_context
CREATE TABLE Customer_Payments ( customer_id INTEGER, datetime_payment DATETIME, payment_method_code VARCHAR(10), amount_payment DOUBLE ) CREATE TABLE Lessons ( lesson_id INTEGER, customer_id INTEGER, lesson_status_code VARCHAR(15), staff_id INTEGER, vehicle_id INTEGER, lesson_d...
List all payment methods and number of payments using each payment methods Plot them as bar chart, and could you display in descending by the bar?
SELECT payment_method_code, COUNT(*) FROM Customer_Payments GROUP BY payment_method_code ORDER BY payment_method_code DESC
nvbench
CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperature int, precipitation real, wind_speed_mph int ) CREATE TABLE train ( id int, train_number int, name text, origin text,...
Find names of trains that run through stations for the local authority Chiltern, compare the total number of name in a bar graph, I want to display by the names in desc.
SELECT name, COUNT(name) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" GROUP BY name ORDER BY name DESC
nvbench
CREATE TABLE table_name_5 ( laps INTEGER, driver VARCHAR, grid VARCHAR )
what is the least laps when the driver is rubens barrichello and the grid is less than 12?
SELECT MIN(laps) FROM table_name_5 WHERE driver = "rubens barrichello" AND grid < 12
sql_create_context
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE flight_leg ( flight_id int, ...
show me all nonstop flights from SALT LAKE CITY to CINCINNATI
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 = 'SALT LAKE CITY' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name =...
atis
CREATE TABLE table_2801442_1 ( population__2011_census_ INTEGER, code VARCHAR )
How many people lived in the district with a code GP in 2011?
SELECT MIN(population__2011_census_) FROM table_2801442_1 WHERE code = "GP"
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, ...
05667360222医疗就诊中,科室名没有皮肤科这几个字的科室开出的检验报告单的编号有哪些
SELECT BGDH FROM jybgb WHERE JZLSH = '05667360222' AND NOT KSMC LIKE '%皮肤科%'
css
CREATE TABLE table_60247 ( "Season" text, "Premier Division" text, "Division One" text, "Division Two" text, "Division Three" text )
Which Season was the Division Three Hampton Park Rangers champions?
SELECT "Season" FROM table_60247 WHERE "Division Three" = 'hampton park rangers'
wikisql
CREATE TABLE table_name_46 ( defenses INTEGER, days_held VARCHAR )
What is the lowest defense a champion with 345 days held has?
SELECT MIN(defenses) FROM table_name_46 WHERE days_held = "345"
sql_create_context
CREATE TABLE table_11061 ( "Year" real, "Competition" text, "Date" text, "Surface" text, "Location" text, "Score" text, "Result" text )
What is the largest year located in zagreb, croatia?
SELECT MAX("Year") FROM table_11061 WHERE "Location" = 'zagreb, croatia'
wikisql
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE aircraft ( aircraft_code varchar,...
what is the earliest flight leaving BOSTON and arriving in ATLANTA on 11 7
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, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND date_day.day_number = 7 AND date_day.month_number = 11 AND ...
atis
CREATE TABLE table_60512 ( "Team" text, "Matches" real, "Wins" real, "Wins %" text, "Draws" real, "Draws %" text, "Losses" real, "Losses %" text, "Against" real )
What is the Lowest value in Against with Wins % of 50.4% and Losses less than 20?
SELECT MIN("Against") FROM table_60512 WHERE "Wins %" = '50.4%' AND "Losses" < '20'
wikisql
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Badges ( Id...
Get tag names sorted by tag name.
SELECT Name FROM Badges ORDER BY 'name'
sede
CREATE TABLE table_name_15 ( attribute VARCHAR, cancelable VARCHAR, bubbles VARCHAR )
Which of the attributes has is cancelable and an answer of yes for bubbles?
SELECT attribute FROM table_name_15 WHERE cancelable = "yes" AND bubbles = "yes"
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
how many patients whose admission type is emergency and diagnoses icd9 code is 7455?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.icd9_code = "7455"
mimicsql_data
CREATE TABLE table_62270 ( "Date" text, "Tournament" text, "Round" text, "Ground" text, "Opponent" text, "Score 1" text )
Which round was played on 10 May?
SELECT "Round" FROM table_62270 WHERE "Date" = '10 may'
wikisql
CREATE TABLE table_41442 ( "Pos." text, "Player" text, "Free Agent Type" text, "2007 Team" text, "Contract" text )
What is the Free Agent Type for player bryant johnson?
SELECT "Free Agent Type" FROM table_41442 WHERE "Player" = 'bryant johnson'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
how many patients diagnosed with pneumococcal pneumonia were administered drug via po/ng?
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 = "Pneumococcal pneumonia" AND prescriptions.route = "PO/NG"
mimicsql_data
CREATE TABLE table_6211 ( "Date" text, "Course" text, "Distance" text, "Type" text, "Winner" text )
Who won the Granada course?
SELECT "Winner" FROM table_6211 WHERE "Course" = 'granada'
wikisql
CREATE TABLE table_61434 ( "Name" text, "Pos." text, "Height" text, "Weight" text, "Date of Birth" text, "Club" text )
How tall is player James Stanton?
SELECT "Height" FROM table_61434 WHERE "Name" = 'james stanton'
wikisql
CREATE TABLE PostTags ( PostId number, TagId number ) 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, ReviewTa...
Thank-you comment by OP on the sole answer, without upvote or accept.
SELECT p.CreationDate, p.Id AS "post_link", c.Text FROM Posts AS p INNER JOIN Comments AS c ON c.PostId = p.Id INNER JOIN Posts AS q ON c.UserId = q.OwnerUserId AND p.ParentId = q.Id AND q.AnswerCount = 1 WHERE c.Text LIKE '%Thank%' AND p.Score = 0 AND q.AcceptedAnswerId IS NULL ORDER BY CreationDate DESC
sede
CREATE TABLE table_704 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
what's party with result being retired to run for u. s. senate republican hold
SELECT "Party" FROM table_704 WHERE "Result" = 'Retired to run for U. S. Senate Republican hold'
wikisql
CREATE TABLE table_8464 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What is the Player that has a Place of t2, and a Score of 74-70-68=212?
SELECT "Player" FROM table_8464 WHERE "Place" = 't2' AND "Score" = '74-70-68=212'
wikisql
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 hz_info ( KH text, KLX number...
韩嘉容这个患者在之前有过哪些门诊诊断记录
SELECT mzjzjlb.JZZDBM, mzjzjlb.JZZDSM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mz...
css
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
what is the number of patients whose admission year is less than 2145 and diagnoses icd9 code is 591?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2145" AND diagnoses.icd9_code = "591"
mimicsql_data
CREATE TABLE review ( rid int, business_id varchar, user_id varchar, rating float, text longtext, year int, month varchar ) CREATE TABLE user ( uid int, user_id varchar, name varchar ) CREATE TABLE tip ( tip_id int, business_id varchar, text longtext, user_id va...
What is the average rating of reviews written in year 2014 ?
SELECT AVG(rating) FROM review WHERE year = 2014
yelp
CREATE TABLE course ( cid text, cname text, credits number, instructor number, days text, hours text, dno number ) CREATE TABLE member_of ( facid number, dno number, appt_type text ) CREATE TABLE faculty ( facid number, lname text, fname text, rank text, sex...
What are the name of courses that have at least five enrollments?
SELECT T1.cname FROM course AS T1 JOIN enrolled_in AS T2 ON T1.cid = T2.cid GROUP BY T2.cid HAVING COUNT(*) >= 5
spider
CREATE TABLE table_12806 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What is the Country of the T2 Place Player with a Score of 69-69-69=207?
SELECT "Country" FROM table_12806 WHERE "Place" = 't2' AND "Score" = '69-69-69=207'
wikisql
CREATE TABLE table_53967 ( "Year" real, "Date" text, "Drivers" text, "Distance/Duration" text, "Race Title" text )
What day is the grand prix de trois-rivi res?
SELECT "Date" FROM table_53967 WHERE "Race Title" = 'grand prix de trois-rivières'
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
find out the marital status and religious background of patient with patient id 2560.
SELECT demographic.marital_status, demographic.religion FROM demographic WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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, ...
how many female patients were hospitalized for more than 2 days?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.days_stay > "2"
mimicsql_data
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
Return a bar chart on what are the number of rooms for each bed type?, and I want to show from high to low by the bars.
SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType ORDER BY bedType DESC
nvbench
CREATE TABLE table_27738 ( "Institution" text, "Location" text, "Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" text )
How many times this institution was founded that was nicknamed Beavers?
SELECT COUNT("Founded") FROM table_27738 WHERE "Nickname" = 'Beavers'
wikisql
CREATE TABLE table_30097 ( "Series #" real, "Season #" real, "Title" text, "Written by" text, "Original air date" text, "U.S. Viewers (millions)" text )
how many times was the episode 'the old maid of honor' originally aired?
SELECT COUNT("Original air date") FROM table_30097 WHERE "Title" = 'The Old Maid of Honor'
wikisql
CREATE TABLE table_16823 ( "Model name" text, "Power (ps)" real, "Torque (Nm@rpm)" text, "Displacement (cm\u00b3)" real, "Engine code" text, "Comment" text )
what's the model name with torque (nm@rpm) being 230@4500
SELECT "Model name" FROM table_16823 WHERE "Torque (Nm@rpm)" = '230@4500'
wikisql
CREATE TABLE mzjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, ...
吴嘉惠这个病患腰部的各项指标的检验咋样
SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzb...
css
CREATE TABLE table_14074 ( "Gothic Letter" text, "Roman" text, "Sound (phoneme)" text, "Sound (allophone)" text, "Proto-Germanic origin" text )
What is the Proto-Germanic origin associated with an allophone of [[[|k]]]?
SELECT "Proto-Germanic origin" FROM table_14074 WHERE "Sound (allophone)" = '[[[|k]]]'
wikisql
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate ...
Get all review tasks for a specific post ID or user's posts. For some of the post types, it probably isn't possible to have review tasks on them, but they're listed anyway.
SELECT 'site://review/' + CASE ReviewTaskTypes.Id WHEN 1 THEN 'suggested-edits' WHEN 2 THEN 'close' WHEN 3 THEN 'low-quality-posts' WHEN 4 THEN 'first-posts' WHEN 5 THEN 'late-answers' WHEN 6 THEN 'reopen' END + '/' + CAST(ReviewTasks.Id AS TEXT) + '| ' + ReviewTaskTypes.Name, PostId AS "post_link", ReviewTasks.Creatio...
sede
CREATE TABLE table_10365 ( "State" text, "Swimsuit" real, "Interview" real, "Evening Gown" real, "Average" real )
What is the highest average a contestant from Iowa with a swimsuit smaller than 9.267 has?
SELECT MAX("Average") FROM table_10365 WHERE "State" = 'iowa' AND "Swimsuit" < '9.267'
wikisql
CREATE TABLE table_name_45 ( player VARCHAR, to_par VARCHAR )
Which player has +2 to par?
SELECT player FROM table_name_45 WHERE to_par = "+2"
sql_create_context
CREATE TABLE table_name_70 ( place VARCHAR, score VARCHAR, player VARCHAR )
Can you tell me the Place that has the Score of 68, and the Player of christy o'connor jnr?
SELECT place FROM table_name_70 WHERE score = 68 AND player = "christy o'connor jnr"
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 was the total number of patients on ward 489 until 2 years ago?
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 489 AND DATETIME(patient.unitadmittime) <= DATETIME(CURRENT_TIME(), '-2 year')
eicu
CREATE TABLE table_name_78 ( wins INTEGER, position VARCHAR, scored VARCHAR )
What was the lowest number of wins for the team that scored more than 14 points and had a position of 7?
SELECT MIN(wins) FROM table_name_78 WHERE position = 7 AND scored > 14
sql_create_context
CREATE TABLE table_29521180_35 ( quarterfinals VARCHAR, athlete VARCHAR )
How many athletes were named federico muller?
SELECT COUNT(quarterfinals) FROM table_29521180_35 WHERE athlete = "Federico Muller"
sql_create_context
CREATE TABLE table_204_30 ( id number, "year built" text, "works number" number, "wheel arr." text, "gauge" text, "original owner" text, "name" text, "current location" text, "notes" text )
aside from 316 , what was the other works number used in 1883 ?
SELECT "works number" FROM table_204_30 WHERE "works number" <> 316 AND "year built" = 1883
squall
CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, ...
i need the flights that leave DENVER after 1900 next monday and fly 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, date_day, days, flight WHERE ((date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time...
atis
CREATE TABLE table_38497 ( "Number" real, "Station" text, "Japanese" text, "Distance (km)" real, "Stop" text, "Location" text )
Which station has a number less than 5 and an l stop?
SELECT "Station" FROM table_38497 WHERE "Number" < '5' AND "Stop" = 'l'
wikisql
CREATE TABLE table_73872 ( "Episode #" real, "Airdate" text, "Movie Title and Year" text, "Main Cast" text, "Network TV Run Time" text )
How many runtimes does episode 53 have?
SELECT COUNT("Network TV Run Time") FROM table_73872 WHERE "Episode #" = '53'
wikisql
CREATE TABLE table_33419 ( "Lane" real, "Swimmer" text, "Nationality" text, "100m" real, "200m" text, "300m" text, "400m" text, "500m" text, "600m" text, "700m" text, "Time" text )
Who got the time of 7:52.04?
SELECT "Swimmer" FROM table_33419 WHERE "Time" = '7:52.04'
wikisql
CREATE TABLE table_20240 ( "Date" text, "Cover model" text, "Centerfold model" text, "Interview subject" text, "20 Questions" text, "Pictorials" text )
Who was on the cover when the 20 questions subject was Scarlett Johansson?
SELECT "Cover model" FROM table_20240 WHERE "20 Questions" = 'Scarlett Johansson'
wikisql
CREATE TABLE table_16308030_1 ( event VARCHAR, time VARCHAR )
How many events have a time of 1:48.322?
SELECT event FROM table_16308030_1 WHERE time = "1:48.322"
sql_create_context
CREATE TABLE table_name_68 ( to_par VARCHAR, score VARCHAR )
What was the To par when the Score was 67-68=135?
SELECT to_par FROM table_name_68 WHERE score = 67 - 68 = 135
sql_create_context
CREATE TABLE table_name_11 ( time_elapsed VARCHAR, closest_approach VARCHAR )
What Time elapsed has 14 February 2011 as the Closest approach?
SELECT time_elapsed FROM table_name_11 WHERE closest_approach = "14 february 2011"
sql_create_context
CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE writes ( paperid int, a...
who had papers at ACL 2014 ?
SELECT DISTINCT writes.authorid FROM paper, venue, writes WHERE paper.year = 2014 AND venue.venueid = paper.venueid AND venue.venuename = 'ACL' AND writes.paperid = paper.paperid
scholar
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...
My Top Voted Answer Rate.
SELECT (SELECT CAST(COUNT(Id) AS FLOAT) FROM Posts AS a WHERE a.OwnerUserId = @UserId AND a.PostTypeId = 2 AND Score > 0 AND (Score = (SELECT MAX(Score) FROM Posts AS b WHERE b.ParentId = a.ParentId))) / (SELECT COUNT(*) FROM Posts AS c WHERE c.OwnerUserId = @UserId AND c.PostTypeId = 2) * 100 AS "top_voted_answer_rate...
sede
CREATE TABLE table_47858 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
What college did jerry hackenbruck come from who had an overall pick less than 344?
SELECT "College" FROM table_47858 WHERE "Overall" < '344' AND "Name" = 'jerry hackenbruck'
wikisql
CREATE TABLE table_7368 ( "Position" text, "Jersey #" real, "Name" text, "Height (cm)" real, "Weight (kg)" real, "Birthdate" text, "Birthplace" text, "1983\u20131984 Team" text )
What is the lowest jersey # that has evergreen park, illinois as the birthplace, with a weight (km) greater than 86?
SELECT MIN("Jersey #") FROM table_7368 WHERE "Birthplace" = 'evergreen park, illinois' AND "Weight (kg)" > '86'
wikisql
CREATE TABLE table_10107 ( "Block A" text, "Wataru Inoue" text, "Jushin Liger" text, "Minoru" text, "Ryusuke Taguchi" text, "Tatsuhito Takaiwa" text, "Yujiro" text )
Name for me the tatsuhito takaiwa for Ryusuke Taguchi of taguchi (14:31)
SELECT "Tatsuhito Takaiwa" FROM table_10107 WHERE "Ryusuke Taguchi" = 'taguchi (14:31)'
wikisql
CREATE TABLE table_15043 ( "Country" text, "Film title used in nomination" text, "Language" text, "Original title" text, "Director" text )
What was the original title of the film directed by Lene Gr nlykke and Sven Gr nlykke?
SELECT "Original title" FROM table_15043 WHERE "Director" = 'lene grønlykke and sven grønlykke'
wikisql
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code v...
ground transportation for ST. PAUL
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'ST. PAUL' AND ground_service.city_code = city.city_code
atis
CREATE TABLE table_name_71 ( proto_malayo_polynesian VARCHAR, proto_oceanic VARCHAR )
What is the Proto-Malayo-Polynesian word for the Proto-Oceanic word of *saqit, *turi?
SELECT proto_malayo_polynesian FROM table_name_71 WHERE proto_oceanic = "*saqit, *turi"
sql_create_context
CREATE TABLE table_12592074_1 ( launched VARCHAR, ship VARCHAR )
When was the ship tecumseh launched?
SELECT launched FROM table_12592074_1 WHERE ship = "Tecumseh"
sql_create_context
CREATE TABLE table_59831 ( "Date" text, "Round" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real )
What is the lowest attendance at Venue H in Round R2?
SELECT MIN("Attendance") FROM table_59831 WHERE "Venue" = 'h' AND "Round" = 'r2'
wikisql
CREATE TABLE table_10707142_2 ( report VARCHAR, race_name VARCHAR )
what is the name of the report that lists the race name as long beach grand prix?
SELECT report FROM table_10707142_2 WHERE race_name = "Long Beach Grand Prix"
sql_create_context
CREATE TABLE table_203_563 ( id number, "#" number, "judge" text, "state" text, "born/died" text, "active" text, "chief" text, "senior" text, "appointed by" text, "reason for\ntermination" text )
how many judges served as chief total ?
SELECT COUNT("judge") FROM table_203_563 WHERE NOT "chief" IS NULL
squall
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...
在2000年12月21日到2008年1月25日期间5823598这个医疗机构的消耗的统筹金额是多少?
SELECT SUM(t_kc24.OVE_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '5823598' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-12-21' AND '2008-01-25'
css
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
give me the number of patients who underwent other closed [endoscopic] biopsy of biliary duct or sphincter of oddi and have mesenteric ischemis primary disease.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "MESENTERIC ISCHEMIA" AND procedures.short_title = "Clo endosc bx bile duct"
mimicsql_data
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, ...
tell me about the top three most common procedures of patients of age 50s until 2 years ago?
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-2 yea...
eicu
CREATE TABLE table_51670 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the Crowd for the Venue of Princes Park?
SELECT "Crowd" FROM table_51670 WHERE "Venue" = 'princes park'
wikisql
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int,...
Which 100 -level classes are there for 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 = 'EECS' AND course.number BETWEEN 100 AND 100 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = cou...
advising
CREATE TABLE table_203_292 ( id number, "payload type (pt)" text, "name" text, "type" text, "no. of channels" text, "clock rate (hz)" text, "frame size (ms)" text, "default packet size (ms)" text, "description" text, "references" text )
the rtp/avp audio and video payload types include an audio type called qcelp and its frame size is how many ms ?
SELECT "frame size (ms)" FROM table_203_292 WHERE "name" = 'qcelp'
squall
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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, ...
Find out the average age of patients who are 70 years or more that were admitted on or after 2194.
SELECT AVG(demographic.age) FROM demographic WHERE demographic.age >= "70" AND demographic.admityear >= "2194"
mimicsql_data
CREATE TABLE table_51890 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which average Crowd has a Home team of essendon?
SELECT AVG("Crowd") FROM table_51890 WHERE "Home team" = 'essendon'
wikisql
CREATE TABLE table_name_49 ( round INTEGER, player VARCHAR )
Which Round has a Player of damon jones?
SELECT SUM(round) FROM table_name_49 WHERE player = "damon jones"
sql_create_context
CREATE TABLE Document_Types ( document_type_code VARCHAR(10), document_description VARCHAR(255) ) CREATE TABLE Organisations ( organisation_id INTEGER, organisation_type VARCHAR(10), organisation_details VARCHAR(255) ) CREATE TABLE Organisation_Types ( organisation_type VARCHAR(10), organi...
What are the ids and details for all organizations that have grants of more than 6000 dollars. Show a pie chart.
SELECT T2.organisation_details, T1.organisation_id FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id GROUP BY T2.organisation_details
nvbench
CREATE TABLE table_name_80 ( score VARCHAR, winner VARCHAR )
What was the score of Johnny Miller (7)?
SELECT score FROM table_name_80 WHERE winner = "johnny miller (7)"
sql_create_context
CREATE TABLE table_204_103 ( id number, "medal" text, "name" text, "sport" text, "event" text )
how many total sports had silver medals awarded ?
SELECT COUNT(DISTINCT "sport") FROM table_204_103
squall
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 is the number of patients whose death status is 0 and procedure short title is suture bladder lacerat?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.short_title = "Suture bladder lacerat"
mimicsql_data
CREATE TABLE table_24918268_2 ( final_score VARCHAR, kickoff VARCHAR )
What was the score for the game that kicked off at 6:00 p.m.?
SELECT final_score FROM table_24918268_2 WHERE kickoff = "6:00 p.m."
sql_create_context
CREATE TABLE table_29565 ( "A\u00f1o" real, "Trabajo nominado" text, "Premio" text, "Categor\u00eda" text, "Country" text, "Resultado" text )
What was the categoria when E.E.U.U was the country?
SELECT "Categor\u00eda" FROM table_29565 WHERE "Country" = 'E.E.U.U'
wikisql