context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_25926120_7 ( language VARCHAR, awardee_s_ VARCHAR )
what is the language when the awardee is re-recordist : mateen ahmad?
SELECT language FROM table_25926120_7 WHERE awardee_s_ = "Re-recordist : Mateen Ahmad"
sql_create_context
CREATE TABLE league ( id number, country_id number, name text ) CREATE TABLE player_attributes ( id number, player_fifa_api_id number, player_api_id number, date text, overall_rating number, potential number, preferred_foot text, attacking_work_rate text, defensive_work_...
Who are the top 3 players in terms of overall rating?
SELECT DISTINCT T1.player_name FROM player AS T1 JOIN player_attributes AS T2 ON T1.player_api_id = T2.player_api_id ORDER BY overall_rating DESC LIMIT 3
spider
CREATE TABLE table_50010 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What was the score when Bolton Wanderers were the away team?
SELECT "Score" FROM table_50010 WHERE "Away team" = 'bolton wanderers'
wikisql
CREATE TABLE table_name_28 ( reported_isn INTEGER, citizenship VARCHAR )
Name the lowest reported isn for russia
SELECT MIN(reported_isn) FROM table_name_28 WHERE citizenship = "russia"
sql_create_context
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...
when was the last time patient 15986 got a lab test in this month for lactate?
SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'lactate') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15986) AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURREN...
mimic_iii
CREATE TABLE table_63948 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" real )
Which nationality has a time of 50.92?
SELECT "Nationality" FROM table_63948 WHERE "Time" = '50.92'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
俞德本病患的检验报告单的报告日期在2006-07-13之后的住院就诊的流水号有哪些
SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.person_info_XM = '俞德本' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2006-07-13')
css
CREATE TABLE table_8139 ( "Club" text, "Winners" real, "Runners-up" real, "Third-place" real, "Winning Years" text, "Runners-up years" text, "Third-place years" text )
What is the lowest runners-up for the club that took third place in 2003 and fewer than 1 third-place entry?
SELECT MIN("Runners-up") FROM table_8139 WHERE "Third-place years" = '2003' AND "Third-place" < '1'
wikisql
CREATE TABLE table_name_50 ( home_team VARCHAR )
How much did the home team Geelong score?
SELECT home_team AS score FROM table_name_50 WHERE home_team = "geelong"
sql_create_context
CREATE TABLE table_29087004_2 ( written_by VARCHAR, production_code VARCHAR )
Who wrote the episode with a production code of 116?
SELECT written_by FROM table_29087004_2 WHERE production_code = 116
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
give me the number of patients whose gender is m and insurance is medicare?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.insurance = "Medicare"
mimicsql_data
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name ...
show me flights to SAN FRANCISCO arriving before 100
SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'SAN FRANCISCO' AND flight.arrival_time < 100 AND flight.to_airport = airport_service.airport_code
atis
CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE keyphrase ( keyphraseid int, keyphrasename varchar ) CREATE TABLE field ( fieldid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journali...
What topic does Dan Suciu write about ?
SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'Dan Suciu' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
scholar
CREATE TABLE county_public_safety ( County_ID int, Name text, Population int, Police_officers int, Residents_per_officer int, Case_burden int, Crime_rate real, Police_force text, Location text ) CREATE TABLE city ( City_ID int, County_ID int, Name text, White real, ...
What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to. Show scatter chart.
SELECT White, Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID
nvbench
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
what is the number of patients that received a vent rate test until 4 years ago?
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'vent rate' AND DATETIME(lab.labresulttime) <= DATETIME(CURRENT_TIME(), '-4 year'))
eicu
CREATE TABLE table_name_61 ( manufacturer VARCHAR, time VARCHAR, grid VARCHAR )
Which Manufacturer has a Time of accident and a Grid greater than 15?
SELECT manufacturer FROM table_name_61 WHERE time = "accident" AND grid > 15
sql_create_context
CREATE TABLE table_77890 ( "Vehicle Numbers" text, "Vehicle Types" text, "Livery" text, "Location" text, "Status" text )
what livery has a status of in service as coaching stock?
SELECT "Livery" FROM table_77890 WHERE "Status" = 'in service as coaching stock'
wikisql
CREATE TABLE table_56131 ( "Hole" text, "Yards (red tees)" real, "Par (red tees)" real, "Yards (white tees)" real, "Par (white tees)" real )
What is the average number of yards on a red tee that has a hole of 1 and a par above 4?
SELECT AVG("Yards (red tees)") FROM table_56131 WHERE "Hole" = '1' AND "Par (white tees)" > '4'
wikisql
CREATE TABLE Street_Markets ( Market_ID INTEGER, Market_Details VARCHAR(255) ) CREATE TABLE Photos ( Photo_ID INTEGER, Tourist_Attraction_ID INTEGER, Name VARCHAR(255), Description VARCHAR(255), Filename VARCHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Features ( Feature_ID ...
A bar chart showing the number of tourist attractions for each attraction name, display X in desc order.
SELECT Name, COUNT(*) FROM Tourist_Attractions AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID ORDER BY Name DESC
nvbench
CREATE TABLE table_12305325_4 ( arlenes_vote VARCHAR, craigs_vote VARCHAR )
What was the total of arlenes vote when craig voted for brian and karen?
SELECT COUNT(arlenes_vote) FROM table_12305325_4 WHERE craigs_vote = "Brian and Karen"
sql_create_context
CREATE TABLE table_59198 ( "Year" real, "Lok Sabha" text, "Members of Parliament" text, "Party Won" text, "Winner's % votes" text, "Trailing Party" text, "Trailing Party % votes" text )
What is Trailing Party % Votes, when Party Won is 'Bharatiya Janta Party', and when Trailing Party is 'Indian National Congress'?
SELECT "Trailing Party % votes" FROM table_59198 WHERE "Party Won" = 'bharatiya janta party' AND "Trailing Party" = 'indian national congress'
wikisql
CREATE TABLE table_60780 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text )
What's the 1st leg of team 1 alajuelense?
SELECT "1st leg" FROM table_60780 WHERE "Team 1" = 'alajuelense'
wikisql
CREATE TABLE Financial_Transactions ( transaction_id INTEGER, account_id INTEGER, invoice_number INTEGER, transaction_type VARCHAR(15), transaction_date DATETIME, transaction_amount DECIMAL(19,4), transaction_comment VARCHAR(255), other_transaction_details VARCHAR(255) ) CREATE TABLE Or...
Show the number of accounts opened in each year for all accounts in a line chart, and show by the x-axis from high to low.
SELECT date_account_opened, COUNT(date_account_opened) FROM Accounts ORDER BY date_account_opened DESC
nvbench
CREATE TABLE table_20777 ( "Model number" text, "sSpec number" text, "Frequency" text, "L2 cache" text, "FSB" text, "Mult." text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Part number(s)" text, "Release price ( USD )" text )
What is the release date of part 80525py500512bx80525u500512bx80525u500512e?
SELECT "Release date" FROM table_20777 WHERE "Part number(s)" = '80525PY500512BX80525U500512BX80525U500512E'
wikisql
CREATE TABLE pitstops ( raceid number, driverid number, stop number, lap number, time text, duration text, milliseconds number ) CREATE TABLE constructors ( constructorid number, constructorref text, name text, nationality text, url text ) CREATE TABLE driverstandings (...
For each nationality, how many different constructors are there?
SELECT COUNT(*), nationality FROM constructors GROUP BY nationality
spider
CREATE TABLE table_name_25 ( state VARCHAR, city VARCHAR )
Which state includes the city of Storrs?
SELECT state FROM table_name_25 WHERE city = "storrs"
sql_create_context
CREATE TABLE Invoices ( invoice_number INTEGER, order_id INTEGER, invoice_date DATETIME ) CREATE TABLE Product_Categories ( production_type_code VARCHAR(15), product_type_description VARCHAR(80), vat_rating DECIMAL(19,4) ) CREATE TABLE Order_Items ( order_item_id INTEGER, order_id INTE...
Show order ids and the number of products in each order. Plot them as scatter chart.
SELECT order_id, COUNT(DISTINCT product_id) FROM Order_Items
nvbench
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 ( ...
what is gender and procedure short title of subject id 18480?
SELECT demographic.gender, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "18480"
mimicsql_data
CREATE TABLE table_name_15 ( gold VARCHAR, year VARCHAR )
Who won the gold medal in 1998?
SELECT gold FROM table_name_15 WHERE year = 1998
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, ...
whats the sex of patient 027-34579?
SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '027-34579'
eicu
CREATE TABLE stock ( shop_id number, device_id number, quantity number ) CREATE TABLE device ( device_id number, device text, carrier text, package_version text, applications text, software_platform text ) CREATE TABLE shop ( shop_id number, shop_name text, location tex...
What are the names of shops that have more than a single kind of device in stock?
SELECT T2.shop_name FROM stock AS T1 JOIN shop AS T2 ON T1.shop_id = T2.shop_id GROUP BY T1.shop_id HAVING COUNT(*) > 1
spider
CREATE TABLE table_name_72 ( number_ VARCHAR, _name VARCHAR, description VARCHAR )
What's the number & name for the description peckett 0-4-0st?
SELECT number_ & _name FROM table_name_72 WHERE description = "peckett 0-4-0st"
sql_create_context
CREATE TABLE table_63275 ( "Rank" real, "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
What is the total lane for a heat larger than 7?
SELECT COUNT("Lane") FROM table_63275 WHERE "Heat" > '7'
wikisql
CREATE TABLE table_51030 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text, "Time" text )
When the Home Team was Sydney, what did the Away team score?
SELECT "Away team score" FROM table_51030 WHERE "Home team" = 'sydney'
wikisql
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Users ( Id number, Reputation number,...
UpVote ratio per tag for all users.
SELECT A.TagName, A.Answers, B.UpVotes, (1.0 * B.UpVotes / A.Answers) AS "ratio" FROM (SELECT TagName, COUNT(*) AS Answers FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.ParentId = PostTags.PostId GROUP BY TagName) AS A INNER JOIN (SELECT TagName, COUNT(*) AS UpVotes FROM Tags INNER...
sede
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
从2014-03-30到2020-03-19,哪个工号什么名字的医务人员在患者奚信瑞就诊时为其检测罗马指数(绝经前)的
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZ...
css
CREATE TABLE table_18173916_8 ( wednesday VARCHAR, tuesday VARCHAR )
which episode was Transmitted on wednesday if the episode of '319 sucker punch' was transmitted on tuesday?
SELECT COUNT(wednesday) FROM table_18173916_8 WHERE tuesday = "319 Sucker Punch"
sql_create_context
CREATE TABLE table_name_90 ( total VARCHAR, player VARCHAR, matches VARCHAR )
How many total points did Oisin McConville have from his 5 matches?
SELECT COUNT(total) FROM table_name_90 WHERE player = "oisin mcconville" AND matches < 5
sql_create_context
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, ...
Search for answers by a specific user to questions by another user.
SELECT A.Id AS "post_link" FROM Posts AS A JOIN Posts AS Q ON A.ParentId = Q.Id WHERE Q.OwnerUserId = '##AskerId##' AND A.OwnerUserId = '##AnswererId##' AND A.Body LIKE '##SearchText:string##'
sede
CREATE TABLE table_51214 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the largest crowd at vfl park?
SELECT MAX("Crowd") FROM table_51214 WHERE "Venue" = 'vfl park'
wikisql
CREATE TABLE table_21140 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Attendance" real, "Record" text, "Points" real )
What was the final score when the Maple Leafs played the Columbus Blue Jackets?
SELECT "Score" FROM table_21140 WHERE "Opponent" = 'Columbus Blue Jackets'
wikisql
CREATE TABLE table_8530 ( "Heat" real, "Lane" real, "Name" text, "Country" text, "Mark" text )
Which name has a lane less than 8, russia as the country, with a mark of 8.07?
SELECT "Name" FROM table_8530 WHERE "Lane" < '8' AND "Country" = 'russia' AND "Mark" = '8.07'
wikisql
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
在05年11月3日到17年1月12日期间由医院9510699开出的检验报告单中,把不同检测指标名称以及不同检测指标结果定量单位下,检测指标结果定量的平均值列出来
SELECT jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDW, AVG(jyjgzbb.JCZBJGDL) FROM jyjgzbb JOIN jybgb_jyjgzbb JOIN jybgb ON jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JYZBLSH AND jybgb_jyjgzbb.jyjgzbb_id = jyjgzbb.jyjgzbb_id AND jybgb_jyjgzbb.YLJGDM = jybgb.YLJGDM WHERE jybgb.YLJGDM = '9510699' AND jyjgzbb.BGRQ BETWEEN '2005-11-03' AND '2017-01...
css
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE flight_fare ...
SAN FRANCISCO to DENVER tuesday
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 = 'DENVER' AND date_day.day_number = 22 AND date_day.month_number = 3 AND da...
atis
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 the number of patients whose diagnosis short title is ac/chr syst/dia hrt fail and lab test status is abnormal.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Ac/chr syst/dia hrt fail" AND lab.flag = "abnormal"
mimicsql_data
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 stayed in hospital for more than 17 days and were suggested drug route as ou?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "17" AND prescriptions.route = "OU"
mimicsql_data
CREATE TABLE table_name_26 ( date VARCHAR, competition VARCHAR, score VARCHAR )
What date was the Competition of 2014 fifa world cup qualification, with a Score of 1 0?
SELECT date FROM table_name_26 WHERE competition = "2014 fifa world cup qualification" AND score = "1–0"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
tell me the short title of diagnoses and days for which patient with patient id 74463 was hospitalized.
SELECT demographic.days_stay, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "74463"
mimicsql_data
CREATE TABLE table_59707 ( "Opposing Team" text, "Against" real, "Date" text, "Venue" text, "Status" text, "Report" text )
What opposing team has second test as the status?
SELECT "Opposing Team" FROM table_59707 WHERE "Status" = 'second test'
wikisql
CREATE TABLE table_204_129 ( id number, "place" number, "team" text, "titles" number, "runners-up" number, "winning years" text )
who is in first place ?
SELECT "team" FROM table_204_129 WHERE "place" = 1
squall
CREATE TABLE table_47089 ( "Fin. Pos" text, "Car No." text, "Driver" text, "Team" text, "Laps" text, "Time/Retired" text, "Grid" text, "Laps Led" text, "Points" text )
What is the number of laps completed by the car in grid 10?
SELECT "Laps" FROM table_47089 WHERE "Grid" = '10'
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...
列出患者18039764去6690866医院的名称中不包含营养的就诊科室的医疗就诊记录
SELECT * FROM t_kc21 WHERE t_kc21.PERSON_ID = '18039764' AND t_kc21.MED_SER_ORG_NO = '6690866' AND NOT t_kc21.MED_ORG_DEPT_NM LIKE '%营养%'
css
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, ...
编码为37183972735的检验报告单的检验项目代码和名称分别是啥?
SELECT zyjybgb.JYXMDM, zyjybgb.JYXMMC FROM zyjybgb WHERE zyjybgb.BGDH = '37183972735' UNION SELECT mzjybgb.JYXMDM, mzjybgb.JYXMMC FROM mzjybgb WHERE mzjybgb.BGDH = '37183972735'
css
CREATE TABLE table_43252 ( "Tournament" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
What french open tournament happened in 2010 and has a 2004 1r?
SELECT "2010" FROM table_43252 WHERE "2004" = '1r' AND "Tournament" = 'french open'
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
how many patients are admitted urgently and diagnosed with other chronic pain?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "URGENT" AND diagnoses.long_title = "Other chronic pain"
mimicsql_data
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 ...
从08年5月20到21年3月15的这几年里,共有多少患者在医疗机构7227046的转诊门诊看病
SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.YLJGDM = '7227046' AND mzjzjlb.JZKSRQ BETWEEN '2008-05-20' AND '2021-03-15' AND mzjzjlb.ZZBZ > 0
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE fzzmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, ...
自二零一八年十月一日开始,截止到二零二零年八月二十三日,看看病人韦英秀到医院看病的次数是多少
SELECT (SELECT COUNT(*) 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 zzmzjzjlb.JZKSRQ BETWEEN '2018-10-01' AND '2020-08-23' UNION SELECT COUNT(*) FROM p...
css
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, ...
bring the number of patients less than 68 years who were admitted before 2198.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "68" AND demographic.admityear < "2198"
mimicsql_data
CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE varchar(5), EMP_HIREDATE datetime, EMP_DOB datetime ) CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION v...
Give me a histogram for what is the number of professors for different school?, and show from low to high by the Y-axis.
SELECT SCHOOL_CODE, COUNT(*) FROM DEPARTMENT AS T1 JOIN PROFESSOR AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.SCHOOL_CODE ORDER BY COUNT(*)
nvbench
CREATE TABLE table_44795 ( "Date" text, "Venue" text, "Opponents" text, "Score" text, "Comp" text, "Attendance" text )
Name the Date which has a Score of 3-1 and Attendances of 32 590?
SELECT "Date" FROM table_44795 WHERE "Score" = '3-1' AND "Attendance" = '32 590'
wikisql
CREATE TABLE table_46774 ( "Year" real, "Award" text, "Category" text, "Title" text, "Result" text )
What year was Black Swan up for the Gotham Awards?
SELECT COUNT("Year") FROM table_46774 WHERE "Title" = 'black swan' AND "Award" = 'gotham awards'
wikisql
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 lab ( subject_id text, hadm_id text, ...
count the number of patients whose marital status is single and diagnoses short title is myopia?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.short_title = "Myopia"
mimicsql_data
CREATE TABLE table_33698 ( "Episode Number" real, "Title" text, "Podcast Date" text, "Run time" text, "Historical References" text )
What is the historical reference of the episode that aired on October 23, 2005?
SELECT "Historical References" FROM table_33698 WHERE "Podcast Date" = 'october 23, 2005'
wikisql
CREATE TABLE table_train_274 ( "id" int, "gender" string, "serum_bicarbonate" int, "randomization_bg" int, "positive_serum" bool, "diabetic_ketoacidosis" bool, "urinary_ketones" bool, "diastolic_blood_pressure_dbp" int, "heart_rate" int, "body_mass_index_bmi" float, "age" flo...
male or female between the ages of 18 and 80 years discharged after hospital admission from general medicine and surgery services ( non _ intensive care unit setting ) .
SELECT * FROM table_train_274 WHERE (gender = 'male' OR gender = 'female') AND (age >= 18 AND age <= 80)
criteria2sql
CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate re...
Give me the comparison about Weight over the Date_of_Birth by a bar chart, display bar in ascending order.
SELECT Date_of_Birth, Weight FROM people ORDER BY Date_of_Birth
nvbench
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title 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 cost ( row_i...
tell me the intake method for syringe?
SELECT DISTINCT prescriptions.route FROM prescriptions WHERE prescriptions.drug = 'syringe'
mimic_iii
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, ...
从2006年9月3日起,截止到2007年5月5日,7452450这个医院有多少科室涉及的医疗费总额超过5876.89元
SELECT COUNT(*) FROM (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '7452450' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-09-03' AND '2007-05-05' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) > 5876.89 UNION SELECT fgwyjzb....
css
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
Draw a scatterplot of school id vs all_games_percent where school id is on the x-axis and points are colored by All_Neutral
SELECT School_ID, All_Games_Percent FROM basketball_match GROUP BY All_Neutral
nvbench
CREATE TABLE table_203_408 ( id number, "rd." number, "grand prix" text, "date" text, "location" text, "pole position" text, "fastest lap" text, "winning driver" text, "constructor" text, "report" text )
who had the fastest lap in the last grand prix of the season ?
SELECT "fastest lap" FROM table_203_408 ORDER BY "rd." DESC LIMIT 1
squall
CREATE TABLE table_name_13 ( surface VARCHAR, partner VARCHAR )
What surface did Ruxandra Dragomir play on?
SELECT surface FROM table_name_13 WHERE partner = "ruxandra dragomir"
sql_create_context
CREATE TABLE table_name_59 ( rounds VARCHAR, tyre VARCHAR, drivers VARCHAR )
In what rounds was the featured driver Tomonobu Fujii with a Tyre of Y?
SELECT rounds FROM table_name_59 WHERE tyre = "y" AND drivers = "tomonobu fujii"
sql_create_context
CREATE TABLE table_55926 ( "Position" real, "Club" text, "Played" real, "Points" text, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
How many goals for where there when draws are less than 11, points of is 54+16 and goals against are less than 39?
SELECT COUNT("Goals for") FROM table_55926 WHERE "Draws" < '11' AND "Points" = '54+16' AND "Goals against" < '39'
wikisql
CREATE TABLE table_name_88 ( tie_no VARCHAR, home_team VARCHAR )
What is the number of ties when Altrincham is the home team?
SELECT tie_no FROM table_name_88 WHERE home_team = "altrincham"
sql_create_context
CREATE TABLE table_78606 ( "Letter" text, "Pronunciation spelled free" text, "Pronunciation spelled checked" text, "Example spelled free" text, "Example spelled checked" text )
What is Pronunciation Spelled Free, when Pronunciation Spelled Checked is ' '?
SELECT "Pronunciation spelled free" FROM table_78606 WHERE "Pronunciation spelled checked" = 'ɛ'
wikisql
CREATE TABLE table_79867 ( "Title" text, "Pages" text, "Chapters" text, "Audio" text, "US release" text )
Which audio has a Title of a storm of swords?
SELECT "Audio" FROM table_79867 WHERE "Title" = 'a storm of swords'
wikisql
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number,...
Tags that are used together - Three tags edition. This might give some interesting insight in the types of posts on a site..
SELECT * FROM PostTags WHERE TagId = 1
sede
CREATE TABLE table_name_35 ( attendance INTEGER, record VARCHAR )
With a record of 48-51 for the team, the lowest 2005 attendance was listed as how many?
SELECT MIN(attendance) FROM table_name_35 WHERE record = "48-51"
sql_create_context
CREATE TABLE table_name_90 ( season VARCHAR, margin VARCHAR )
What season has 195 runs as a margin?
SELECT season FROM table_name_90 WHERE margin = "195 runs"
sql_create_context
CREATE TABLE table_7352 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
On September 30, 1979, in a week before week 8, what was the result?
SELECT "Result" FROM table_7352 WHERE "Week" < '8' AND "Date" = 'september 30, 1979'
wikisql
CREATE TABLE table_1341453_40 ( party VARCHAR, incumbent VARCHAR )
Incumbent Tim Holden belonged to what party?
SELECT party FROM table_1341453_40 WHERE incumbent = "Tim Holden"
sql_create_context
CREATE TABLE table_25474825_1 ( platform VARCHAR, software VARCHAR )
What is the platform of Geworkbench?
SELECT platform FROM table_25474825_1 WHERE software = "GeWorkbench"
sql_create_context
CREATE TABLE table_34547 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What is the score of New York team before game 61?
SELECT "Score" FROM table_34547 WHERE "Game" < '61' AND "Team" = 'new york'
wikisql
CREATE TABLE table_name_26 ( silver INTEGER, gold VARCHAR, total VARCHAR )
How many silver medals were won when there were 4 gold and 22 in total?
SELECT MIN(silver) FROM table_name_26 WHERE gold = 4 AND total = 22
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
get me the diagnosis short title and procedure short title for the patient shawn green.
SELECT diagnoses.short_title, procedures.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Shawn Green"
mimicsql_data
CREATE TABLE table_name_59 ( points_against VARCHAR, tries_for VARCHAR )
How many points against when 41 is the tries for?
SELECT points_against FROM table_name_59 WHERE tries_for = "41"
sql_create_context
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...
view number of edited posts.
SELECT PostId AS "post_link", PostHistoryTypes.Name FROM PostHistory INNER JOIN PostHistoryTypes ON PostHistoryTypes.Id = PostHistory.PostHistoryTypeId WHERE UserId = @UserId AND PostHistoryTypes.Id > 3
sede
CREATE TABLE table_80330 ( "Member" text, "Party" text, "Electorate" text, "State" text, "Term in office" text )
When was Hon Les Johnson in office?
SELECT "Term in office" FROM table_80330 WHERE "Member" = 'hon les johnson'
wikisql
CREATE TABLE table_44782 ( "Year" real, "Month" text, "Single" text, "Album" text, "Record label" text )
What month before 1973 is listed for the album united we stand?
SELECT "Month" FROM table_44782 WHERE "Year" < '1973' AND "Album" = 'united we stand'
wikisql
CREATE TABLE table_47404 ( "Nat." text, "Name" text, "Moving to" text, "Type" text, "Transfer window" text, "Transfer fee" text )
Which Transfer window has a Name of tofas?
SELECT "Transfer window" FROM table_47404 WHERE "Name" = 'tofas'
wikisql
CREATE TABLE table_name_2 ( score VARCHAR, date VARCHAR )
What was the score on november 21?
SELECT score FROM table_name_2 WHERE date = "november 21"
sql_create_context
CREATE TABLE table_12078626_1 ( date_of_completion VARCHAR, deadline_for_completion VARCHAR )
what's the date of completion where deadline for completion is september 30, 2007
SELECT date_of_completion FROM table_12078626_1 WHERE deadline_for_completion = "September 30, 2007"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
let me know both the location of admission and discharge of patient troy friedman.
SELECT demographic.admission_location, demographic.discharge_location FROM demographic WHERE demographic.name = "Troy Friedman"
mimicsql_data
CREATE TABLE table_name_66 ( age__years VARCHAR, _days_ VARCHAR, begin_date VARCHAR )
What was the age of the member of the United States House of Representatives that began their term on May 7, 1886?
SELECT age__years, _days_ FROM table_name_66 WHERE begin_date = "may 7, 1886"
sql_create_context
CREATE TABLE table_2596811_12 ( commander VARCHAR, killed VARCHAR )
What is the number of commanders that had 0 off 63 men killed?
SELECT COUNT(commander) FROM table_2596811_12 WHERE killed = "0 off 63 men"
sql_create_context
CREATE TABLE Documents ( document_id INTEGER, document_type_code VARCHAR(10), grant_id INTEGER, sent_date DATETIME, response_received_date DATETIME, other_details VARCHAR(255) ) CREATE TABLE Organisation_Types ( organisation_type VARCHAR(10), organisation_type_description VARCHAR(255) )...
A bar chart for listing the number of the description of the outcomes for all projects, could you sort in ascending by the y axis?
SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description ORDER BY COUNT(outcome_description)
nvbench
CREATE TABLE table_11570261_1 ( margin VARCHAR, runner_s__up VARCHAR )
what's the margin where runner(s)-up is phil mickelson
SELECT margin FROM table_11570261_1 WHERE runner_s__up = "Phil Mickelson"
sql_create_context
CREATE TABLE table_name_46 ( issue_price VARCHAR, mintage VARCHAR, artist VARCHAR, year VARCHAR )
What is the issue price of a Year 2000 coin by artist John Mardon of the Included in Steam Buggy mintage.
SELECT issue_price FROM table_name_46 WHERE artist = "john mardon" AND year = 2000 AND mintage = "included in steam buggy"
sql_create_context
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
Show me the average of weight by sex in a histogram, and display in desc by the Y.
SELECT Sex, AVG(Weight) FROM people GROUP BY Sex ORDER BY AVG(Weight) DESC
nvbench
CREATE TABLE table_2409041_4 ( title VARCHAR, production_code VARCHAR )
Name the title for 446913
SELECT title FROM table_2409041_4 WHERE production_code = 446913
sql_create_context
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE patients ( row_id number, subject_id num...
what were the three most frequent drugs prescribed to female patients 40s during the same month after they had been diagnosed with anemia nos?
SELECT t3.drug FROM (SELECT t2.drug, 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 = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
mimic_iii