context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE wdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
从09年8月30日到12年10月24日这段时间内70984037号患者的所有检验报告单都在什么时间审核的?
SELECT jybgb.SHSJ FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '70984037' AND jybgb.BGRQ BETWEEN '2009-08-30' AND '2012-10-24' UNION...
css
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId ...
Top 50 users from Dehradun.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%dehradun%' OR UPPER(Location) LIKE '%DEHRADUN' ORDER BY Reputation DESC LIMIT 50
sede
CREATE TABLE table_8466 ( "Name" text, "Type" text, "Nationality" text, "Date" text, "Displacement" text )
what is the name when the displacement is 8,305 t?
SELECT "Name" FROM table_8466 WHERE "Displacement" = '8,305 t'
wikisql
CREATE TABLE table_name_38 ( alternate VARCHAR, second VARCHAR )
Who is the alternate for Magnus Swartling as Second?
SELECT alternate FROM table_name_38 WHERE second = "magnus swartling"
sql_create_context
CREATE TABLE table_32802 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the largest crowd for a Melbourne away team?
SELECT MAX("Crowd") FROM table_32802 WHERE "Away team" = 'melbourne'
wikisql
CREATE TABLE sampledata15 ( sample_pk number, state text, year text, month text, day text, site text, commod text, source_id text, variety text, origin text, country text, disttype text, commtype text, claim text, quantity number, growst text, packst t...
which pesticides are most used?
SELECT pestcode FROM resultsdata15 GROUP BY pestcode ORDER BY COUNT(*) DESC LIMIT 1
pesticide
CREATE TABLE table_name_47 ( nationality VARCHAR, position VARCHAR, school_club_team VARCHAR )
What is the nationality for the guard position from Bowling Green?
SELECT nationality FROM table_name_47 WHERE position = "guard" AND school_club_team = "bowling green"
sql_create_context
CREATE TABLE table_43700 ( "Poll Source" text, "Dates administered" text, "Democrat: Mark Begich" text, "Republican: Ted Stevens" text, "Lead Maragin" real )
What was the average lead maragin for the dates administered of october 6, 2008?
SELECT AVG("Lead Maragin") FROM table_43700 WHERE "Dates administered" = 'october 6, 2008'
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...
在医院9529640里名叫韦宏放的病患在就诊的科室名称不含有补牙的所有门诊就诊记录的流水号是多少?
SELECT zzmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE person_info.XM = '韦宏放' AND hz_info.YLJGDM = '9529640' AND NOT zzmzjzjlb.JZKSMC LIKE '%补牙%' UNION SELECT fzzmzjz...
css
CREATE TABLE table_name_59 ( co_drivers VARCHAR, team VARCHAR, year VARCHAR )
Who was the co-driver for Toyota Racing after the year 2012?
SELECT co_drivers FROM table_name_59 WHERE team = "toyota racing" AND year > 2012
sql_create_context
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConce...
When my Suggested Edit decisions were reversed.
SELECT SE.PostId AS "post_link", V.Name AS "vote_type", SE.ApprovalDate, SE.RejectionDate FROM SuggestedEditVotes AS SEV INNER JOIN SuggestedEdits AS SE ON SEV.SuggestedEditId = SE.Id INNER JOIN VoteTypes AS V ON V.Id = SEV.VoteTypeId WHERE SEV.UserId = @UserId AND ((SEV.VoteTypeId = 2 AND NOT RejectionDate IS NULL) OR...
sede
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...
what is gender of subject name estrella carroll?
SELECT demographic.gender FROM demographic WHERE demographic.name = "Estrella Carroll"
mimicsql_data
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 treatment ( treat...
how many hours have passed since patient 006-158338 stayed in the current hospital visit in the ward 413 for the first time?
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '006-158338' AND patient.wardid = 413 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime LIMIT 1
eicu
CREATE TABLE table_26335424_86 ( semifinals VARCHAR, round_of_16 VARCHAR )
If the round of 16 was yulius fernando ( ina ) l pts 5-6, what was the semifinals?
SELECT semifinals FROM table_26335424_86 WHERE round_of_16 = "Yulius Fernando ( INA ) L PTS 5-6"
sql_create_context
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImage...
I'm trying to find a specific answer.
SELECT Id AS "post_link" FROM Posts WHERE Score = -3 AND Body LIKE '%handle%xml%' AND PostTypeId = 2 ORDER BY Id DESC
sede
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 mzjzjlb ( HXPLC number, HZXM ...
在08年5月15日到08年10月14日内患者67621156所有检验结果指标记录中的检测方法是什么?
SELECT jyjgzbb.JCFF FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON 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_MZJZJLB WHERE hz_info.RYBH = '67621156' AND jyjgzbb.JYRQ BETWEEN '2008-05-15' ...
css
CREATE TABLE table_2394927_1 ( power___dbm__ VARCHAR, profile VARCHAR )
List all dbm's when profiles are 8a.
SELECT power___dbm__ FROM table_2394927_1 WHERE profile = "8a"
sql_create_context
CREATE TABLE table_203_430 ( id number, "draw" number, "artist" text, "song" text, "jury" number, "televote" number, "total" number, "place" number )
who had the most televotes on the eurovision song contest 2008 ?
SELECT "artist" FROM table_203_430 ORDER BY "televote" DESC LIMIT 1
squall
CREATE TABLE table_47963 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
Which Notre Dame position has a pick lower than 5 and round 7?
SELECT "Position" FROM table_47963 WHERE "Pick" < '5' AND "College" = 'notre dame' AND "Round" = '7'
wikisql
CREATE TABLE store_product ( Store_ID int, Product_ID int ) CREATE TABLE district ( District_ID int, District_name text, Headquartered_City text, City_Population real, City_Area real ) CREATE TABLE store_district ( Store_ID int, District_ID int ) CREATE TABLE store ( Store_ID ...
How many stores are headquarted in each city Plot them as bar chart, and show in descending by the y axis please.
SELECT Headquartered_City, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.Store_ID = t2.Store_ID JOIN district AS t3 ON t2.District_ID = t3.District_ID GROUP BY t3.Headquartered_City ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_3989 ( "No. in series" text, "No. in season" text, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real )
What episode number in the series is 'the drum major'?
SELECT "No. in series" FROM table_3989 WHERE "Title" = 'The Drum Major'
wikisql
CREATE TABLE table_15024 ( "Year" real, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text )
Name the women's doubles for mixed doubles of no competition
SELECT "Women's doubles" FROM table_15024 WHERE "Mixed doubles" = 'no competition'
wikisql
CREATE TABLE table_name_94 ( engine VARCHAR, driver VARCHAR, team VARCHAR, chassis VARCHAR )
What type of engine does the BF Racing Marron Excavations have that also has Monaco as chassis and Lee Filliponi as the driver?
SELECT engine FROM table_name_94 WHERE team = "bf racing marron excavations" AND chassis = "monaco" AND driver = "lee filliponi"
sql_create_context
CREATE TABLE table_46976 ( "Year" real, "Date" text, "Winner" text, "Result" text, "Loser" text, "Location" text )
In what Year was the Result of the game 16-14?
SELECT MAX("Year") FROM table_46976 WHERE "Result" = '16-14'
wikisql
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 many patients are diagnosed with complete heart block and are born beforre 2200?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COMPLETE HEART BLOCK" AND demographic.dob_year < "2200"
mimicsql_data
CREATE TABLE table_47174 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text )
What To par was won in 1982?
SELECT "To par" FROM table_47174 WHERE "Year(s) won" = '1982'
wikisql
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, ...
what is the seating capacity of an M80
SELECT DISTINCT aircraft_code FROM aircraft WHERE aircraft_code = 'M80'
atis
CREATE TABLE table_10484 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
What is the grid total for alain prost with over 14 laps?
SELECT SUM("Grid") FROM table_10484 WHERE "Laps" > '14' AND "Driver" = 'alain prost'
wikisql
CREATE TABLE table_24906653_5 ( steals VARCHAR, blocks VARCHAR )
List the number of takeaways with 1 rejection.
SELECT COUNT(steals) FROM table_24906653_5 WHERE blocks = 1
sql_create_context
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
住院就诊91340380252开出的检验报告单有多少份?
SELECT COUNT(*) FROM jybgb WHERE JZLSH = '91340380252'
css
CREATE TABLE table_20916 ( "Central Forest Reserve" text, "Size in km\u00b2" real, "Total plant species" real, "Tree species" real, "Endemic" real, "Threatened (CR,VU,EN)" real )
How many tree species are in the kitechura reserve?
SELECT "Tree species" FROM table_20916 WHERE "Central Forest Reserve" = 'Kitechura'
wikisql
CREATE TABLE table_6035 ( "Year" real, "Group" text, "Award" text, "Film/Series" text, "Result" text )
What is the highest year that Kim was nominated for Over the Rainbow?
SELECT MAX("Year") FROM table_6035 WHERE "Film/Series" = 'over the rainbow'
wikisql
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, value...
have patient 10855 been tested for absolute cd4 count since 2105?
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'absolute cd4 count') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10855) AND STRFTIME('%y', labevents.charttime) >= '2105'
mimic_iii
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
How many 3k users there are.
SELECT COUNT(Id) FROM Users WHERE Reputation > 15 AND Reputation < 3000
sede
CREATE TABLE table_25594271_2 ( loa__metres_ VARCHAR, yacht VARCHAR )
What were the LOA metres for the yacht ichi ban?
SELECT loa__metres_ FROM table_25594271_2 WHERE yacht = "Ichi Ban"
sql_create_context
CREATE TABLE table_19897896_7 ( class VARCHAR, university VARCHAR )
in which class was the ohio state university
SELECT class FROM table_19897896_7 WHERE university = "Ohio state"
sql_create_context
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 ) ...
give me the number of patients with diagnoses icd9 code 59654 who were hospitalized for more than 6 days.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "6" AND diagnoses.icd9_code = "59654"
mimicsql_data
CREATE TABLE table_18677 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
What was the result of the election in the Arkansas 2 district?
SELECT "Result" FROM table_18677 WHERE "District" = 'Arkansas 2'
wikisql
CREATE TABLE table_60673 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What is the T4 Place Player with a Score of 71-74-66=211?
SELECT "Player" FROM table_60673 WHERE "Place" = 't4' AND "Score" = '71-74-66=211'
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
what is the number of patients whose marital status is divorced and ethnicity is black/haitian?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.ethnicity = "BLACK/HAITIAN"
mimicsql_data
CREATE TABLE table_name_86 ( method VARCHAR, time VARCHAR, round VARCHAR )
What is the method when the time was 5:00, and the round higher than 4?
SELECT method FROM table_name_86 WHERE time = "5:00" AND round > 4
sql_create_context
CREATE TABLE participants_in_Events ( participant_id VARCHAR )
What are all the distinct participant ids who attended any events?
SELECT COUNT(DISTINCT participant_id) FROM participants_in_Events
sql_create_context
CREATE TABLE table_22034 ( "Romanised name" text, "Chinese name" text, "age at appointment" real, "Foreign nationality" text, "Portfolio attachment" text, "Prior occupation" text, "Govt salary" text )
The name cheung, raymond man-to is listed as a romanised name is cheung, raymond man-to?
SELECT "Foreign nationality" FROM table_22034 WHERE "Romanised name" = 'Cheung, Raymond Man-to'
wikisql
CREATE TABLE table_56185 ( "Book title" text, "Author" text, "Edition/Publisher" text, "Page count" text, "Page size" text, "Language" text )
Which author wrote Sironia, Texas in English?
SELECT "Author" FROM table_56185 WHERE "Language" = 'english' AND "Book title" = 'sironia, texas'
wikisql
CREATE TABLE table_18555 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
What party does the incumbent from the Ohio 7 district belong to?
SELECT "Party" FROM table_18555 WHERE "District" = 'Ohio 7'
wikisql
CREATE TABLE cinema ( name VARCHAR, openning_year VARCHAR )
Show all the cinema names and opening years in descending order of opening year.
SELECT name, openning_year FROM cinema ORDER BY openning_year DESC
sql_create_context
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE regions ( REGION_...
For those employees who did not have any job in the past, draw a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by time, and sort by the y axis in descending.
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY COUNT(HIRE_DATE) DESC
nvbench
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 diagnoses ( ...
count the number of patients whose ethnicity is american indian/alaska native and age is less than 67?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.age < "67"
mimicsql_data
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, ...
what did patient 8098 have to pay for the hospital stay?
SELECT SUM(cost.cost) FROM cost WHERE cost.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8098)
mimic_iii
CREATE TABLE table_204_429 ( id number, "battle" text, "location" text, "date(s)" text, "engagement remarks" text, "victor" text )
what was the total amount of m -lrb- mexican -rrb- victories ?
SELECT COUNT(*) FROM table_204_429 WHERE "victor" = 'm'
squall
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 labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, ...
what was the first arterial bp [systolic] value patient 594 had since 271 days ago?
SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 594)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp...
mimic_iii
CREATE TABLE table_8308 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
What was the score when the match was in the country of Scotland?
SELECT "Score" FROM table_8308 WHERE "Country" = 'scotland'
wikisql
CREATE TABLE table_20799905_1 ( mccain_percentage VARCHAR, county VARCHAR )
How many figures are given for McCain's % in Davidson county?
SELECT COUNT(mccain_percentage) FROM table_20799905_1 WHERE county = "DAVIDSON"
sql_create_context
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 route ( train_id int, station_id int ) CREATE TABLE train ( id int, train_number int, name text, origin text,...
Stacked bar of services and how many services colored by local_authority, and sort in ascending by the Y-axis.
SELECT services, COUNT(services) FROM station GROUP BY local_authority, services ORDER BY COUNT(services)
nvbench
CREATE TABLE table_name_45 ( grid VARCHAR, laps VARCHAR )
What grid is associated with 67 laps?
SELECT grid FROM table_name_45 WHERE laps = 67
sql_create_context
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABL...
when did patient 94937 have a procedure for the first time since 2105?
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 94937) AND STRFTIME('%y', procedures_icd.charttime) >= '2105' ORDER BY procedures_icd.charttime LIMIT 1
mimic_iii
CREATE TABLE table_171250_2 ( census_ranking VARCHAR, population VARCHAR )
What are the census ranking(s) for a population of 284?
SELECT census_ranking FROM table_171250_2 WHERE population = 284
sql_create_context
CREATE TABLE table_name_35 ( date VARCHAR, label VARCHAR )
What Date has a label of alfa records?
SELECT date FROM table_name_35 WHERE label = "alfa records"
sql_create_context
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
门诊诊断为疾病P55.131的患者的检测指标143654的参考值范围下限是什么?上限是什么?
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM ...
css
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_re...
show ground transportation for PITTSBURGH
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PITTSBURGH' AND ground_service.city_code = city.city_code
atis
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerU...
Get upvoted answers where question doesn t have tag.
SELECT a.ParentId, q.Id AS "post_link" FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id WHERE a.Score > 0 AND a.OwnerUserId = @userId AND a.PostTypeId = 2 AND NOT q.Tags LIKE '%<' + @tags + '>%'
sede
CREATE TABLE labevents ( row_id number, subject_id number, hadm_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 time ) CREATE TABLE inpute...
what is the yearly average of arterial bp [systolic] for patient 655?
SELECT AVG(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 655)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arteri...
mimic_iii
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id, and sort by the X in ascending please.
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID
nvbench
CREATE TABLE table_name_15 ( result VARCHAR, event VARCHAR, method VARCHAR )
Which Result has the Event Strikeforce and the Method, Ko (spinning back fist)?
SELECT result FROM table_name_15 WHERE event = "strikeforce" AND method = "ko (spinning back fist)"
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
how many patients aged below 27 years had bradycardia as the primary disease?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BRADYCARDIA" AND demographic.age < "27"
mimicsql_data
CREATE TABLE table_54256 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
Where was the game with result 7-2 played?
SELECT "Venue" FROM table_54256 WHERE "Result" = '7-2'
wikisql
CREATE TABLE table_20329 ( "Year" real, "Matches" real, "Wins" real, "Losses" real, "No Result" real, "Tied" real, "Success Rate" text, "Position" text, "Summary" text )
Name the least wins of 56.25%
SELECT MIN("Wins") FROM table_20329 WHERE "Success Rate" = '56.25%'
wikisql
CREATE TABLE table_40608 ( "Rank" real, "Name" text, "Team" text, "Games" real, "Rebounds" real )
What is the highest Rank, when Name is Travis Watson, and when Games is less than 14?
SELECT MAX("Rank") FROM table_40608 WHERE "Name" = 'travis watson' AND "Games" < '14'
wikisql
CREATE TABLE table_53355 ( "Track" real, "Title" text, "Author(s)" text, "Recorded" text, "Length" text )
Which title is 3:43 long?
SELECT "Title" FROM table_53355 WHERE "Length" = '3:43'
wikisql
CREATE TABLE table_name_98 ( model_number VARCHAR, multiplier VARCHAR, front_side_bus VARCHAR, l2_cache VARCHAR )
Which Model number has a Front Side Bus of 100mhz, a L2-Cache of 64kib and a Multiplier of 8.5 ?
SELECT model_number FROM table_name_98 WHERE front_side_bus = "100mhz" AND l2_cache = "64kib" AND multiplier = "8.5×"
sql_create_context
CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIGH_DEGREE varchar(5) ) CREATE TABLE ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) ) CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME var...
Show the number of courses for each course description in a stacked bar chart. The x-axis is course description and group by office name.
SELECT CRS_DESCRIPTION, COUNT(CRS_DESCRIPTION) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY PROF_OFFICE, CRS_DESCRIPTION
nvbench
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
For those records from the products and each product's manufacturer, show me about the distribution of name and price , and group by attribute name in a bar chart, show by the X in asc please.
SELECT T1.Name, T1.Price 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 table_name_26 ( colours VARCHAR, head_coach VARCHAR )
What are the colours of the team with benedikt gu mundsson as head coach?
SELECT colours FROM table_name_26 WHERE head_coach = "benedikt guðmundsson"
sql_create_context
CREATE TABLE department ( Department_ID int, Name text, Creation text, Ranking int, Budget_in_Billions real, Num_Employees real ) CREATE TABLE management ( department_ID int, head_ID int, temporary_acting text ) CREATE TABLE head ( head_ID int, name text, born_state tex...
Can you draw the trend of sum budget in billions over the creation?, I want to rank x axis from low to high order.
SELECT Creation, SUM(Budget_in_Billions) FROM department GROUP BY Creation ORDER BY Creation
nvbench
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE code_des...
are there any flights from PHILADELPHIA to DALLAS which stop in ATLANTA
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND CITY_2.cit...
atis
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate ti...
Python and Django BE Gracall v Praze.
SELECT u.Id AS "user_link", u.DisplayName, u.Location, u.WebsiteUrl, u.AboutMe, u.Views, u.UpVotes, u.DownVotes, u.Age FROM Users AS u JOIN (SELECT DISTINCT UserId FROM Badges WHERE LOWER(Name) IN ('python', 'django') AND Class IN (1, 2, 3) AND TagBased = 1) AS tag_badges ON tag_badges.UserId = u.Id WHERE LOWER(Locatio...
sede
CREATE TABLE table_43429 ( "Year" text, "Award" text, "Production" text, "Role" text, "Result" text )
Which award was given in 2012?
SELECT "Award" FROM table_43429 WHERE "Year" = '2012'
wikisql
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, ins...
Most recently , who has taught SCAND 104 ?
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course_offeri...
advising
CREATE TABLE table_27512025_1 ( ab_ripper_x VARCHAR, exercise VARCHAR )
What is the ab ripper x when exercise is x stretch?
SELECT ab_ripper_x FROM table_27512025_1 WHERE exercise = "X Stretch"
sql_create_context
CREATE TABLE table_204_751 ( id number, "date" text, "train" text, "location" text, "present location" text, "comments" text, "top speed (km/h)" text )
how many trains listed have the same speed as the hmb2 ?
SELECT COUNT("train") FROM table_204_751 WHERE "train" <> 'hmb2' AND "top speed (km/h)" = (SELECT "top speed (km/h)" FROM table_204_751 WHERE "train" = 'hmb2')
squall
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), ...
For those employees who was hired before 2002-06-21, return a bar chart about the distribution of job_id and the sum of employee_id , and group by attribute job_id.
SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID
nvbench
CREATE TABLE table_name_19 ( tournament VARCHAR )
What is 2011, when 2006 is 'A', when 2008 is 'A', and when Tournament is 'Rome'?
SELECT 2011 FROM table_name_19 WHERE 2006 = "a" AND 2008 = "a" AND tournament = "rome"
sql_create_context
CREATE TABLE table_55062 ( "Block A" text, "Ryuji Hijikata" text, "Shuji Kondo" text, "El NOSAWA Mendoza" text, "PEPE Michinoku" text, "Katsuhiko Nakajima" text )
What is the Block A value for an El NOSAWA Mendoza value of kondo (7:08)?
SELECT "Block A" FROM table_55062 WHERE "El NOSAWA Mendoza" = 'kondo (7:08)'
wikisql
CREATE TABLE player_college ( player_id TEXT, college_id TEXT, year INTEGER ) CREATE TABLE player_award ( player_id TEXT, award_id TEXT, year INTEGER, league_id TEXT, tie TEXT, notes TEXT ) CREATE TABLE appearances ( year INTEGER, team_id TEXT, league_id TEXT, playe...
Return me a bar chart to show the frequency of the year attribute by binning into a weekday interval, order by the the number of year in desc please.
SELECT year, COUNT(year) FROM home_game ORDER BY COUNT(year) DESC
nvbench
CREATE TABLE people ( People_ID int, Name text, Age real, Height real, Hometown text ) CREATE TABLE gymnast ( Gymnast_ID int, Floor_Exercise_Points real, Pommel_Horse_Points real, Rings_Points real, Vault_Points real, Parallel_Bars_Points real, Horizontal_Bar_Points real...
Visualize a pie chart with what are the hometowns of gymnasts and the corresponding number of gymnasts?
SELECT Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown
nvbench
CREATE TABLE table_2933761_1 ( occupation VARCHAR, name VARCHAR )
What is Joan Leaven's occupation?
SELECT occupation FROM table_2933761_1 WHERE name = "Joan Leaven"
sql_create_context
CREATE TABLE table_203_424 ( id number, "year" number, "starts" number, "wins" number, "top 5" number, "top 10" number, "poles" number, "avg. start" number, "avg. finish" number, "winnings" text, "position" text, "team(s)" text )
how many times was his average finish below 18 ?
SELECT COUNT(*) FROM table_203_424 WHERE "avg. finish" < 18
squall
CREATE TABLE table_53454 ( "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text )
What is the stadium when the date of the game is December 14?
SELECT "Stadium" FROM table_53454 WHERE "Date" = 'december 14'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patient...
when was patient 035-11687 for the first time prescribed a medication via the po route since 12/2102?
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-11687')) AND medication.routeadmin = 'po' AND STRFTIME('%y...
eicu
CREATE TABLE table_68466 ( "Event" text, "Individual" text, "Sprint" text, "Pursuit" text, "Mass Start" text, "Relay" text )
Who was the individual in the event of 1998 Pokljuka?
SELECT "Individual" FROM table_68466 WHERE "Event" = '1998 pokljuka'
wikisql
CREATE TABLE table_41271 ( "Rider" text, "Bike" text, "Laps" real, "Time" text, "Grid" real )
Which bike had a grid less than 35 and time at 37:58.607?
SELECT "Bike" FROM table_41271 WHERE "Grid" < '35' AND "Time" = '37:58.607'
wikisql
CREATE TABLE table_71259 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
Which engine has a Lotus 49c chassis?
SELECT "Engine" FROM table_71259 WHERE "Chassis" = 'lotus 49c'
wikisql
CREATE TABLE table_18899 ( "Rnd" real, "Circuit" text, "GTO Winning Team" text, "GTU Winning Team" text, "TO Winning Team" text, "TU Winning Team" text, "Results" text )
What was the gtu winning team when the gto winning team was #48 greenwood racing?
SELECT "GTU Winning Team" FROM table_18899 WHERE "GTO Winning Team" = '#48 Greenwood Racing'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugst...
indicate the daily maximum dose of enteral two kal hn that patient 006-80884 has received.
SELECT MAX(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-80884')) AND intakeoutput.celllabel = 'enter...
eicu
CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text ) CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text )
Plot the average of age by grouped by class as a bar graph, could you show in ascending by the Y-axis?
SELECT Class, AVG(age) FROM captain GROUP BY Class ORDER BY AVG(age)
nvbench
CREATE TABLE table_69089 ( "Year" real, "Date" text, "Title" text, "Format(s)" text, "Award Description(s)" text, "Result(s)" text )
Which is the average year with the date of February 24?
SELECT AVG("Year") FROM table_69089 WHERE "Date" = 'february 24'
wikisql
CREATE TABLE table_204_945 ( id number, "episode" number, "name" text, "synopsis" text, "sent home" text, "highest seller" text )
who was the last person to be sent home ?
SELECT "sent home" FROM table_204_945 ORDER BY "episode" DESC LIMIT 1
squall
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, ...
Can you provide me with a list of classes being taught by Dr. Kathleen Wisser next semester ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Kathleen Wisser%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.o...
advising
CREATE TABLE table_13103 ( "Result" text, "Opponent" text, "Type" text, "Rd., Time" text, "Date" text )
Who did Tony Oakey win against when he had type of w pts 12?
SELECT "Opponent" FROM table_13103 WHERE "Result" = 'win' AND "Type" = 'w pts 12'
wikisql
CREATE TABLE table_name_21 ( to_par VARCHAR, player VARCHAR )
What was Bert Yancey's finishing score to par?
SELECT to_par FROM table_name_21 WHERE player = "bert yancey"
sql_create_context