context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_50842 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
Who is the home team with tie number 9?
SELECT "Home team" FROM table_50842 WHERE "Tie no" = '9'
wikisql
CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length in...
thanks and what 's the last flight back from WASHINGTON to BOSTON
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 = 'WASHINGTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BO...
atis
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insuranc...
how much patient 76372 had to pay for their stay in hospital on this hospital encounter?
SELECT SUM(cost.cost) FROM cost WHERE cost.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 76372 AND admissions.dischtime IS NULL)
mimic_iii
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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 te...
患者41456468801的检验报告单与其相对应的就诊流水号是哪一个
SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGDH = '41456468801'
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 procedures ( ...
how many english speaking patients had the procedure titled closed biopsy of skin and subcutaneous tissue?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.language = "ENGL" AND procedures.long_title = "Closed biopsy of skin and subcutaneous tissue"
mimicsql_data
CREATE TABLE table_name_28 ( draws VARCHAR, against VARCHAR, wins VARCHAR )
When against is 797 and wins is more than 10, what is the sum of draws?
SELECT COUNT(draws) FROM table_name_28 WHERE against = 797 AND wins > 10
sql_create_context
CREATE TABLE table_25355392_2 ( march_27_29 VARCHAR, november_3 VARCHAR )
what is march 27-29 when november 3 is 133?
SELECT march_27_29 FROM table_25355392_2 WHERE november_3 = "133"
sql_create_context
CREATE TABLE table_3031 ( "Position" text, "Name" text, "Nationality" text, "Event 1 Medley" text, "Event 2 Truck Pull" text, "Event 3 Squat Lift" text, "Event 4 Carwalk" text, "Event 5 Dumbbell Press" text, "Event 6 Atlas Stones" text )
What was the result in the event 1 medley for the man with a 4 (6 in 31.85s) in the event 3 squat lift?
SELECT "Event 1 Medley" FROM table_3031 WHERE "Event 3 Squat Lift" = '4 (6 in 31.85s)'
wikisql
CREATE TABLE table_name_18 ( rank INTEGER, bronze VARCHAR, total VARCHAR, gold VARCHAR )
What is the rank with a higher than 2 total, 21 gold and more than 12 bronze?
SELECT AVG(rank) FROM table_name_18 WHERE total > 2 AND gold = 21 AND bronze > 12
sql_create_context
CREATE TABLE roles ( role_code text, role_description text ) CREATE TABLE document_sections_images ( section_id number, image_id number ) CREATE TABLE functional_areas ( functional_area_code text, parent_functional_area_code text, functional_area_description text ) CREATE TABLE documents ...
Find the total access count of all documents in the most popular document type.
SELECT SUM(access_count) FROM documents GROUP BY document_type_code ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_203_173 ( id number, "year(s)" text, "serial name" text, "role" text, "co-star" text, "note(s)" text, "channel" text )
did he act longer on sinndoor tere naam ka or saat phere ?
SELECT "serial name" FROM table_203_173 WHERE "serial name" IN ('sinndoor tere naam ka', 'saat phere') ORDER BY "year(s)" - "year(s)" DESC LIMIT 1
squall
CREATE TABLE table_29119 ( "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 Pct." real )
When sweden is the country who is the skip?
SELECT "Skip" FROM table_29119 WHERE "Country" = 'Sweden'
wikisql
CREATE TABLE table_79379 ( "Event" text, "Performance" text, "Nation" text, "Place" text, "Date" text )
Which nation ran a time of 9.69 seconds?
SELECT "Nation" FROM table_79379 WHERE "Performance" = '9.69'
wikisql
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course ( course_id int, name varchar, dep...
Are there any recommended courses to take before taking RCSSCI 345 ?
SELECT DISTINCT advisory_requirement FROM course WHERE department = 'RCSSCI' AND number = 345
advising
CREATE TABLE table_68459 ( "Outcome" text, "Date" text, "Surface" text, "Opponent" text, "Score" text )
What was the surface of the match against bethanie mattek-sands?
SELECT "Surface" FROM table_68459 WHERE "Opponent" = 'bethanie mattek-sands'
wikisql
CREATE TABLE table_name_52 ( rated_power VARCHAR, finish_construction VARCHAR )
What is the rated power for the reactor that ended construction on May 10, 1978?
SELECT rated_power FROM table_name_52 WHERE finish_construction = "may 10, 1978"
sql_create_context
CREATE TABLE table_16201038_4 ( missouri_vs VARCHAR, at_neutral_site VARCHAR )
Against which team does Missouri Tigers have a record of mu, 2-1 at a neutral site?
SELECT missouri_vs FROM table_16201038_4 WHERE at_neutral_site = "MU, 2-1"
sql_create_context
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CRE...
Mean Score Per User.
SELECT u.Id AS uid, AVG(q.Score) AS mean_score FROM Users AS u INNER JOIN Posts AS a ON a.OwnerUserId = u.Id INNER JOIN Posts AS q ON a.ParentId = q.Id GROUP BY u.Id ORDER BY AVG(q.Score) DESC
sede
CREATE TABLE table_name_20 ( team__number2 VARCHAR )
What is the 2nd leg of dinamo minsk team #2?
SELECT 2 AS nd_leg FROM table_name_20 WHERE team__number2 = "dinamo minsk"
sql_create_context
CREATE TABLE table_24701 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Prod. code" text )
What are all the title directed by reginald hudlin
SELECT COUNT("Title") FROM table_24701 WHERE "Directed by" = 'Reginald Hudlin'
wikisql
CREATE TABLE table_name_74 ( name VARCHAR, league_cup_apps VARCHAR, league_cup_goals VARCHAR, total_goals VARCHAR )
Who is the player that has scored more than 0 league cup goals, but has than 13 total goals, and 4 league cup appearances total?
SELECT name FROM table_name_74 WHERE league_cup_goals > 0 AND total_goals < 13 AND league_cup_apps = "4"
sql_create_context
CREATE TABLE table_name_12 ( campus VARCHAR, year_opened VARCHAR )
What campus opened in 1970?
SELECT campus FROM table_name_12 WHERE year_opened = "1970"
sql_create_context
CREATE TABLE table_203_165 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
did the philippines or kazakhstan have a higher number of total medals ?
SELECT "nation" FROM table_203_165 WHERE "nation" IN ('philippines', 'kazakhstan') ORDER BY "total" DESC LIMIT 1
squall
CREATE TABLE table_204_39 ( id number, "number" number, "symbol" text, "name" text, "21st" number, "22nd" number, "23rd" number, "24th" number, "25th" number, "26th" number, "27th" number, "28th" number, "29th" number, "30th" number )
what symbol comes before symbol co ?
SELECT "symbol" FROM table_204_39 WHERE id = (SELECT id FROM table_204_39 WHERE "symbol" = 'co') - 1
squall
CREATE TABLE guests ( guest_id number, gender_code text, guest_first_name text, guest_last_name text, date_of_birth time ) CREATE TABLE view_unit_status ( apt_id number, apt_booking_id number, status_date time, available_yn others ) CREATE TABLE apartment_bookings ( apt_booking...
Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.
SELECT T1.building_address FROM apartment_buildings AS T1 JOIN apartments AS T2 ON T1.building_id = T2.building_id WHERE T2.bathroom_count > 2
spider
CREATE TABLE table_name_3 ( total__kg_ INTEGER, snatch VARCHAR, bodyweight VARCHAR )
What is the total (kg) when the snatch was 84, and bodyweight was less than 57.35?
SELECT AVG(total__kg_) FROM table_name_3 WHERE snatch = 84 AND bodyweight < 57.35
sql_create_context
CREATE TABLE table_204_341 ( id number, "name in english" text, "name in turkish" text, "area (km2)" text, "depth" text, "location (districts and/or provinces)" text )
how many lakes have areas more then 300km
SELECT COUNT("name in english") FROM table_204_341 WHERE "area (km2)" > 300
squall
CREATE TABLE table_4727 ( "Network" text, "Origin of Programming" text, "Language" text, "Genre" text, "Service" text )
What Genre has Hindi as the Language and Star Gold as the Network?
SELECT "Genre" FROM table_4727 WHERE "Language" = 'hindi' AND "Network" = 'star gold'
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...
患者36476303在15年4月30日到16年8月20日内买了多少次西药?
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '36476303' AND t_kc22.STA_DATE BETWEEN '2015-04-30' AND '2016-08-20' AND t_kc22.MED_INV_ITEM_TYPE = '西药费'
css
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom t...
how many times patient 6580 visited the intensive care unit since 2104?
SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 6580) AND STRFTIME('%y', icustays.intime) >= '2104'
mimic_iii
CREATE TABLE editor ( Editor_ID int, Name text, Age real ) CREATE TABLE journal ( Journal_ID int, Date text, Theme text, Sales int ) CREATE TABLE journal_committee ( Editor_ID int, Journal_ID int, Work_Type text )
Just compare the number of journal committees of each editor using a histogram.
SELECT Name, COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Editor_ID
nvbench
CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperature int, precipitation real, win...
What is the average high temperature for each day of week Plot them as bar chart, display in ascending by the X.
SELECT day_of_week, AVG(high_temperature) FROM weekly_weather GROUP BY day_of_week ORDER BY day_of_week
nvbench
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, ...
calculate the number of drugs prescribed to patient 66015 in 09/this year.
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 66015) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', prescriptions.startdate) = '09'
mimic_iii
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...
医疗就诊35250331641花费的医疗费总费用
SELECT gwyjzb.MED_AMOUT FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '35250331641' UNION SELECT fgwyjzb.MED_AMOUT FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '35250331641'
css
CREATE TABLE table_name_93 ( round INTEGER, pick VARCHAR, overall VARCHAR, name VARCHAR )
What is the sum of the rounds where the overall pick was more than 295 and the pick was smaller than 10 and the player was rich dobbert?
SELECT SUM(round) FROM table_name_93 WHERE overall > 295 AND name = "rich dobbert" AND pick < 10
sql_create_context
CREATE TABLE Product_Categories ( production_type_code VARCHAR(15), product_type_description VARCHAR(80), vat_rating DECIMAL(19,4) ) CREATE TABLE Financial_Transactions ( transaction_id INTEGER, account_id INTEGER, invoice_number INTEGER, transaction_type VARCHAR(15), transaction_date D...
Show order ids and the total quantity in each order. Visualize by scatter chart.
SELECT order_id, SUM(product_quantity) FROM Order_Items GROUP BY order_id
nvbench
CREATE TABLE table_name_95 ( gender VARCHAR, decile VARCHAR, area VARCHAR )
What gender is the team that has a decile of 5 and in the Dalefield area?
SELECT gender FROM table_name_95 WHERE decile = 5 AND area = "dalefield"
sql_create_context
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE airline ( airline_code varchar, airline_name text, ...
SAN FRANCISCO to BOSTON please with a stopover in DENVER
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 = 'BOSTON' AND CITY_2.cit...
atis
CREATE TABLE table_name_10 ( year INTEGER, publication VARCHAR )
What is the publication the observer music monthly highest year?
SELECT MAX(year) FROM table_name_10 WHERE publication = "the observer music monthly"
sql_create_context
CREATE TABLE table_name_25 ( place VARCHAR, country VARCHAR, player VARCHAR )
What place is United States player Corey Pavin in?
SELECT place FROM table_name_25 WHERE country = "united states" AND player = "corey pavin"
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
give me the number of patients whose marital status is divorced and procedure short title is closed biopsy of tongue?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "DIVORCED" AND procedures.short_title = "Closed biopsy of tongue"
mimicsql_data
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE food_service ( mea...
find me all the round trip flights from BURBANK to MILWAUKEE stopping in ST. LOUIS
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, flight, flight_stop AS FLIGHT_STOP_0, flight_stop AS FLIGHT_STOP_1...
atis
CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT )
Show minimal age from each job, could you order x-axis from low to high order?
SELECT job, MIN(age) FROM Person GROUP BY job ORDER BY job
nvbench
CREATE TABLE table_6590 ( "Release date" text, "Length" text, "Director(s)" text, "Character name" text, "Character type" text, "Leading lady" text )
What was the character name for the film with a release date of July 29, 1938?
SELECT "Character name" FROM table_6590 WHERE "Release date" = 'july 29, 1938'
wikisql
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Comments ( Id number, PostId number, Score num...
Answers by me that contain code.. This query produces a list of your answers where the answer contains one or more 'code ' blocks.
SELECT Id AS "post_link", Score, ViewCount FROM Posts WHERE OwnerUserId = @UserID ORDER BY ViewCount
sede
CREATE TABLE table_name_41 ( number INTEGER, name VARCHAR )
Which Number has a Name of hill, lucius t.?
SELECT MAX(number) FROM table_name_41 WHERE name = "hill, lucius t."
sql_create_context
CREATE TABLE table_36012 ( "Name" text, "Birth date" text, "Age as of 1 February 2014" text, "Country of birth" text, "Place of residence" text )
What is the Age of dorothy Peel as of 1 February 2014 ?
SELECT "Age as of 1 February 2014" FROM table_36012 WHERE "Name" = 'dorothy peel'
wikisql
CREATE TABLE table_name_78 ( song_title VARCHAR, chart_peak VARCHAR, track VARCHAR )
What was the title of the song that peaked the charts at #1 with track 20?
SELECT song_title FROM table_name_78 WHERE chart_peak = "#1" AND track = 20
sql_create_context
CREATE TABLE table_27561503_2 ( results VARCHAR, gt_20_winning_team VARCHAR )
Name results for herb wetanson
SELECT results FROM table_27561503_2 WHERE gt_20_winning_team = "Herb Wetanson"
sql_create_context
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREA...
Count the number of answers of ELL in a given year.
SELECT COUNT(AnswerCount) AS "total_answers" FROM Posts WHERE YEAR(CreationDate) = @GiveYear
sede
CREATE TABLE table_name_35 ( partner VARCHAR, date VARCHAR )
Which Partner is on 22 april 2002?
SELECT partner FROM table_name_35 WHERE date = "22 april 2002"
sql_create_context
CREATE TABLE county_public_safety ( Police_force VARCHAR, LOCATION VARCHAR )
List the distinct police forces of counties whose location is not on east side.
SELECT DISTINCT Police_force FROM county_public_safety WHERE LOCATION <> "East"
sql_create_context
CREATE TABLE table_name_44 ( season INTEGER, podiums VARCHAR, races VARCHAR )
Which Season has Podiums of 0, and Races of 16?
SELECT MAX(season) FROM table_name_44 WHERE podiums = "0" AND races = "16"
sql_create_context
CREATE TABLE table_20884163_2 ( circuit VARCHAR, race_title VARCHAR )
What circuit features the placemakers v8 supercars race?
SELECT circuit FROM table_20884163_2 WHERE race_title = "PlaceMakers V8 Supercars"
sql_create_context
CREATE TABLE Teachers ( teacher_id INTEGER, address_id INTEGER, first_name VARCHAR(80), middle_name VARCHAR(80), last_name VARCHAR(80), gender VARCHAR(1), cell_mobile_number VARCHAR(40), email_address VARCHAR(40), other_details VARCHAR(255) ) CREATE TABLE Behavior_Incident ( inc...
I want to see trend of the number of date of notes by date of notes, order X in descending order.
SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes ORDER BY date_of_notes DESC
nvbench
CREATE TABLE certificate ( eid number, aid number ) CREATE TABLE aircraft ( aid number, name text, distance number ) CREATE TABLE flight ( flno number, origin text, destination text, distance number, departure_date time, arrival_date time, price number, aid number )...
What are the origins of all flights that are headed to Honolulu?
SELECT origin FROM flight WHERE destination = "Honolulu"
spider
CREATE TABLE table_74035 ( "Player" text, "Position" text, "Starting No.#" real, "D.O.B" text, "Club" text, "Height" text, "Weight" text, "Games" real )
How many games were played where the height of the player is 1.92m?
SELECT COUNT("Games") FROM table_74035 WHERE "Height" = '1.92m'
wikisql
CREATE TABLE table_name_44 ( tonnage__grt_ INTEGER, nationality VARCHAR, name VARCHAR )
Which Tonnage (GRT) has a Nationality of united kingdom, and a Name of king gruffydd?
SELECT MIN(tonnage__grt_) FROM table_name_44 WHERE nationality = "united kingdom" AND name = "king gruffydd"
sql_create_context
CREATE TABLE table_20696 ( "Team" text, "ACC Regular Season" text, "ACC %" text, "ACC Home" text, "ACC Road" text, "All Games" text, "All Games %" text, "All Home" text, "All Road" text, "All Neutral" text )
What is the acc percentage when all games percentage is .484?
SELECT "ACC %" FROM table_20696 WHERE "All Games %" = '.484'
wikisql
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...
名叫沈清涵的病患的检验报告单的报告日期在10年11月18日之后的是在哪些住院就诊的?列出流水号
SELECT zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND ...
css
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...
哪位患者在门诊就诊中开出编码为04680290185检验报告单?
SELECT person_info.XM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN mzjzjlb_jybgb 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 = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND mz...
css
CREATE TABLE table_66616 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What is the total attendance before week 1?
SELECT SUM("Attendance") FROM table_66616 WHERE "Week" < '1'
wikisql
CREATE TABLE Customer_Policies ( customer_id VARCHAR ) CREATE TABLE Customers ( customer_details VARCHAR, customer_id VARCHAR )
List the details of the customers who do not have any policies.
SELECT customer_details FROM Customers EXCEPT SELECT T1.customer_details FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.customer_id = T2.customer_id
sql_create_context
CREATE TABLE people ( people_id number, name text, height number, weight number, home town text ) CREATE TABLE perpetrator ( perpetrator_id number, people_id number, date text, year number, location text, country text, killed number, injured number )
What is the country that has the most perpetrators?
SELECT country, COUNT(*) FROM perpetrator GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_name_92 ( genre VARCHAR, year VARCHAR, name VARCHAR )
Which Genre has a Year before 2013, and a Name of kikumana?
SELECT genre FROM table_name_92 WHERE year < 2013 AND name = "kikumana"
sql_create_context
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 airline ( ...
what airline is a s AS in sam
SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'AS'
atis
CREATE TABLE table_1505809_2 ( blank_ends INTEGER, stolen_ends VARCHAR )
What is the lowest value of Blank Ends when Stolen Ends is 7.
SELECT MIN(blank_ends) FROM table_1505809_2 WHERE stolen_ends = 7
sql_create_context
CREATE TABLE table_4562 ( "Year" real, "Network" text, "Play-by-play" text, "Color commentator(s)" text, "Sideline reporter(s)" text )
What network is working in 2014?
SELECT "Network" FROM table_4562 WHERE "Year" = '2014'
wikisql
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, h...
what is the last diagnosed diagnosis of patient 030-21071 on the first hospital encounter?
SELECT diagnosis.diagnosisname FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-21071' AND NOT patient.hospitaldischargetime IS NULL ORDER BY...
eicu
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credi...
Which upper-level courses are 1 credits ?
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 1 AND program_course.category LIKE 'ULCS'
advising
CREATE TABLE table_59183 ( "Elimination" text, "Wrestler" text, "Eliminated by" text, "Elimination Move" text, "Time" text )
What time is listed against the Wrestler Jimmy Rave?
SELECT "Time" FROM table_59183 WHERE "Wrestler" = 'jimmy rave'
wikisql
CREATE TABLE table_52403 ( "Entrant" text, "Constructor" text, "Chassis" text, "Engine" text, "Tyre" text, "Driver" text, "Rounds" text )
What was the entrant in round 16 were Ferrari was the constructor?
SELECT "Entrant" FROM table_52403 WHERE "Rounds" = '16' AND "Constructor" = 'ferrari'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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,...
在2021年10月7日之前这个病号87778893一共有哪些门诊就诊记录对应的检验报告单?就诊时门诊诊断的流水号是多少?
SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzj...
css
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 prescriptions ( subject_id text, hadm_id...
Tell me the number of patients admitted before the year 2110 who had a joint fluid lab test.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2110" AND lab.fluid = "Joint Fluid"
mimicsql_data
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 jyjgzbb ( BGDH text, BGRQ tim...
2007年10月4日到2010年2月18日,查一下563科室的门诊就诊数量的详细情况
SELECT COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.JZKSBM = '563' AND zzmzjzjlb.JZKSRQ BETWEEN '2007-10-04' AND '2010-02-18' UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZKSBM = '563' AND fzzmzjzjlb.JZKSRQ BETWEEN '2007-10-04' AND '2010-02-18'
css
CREATE TABLE table_name_35 ( score_in_the_final VARCHAR, date VARCHAR, opponent_in_the_final VARCHAR )
What was the Score in the Final against Opponent in the Final Manuel Orantes, prior to 1978?
SELECT score_in_the_final FROM table_name_35 WHERE date < 1978 AND opponent_in_the_final = "manuel orantes"
sql_create_context
CREATE TABLE table_name_62 ( time VARCHAR, location VARCHAR )
What is the time for Moscow, Russia?
SELECT time FROM table_name_62 WHERE location = "moscow, russia"
sql_create_context
CREATE TABLE table_28211103_1 ( attendance VARCHAR, st_kilda_score VARCHAR )
What is the attendance when the st kilda score is 13.10.88?
SELECT attendance FROM table_28211103_1 WHERE st_kilda_score = "13.10.88"
sql_create_context
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, ...
自15年7月27日起,截止到16年11月4日,医疗机构6851618的特需门诊有多少就诊记录
SELECT COUNT(*) FROM zzmzjzjlb WHERE zzmzjzjlb.YLJGDM = '6851618' AND zzmzjzjlb.JZKSRQ BETWEEN '2015-07-27' AND '2016-11-04' AND zzmzjzjlb.TXBZ > 0 UNION SELECT COUNT(*) FROM fzzmzjzjlb WHERE fzzmzjzjlb.YLJGDM = '6851618' AND fzzmzjzjlb.JZKSRQ BETWEEN '2015-07-27' AND '2016-11-04' AND fzzmzjzjlb.TXBZ > 0
css
CREATE TABLE table_204_729 ( id number, "year" text, "show" text, "role" text, "channel" text, "notes" text )
what is the number of anchor roles this actor has had ?
SELECT COUNT(*) FROM table_204_729 WHERE "role" = 'anchor'
squall
CREATE TABLE AssignedTo ( Scientist int, Project char(4) ) CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int ) CREATE TABLE Scientists ( SSN int, Name Char(30) )
What are the names of projects that require more than 300 hours, and how many scientists are assigned to each, list by the x-axis in descending please.
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project WHERE T1.Hours > 300 GROUP BY T1.Name ORDER BY Name DESC
nvbench
CREATE TABLE manager ( Manager_ID int, Name text, Country text, Working_year_starts text, Age int, Level int ) CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, Arrival text, Railway_ID int ) CREATE TABLE railway_manage ( Railway_ID int, M...
Visualize a bar chart, the x-axis is the arrival time, and the y-axis is the total number of trains in each arrival time, and show Y in ascending order.
SELECT Arrival, COUNT(Arrival) FROM train GROUP BY Arrival ORDER BY COUNT(Arrival)
nvbench
CREATE TABLE table_15446 ( "Year" text, "Competition" text, "Opponent" text, "Score" text, "Venue" text )
Name the score for hawthorn opponent
SELECT "Score" FROM table_15446 WHERE "Opponent" = 'hawthorn'
wikisql
CREATE TABLE person_info_hz_info ( RYBH text, KH number, KLX number, YLJGDM number ) 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,...
病人韦嘉泽有多少次医院是在03年3月16日到12年1月12日内去的?
SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND p...
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, ...
患者褚博瀚腰部的各项指标检验结果是怎么样的?
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_203_583 ( id number, "title" text, "release" number, "6th gen" text, "handheld" text, "note" text )
how many games were released for the psp ?
SELECT COUNT("title") FROM table_203_583 WHERE "handheld" = 'psp'
squall
CREATE TABLE table_38622 ( "Nation" text, "T Score" real, "A Score" real, "E Score" real, "Total" real )
When the A Score was larger than 5.933 with a total of 19.833, what nation was this?
SELECT "Nation" FROM table_38622 WHERE "A Score" > '5.933' AND "Total" = '19.833'
wikisql
CREATE TABLE table_64597 ( "Name" text, "Games" text, "W-League" text, "Finals" text, "Goals" real, "Years" text )
How many games does the player with 1 (0) finals and a w-league of 28 (1) have?
SELECT "Games" FROM table_64597 WHERE "Finals" = '1 (0)' AND "W-League" = '28 (1)'
wikisql
CREATE TABLE table_name_46 ( venue VARCHAR, opposing_teams VARCHAR, date VARCHAR )
What is Venue, when Opposing Teams is 'South Africa', and when Date is '17/06/2000'?
SELECT venue FROM table_name_46 WHERE opposing_teams = "south africa" AND date = "17/06/2000"
sql_create_context
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...
患者俞安安为疾病V29.354,门诊诊断的神经元特异性烯醇化酶的结果定量是什么?单位是什么?
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW 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_MZ...
css
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication (...
how much does the cost of t3 are?
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 't3')
eicu
CREATE TABLE table_10682862_68 ( players INTEGER )
What's the smallest number of players?
SELECT MIN(players) FROM table_10682862_68
sql_create_context
CREATE TABLE table_20360535_2 ( television_order VARCHAR, original_air_date VARCHAR, directed_by VARCHAR, written_by VARCHAR )
what is the television order of the episode directed by ben jones, written by j. m. dematteis and originally aired on february6,2009
SELECT television_order FROM table_20360535_2 WHERE directed_by = "Ben Jones" AND written_by = "J. M. DeMatteis" AND original_air_date = "February6,2009"
sql_create_context
CREATE TABLE table_31432 ( "Rank" real, "Country/Territory" text, "Manhunt International" real, "1st runner-up" real, "2nd runner-up" real, "3rd runner-up" real, "4th runner-up" real, "Semifinalists" real, "Total" real )
What is the minimum manhunt beauty contest?
SELECT MIN("Manhunt International") FROM table_31432
wikisql
CREATE TABLE table_name_21 ( purse VARCHAR, trainer VARCHAR )
What was the purse when the trainer was Aidan O'Brien?
SELECT purse FROM table_name_21 WHERE trainer = "aidan o'brien"
sql_create_context
CREATE TABLE table_31963 ( "Calls" text, "Frequency" text, "Branding" text, "Format" text, "Timeslot" text, "Group owner" text )
Tell me the timeslot of calls of wrko
SELECT "Timeslot" FROM table_31963 WHERE "Calls" = 'wrko'
wikisql
CREATE TABLE table_name_5 ( date VARCHAR, record VARCHAR )
On which date were the 2003 Toronto Blue Jays 54-55?
SELECT date FROM table_name_5 WHERE record = "54-55"
sql_create_context
CREATE TABLE table_50855 ( "Internet Plan" text, "Downstream" text, "Upstream" text, "Bandwidth Included" text, "Price" text )
What is Internet Plan, when Price is '22 EUR'?
SELECT "Internet Plan" FROM table_50855 WHERE "Price" = '22 eur'
wikisql
CREATE TABLE table_name_56 ( competition VARCHAR, season VARCHAR )
Which competition has a Season of 2010/11?
SELECT competition FROM table_name_56 WHERE season = "2010/11"
sql_create_context
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) ...
what were the five most frequently ordered specimen tests for patients who were previously diagnosed with adv eff antibiotics nec since 2 years ago in the same hospital encounter?
SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnos...
mimic_iii