context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_63129 ( "County" text, "Per capita income" text, "Median household income" text, "Median family income" text, "Population" real, "Number of households" real )
What is the median family income when the per capita is $24,114?
SELECT "Median family income" FROM table_63129 WHERE "Per capita income" = '$24,114'
wikisql
CREATE TABLE zzmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
患者对应的门诊就诊中开出的检验报告单80578545144上的姓名是什么?
SELECT person_info.XM FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb 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 AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE jybgb.BGDH = '8...
css
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 employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL v...
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, return a line chart about the change of commission_pct over hire_date .
SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
nvbench
CREATE TABLE table_name_49 ( conv VARCHAR, pens VARCHAR, player VARCHAR )
How many conversions did Severo Koroduadua Waqanibau have when he has 0 pens?
SELECT conv FROM table_name_49 WHERE pens = "0" AND player = "severo koroduadua waqanibau"
sql_create_context
CREATE TABLE table_42384 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
Who is the opponent for the game with 37,845 people in attendance?
SELECT "Opponent" FROM table_42384 WHERE "Attendance" = '37,845'
wikisql
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) 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_...
For all employees who have the letters D or S in their first name, give me the trend about commission_pct over hire_date , and I want to rank x axis from low to high order.
SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE
nvbench
CREATE TABLE table_32524 ( "Year" real, "Name" text, "Date" text, "Stages" text, "Distance" text, "Winner" text, "Time" text )
What tour was cancelled?
SELECT "Name" FROM table_32524 WHERE "Date" = 'cancelled'
wikisql
CREATE TABLE roller_coaster ( Roller_Coaster_ID int, Name text, Park text, Country_ID int, Length real, Height real, Speed text, Opened text, Status text ) CREATE TABLE country ( Country_ID int, Name text, Population int, Area int, Languages text )
Show the names of countries and the average speed of roller coasters from each country Plot them as bar chart, sort from high to low by the Name please.
SELECT T1.Name, AVG(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name ORDER BY T1.Name DESC
nvbench
CREATE TABLE table_22383603_1 ( start__reg_season_ VARCHAR, top_record VARCHAR )
When did the season start that ended with the top record of Lindenwood (20 0 0)?
SELECT start__reg_season_ FROM table_22383603_1 WHERE top_record = "Lindenwood (20–0–0)"
sql_create_context
CREATE TABLE table_203_742 ( id number, "rnd" number, "date" text, "race name" text, "circuit" text, "city/location" text, "pole position" text, "fastest lap" text, "winning driver" text, "winning team" text, "report" text )
the race on march 5 took place in miami , florida . where did the next race take place ?
SELECT "city/location" FROM table_203_742 WHERE "date" > (SELECT "date" FROM table_203_742 WHERE "date" = 'march 5') ORDER BY "date" LIMIT 1
squall
CREATE TABLE table_80223 ( "Year" real, "Alabama" text, "Arkansas" text, "Auburn" text, "Ole Miss" text, "Mississippi St." text )
Who is the Arkansas player associated with Ken Stabler?
SELECT "Arkansas" FROM table_80223 WHERE "Alabama" = 'ken stabler'
wikisql
CREATE TABLE table_46635 ( "Model Number" text, "Frequency" text, "L2-Cache" text, "Front Side Bus" text, "Multiplier" text, "Voltage" text, "Socket" text )
What is the Front Side Bus for Model Number c3 850?
SELECT "Front Side Bus" FROM table_46635 WHERE "Model Number" = 'c3 850'
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 ) ...
count the number of patients whose primary disease is sdh and lab test fluid is pleural?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "SDH" AND lab.fluid = "Pleural"
mimicsql_data
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_fro...
what airlines fly between BOSTON and SAN FRANCISCO
SELECT DISTINCT airline.airline_code FROM airline, 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_na...
atis
CREATE TABLE asset_parts ( asset_id number, part_id number ) CREATE TABLE maintenance_engineers ( engineer_id number, company_id number, first_name text, last_name text, other_details text ) CREATE TABLE fault_log_parts ( fault_log_entry_id number, part_fault_id number, fault_s...
How many engineer visits are required at most for a single fault log? List the number and the log entry id.
SELECT COUNT(*), T1.fault_log_entry_id FROM fault_log AS T1 JOIN engineer_visits AS T2 ON T1.fault_log_entry_id = T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_name_75 ( date_of_vacancy VARCHAR, team VARCHAR )
What is the vacancy date of Dundee?
SELECT date_of_vacancy FROM table_name_75 WHERE team = "dundee"
sql_create_context
CREATE TABLE Students ( student_id INTEGER, address_id INTEGER, first_name VARCHAR(80), middle_name VARCHAR(40), last_name VARCHAR(40), cell_mobile_number VARCHAR(40), email_address VARCHAR(40), date_first_rental DATETIME, date_left_university DATETIME, other_student_details VARC...
I want to see trend of the number of date of notes by date of notes, and show x-axis from low to high order.
SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes ORDER BY date_of_notes
nvbench
CREATE TABLE table_60886 ( "Team" text, "Club home city" text, "2006\u201307 Season" text, "Stadium" text, "Stadium capacity" text )
What is 2006-07 Season, when Team is 'KF Fush Kosova'?
SELECT "2006\u201307 Season" FROM table_60886 WHERE "Team" = 'kf fushë kosova'
wikisql
CREATE TABLE table_72114 ( "Rnd" text, "Race Name" text, "Circuit" text, "City/Location" text, "Date" text, "Pole position" text, "Winning driver" text, "Winning team" text, "Report" text )
What rnds were there for the phoenix international raceway?
SELECT "Rnd" FROM table_72114 WHERE "Circuit" = 'Phoenix International Raceway'
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 PendingFlags ( Id number, FlagTypeId ...
Moderator History (SO en espa ol).
SELECT * FROM Users WHERE AboutMe LIKE '%Valued Associate%' OR AboutMe LIKE '%Stack Exchange%' OR WebsiteUrl LIKE '%//stackexchange.com' OR WebsiteUrl LIKE '%//stackexchange.com/'
sede
CREATE TABLE table_76747 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text )
Which college has a nose tackle position?
SELECT "College" FROM table_76747 WHERE "Position" = 'nose tackle'
wikisql
CREATE TABLE gyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
这个名叫窦清润的团伙成员最常去的医生排序是什么样的?
SELECT qtb.OUT_DIAG_DOC_CD, qtb.OUT_DIAG_DOC_NM FROM qtb WHERE qtb.PERSON_NM = '窦清润' GROUP BY qtb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT gyb.OUT_DIAG_DOC_CD, gyb.OUT_DIAG_DOC_NM FROM gyb WHERE gyb.PERSON_NM = '窦清润' GROUP BY gyb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT zyb.OUT_DIAG_DOC_CD, zyb.OU...
css
CREATE TABLE table_name_80 ( up_for_reelection INTEGER, took_office VARCHAR, position VARCHAR )
What is the earliest year a Chairman who took office after 2011 is up for reelection?
SELECT MIN(up_for_reelection) FROM table_name_80 WHERE took_office > 2011 AND position = "chairman"
sql_create_context
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName te...
Average age of SO User.
SELECT COUNT(*) FROM Votes
sede
CREATE TABLE table_204_642 ( id number, "team" text, "domestic tournament" text, "position" text, "appearance" text, "qualified" text )
which team came in after the titans in the miway t20 challenge ?
SELECT "team" FROM table_204_642 WHERE "appearance" > (SELECT "appearance" FROM table_204_642 WHERE "team" = 'titans' AND "domestic tournament" = '2011-12 miway t20 challenge') AND "domestic tournament" = '2011-12 miway t20 challenge' ORDER BY "appearance" LIMIT 1
squall
CREATE TABLE table_name_80 ( date VARCHAR, round VARCHAR )
what is the date when the round is qf?
SELECT date FROM table_name_80 WHERE round = "qf"
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...
Top Android Dev in Malaysia Based on UpVote.
WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id =...
sede
CREATE TABLE table_47368 ( "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 location attendance when the high assists is by ramon sessions (8) on march 30?
SELECT "Location Attendance" FROM table_47368 WHERE "High assists" = 'ramon sessions (8)' AND "Date" = 'march 30'
wikisql
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, ...
在医院5848543入院期间诊断出A46.X63的医疗记录中最低高医疗费和最高医疗费一共多少钱?
SELECT MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '5848543' AND gwyjzb.IN_DIAG_DIS_CD = 'A46.X63' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '5848543' AND fgwyjzb.IN_DIA...
css
CREATE TABLE table_22683369_8 ( league INTEGER )
What was the lowest number of points scored in the league cup?
SELECT MIN(league) AS Cup FROM table_22683369_8
sql_create_context
CREATE TABLE table_name_23 ( country VARCHAR, rank VARCHAR )
Which Country has a Rank of 5?
SELECT country FROM table_name_23 WHERE rank = 5
sql_create_context
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) 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, ...
找出患者姜新蕾去医院4680590住院出院的时候,负责办理出院的科室名字里面带免疫病的记录
SELECT * 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 hz_info_zyjz...
css
CREATE TABLE table_49024 ( "School Year" text, "Volleyball" text, "Cross Country" text, "Soccer" text, "Tennis" text, "Golf" text )
What is Tennis, when School Year is 2004-05?
SELECT "Tennis" FROM table_49024 WHERE "School Year" = '2004-05'
wikisql
CREATE TABLE table_36614 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
In what Round was a Defensive Tackle Pick # less than 19?
SELECT COUNT("Round") FROM table_36614 WHERE "Position" = 'defensive tackle' AND "Pick #" < '19'
wikisql
CREATE TABLE Claims ( Claim_ID INTEGER, Policy_ID INTEGER, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed INTEGER, Amount_Settled INTEGER ) CREATE TABLE Settlements ( Settlement_ID INTEGER, Claim_ID INTEGER, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amoun...
Give me a histogram to show the date and the amount for all the payments processed with Visa, order y axis in descending order.
SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' ORDER BY Amount_Payment DESC
nvbench
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE labevents ( ro...
what is the maximum base excess value of patient 19412 during this month?
SELECT MAX(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19412) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'base excess') AND DATETIME(labevents.charttime, 'start of month') = DATETIM...
mimic_iii
CREATE TABLE table_45361 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Location" text )
What is Event, when Method is 'Submission (Armbar)', and when Opponent is 'Jason St. Louis'?
SELECT "Event" FROM table_45361 WHERE "Method" = 'submission (armbar)' AND "Opponent" = 'jason st. louis'
wikisql
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required t...
what flights leave from NASHVILLE to PHOENIX
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 = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHOE...
atis
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 ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE proce...
have any laboratory tests been performed since 2102 on patient 21454?
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 21454) AND STRFTIME('%y', labevents.charttime) >= '2102'
mimic_iii
CREATE TABLE table_name_25 ( country VARCHAR, player VARCHAR )
WHAT COUNTRY HAS A PLAYER NAMED JACK NICKLAUS?
SELECT country FROM table_name_25 WHERE player = "jack nicklaus"
sql_create_context
CREATE TABLE table_name_73 ( nationality VARCHAR, school_club_team VARCHAR )
What is the nationality of the Team Purdue?
SELECT nationality FROM table_name_73 WHERE school_club_team = "purdue"
sql_create_context
CREATE TABLE diagnoses ( 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 ) C...
what is procedure short title of subject name stephanie suchan?
SELECT procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Stephanie Suchan"
mimicsql_data
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, ...
tell me about TW flight 539
SELECT DISTINCT flight_id FROM flight WHERE airline_code = 'TW' AND flight_number = 539
atis
CREATE TABLE table_204_10 ( id number, "ecclesiastical jurisdictions" text, "latin name" text, "type" text, "rite" text, "ecclesiastical province" text, "established" text, "area (km2)" number )
how many dioceses were established before 1978 ?
SELECT COUNT("ecclesiastical jurisdictions") FROM table_204_10 WHERE "established" < 1978
squall
CREATE TABLE table_9284 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Who had the highest rebounds on December 30?
SELECT "High rebounds" FROM table_9284 WHERE "Date" = 'december 30'
wikisql
CREATE TABLE table_27535 ( "Round" text, "Circuit" text, "Date" text, "Pole Position" text, "Fastest Lap" text, "Winning driver" text, "Winning team" text )
Name the circuit for 13 july
SELECT "Circuit" FROM table_27535 WHERE "Date" = '13 July'
wikisql
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 )
Return a bar chart on what is the average age for each gender?, I want to list by the mean age in descending.
SELECT gender, AVG(age) FROM Person GROUP BY gender ORDER BY AVG(age) DESC
nvbench
CREATE TABLE table_204_697 ( id number, "song" text, "artist(s)" text, "concert" number, "film" number, "1978 album" number, "2002 album" number )
which song is previous to georgia on my mind
SELECT "song" FROM table_204_697 WHERE id = (SELECT id FROM table_204_697 WHERE "song" = '"georgia on my mind"') - 1
squall
CREATE TABLE table_204_888 ( id number, "location" text, "mile" number, "destinations" text, "notes" text )
what note is before former md 453 ?
SELECT "notes" FROM table_204_888 WHERE id = (SELECT id FROM table_204_888 WHERE "notes" = 'former md 453') - 1
squall
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, ...
have there been any microbiology tests for patient 90663 on their current hospital visit?
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 90663 AND admissions.dischtime IS NULL)
mimic_iii
CREATE TABLE table_45660 ( "Country" text, "Skip" text, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real, "Shot %" real )
Name the Country which has Stolen Ends larger than 7, and a Skip of david murdoch?
SELECT "Country" FROM table_45660 WHERE "Stolen Ends" > '7' AND "Skip" = 'david murdoch'
wikisql
CREATE TABLE table_name_73 ( population_in_millions VARCHAR, gdp_2012_millions_of_euro VARCHAR )
What is Population in Millions, when GDP 2012 Millions of Euro is 600,638?
SELECT population_in_millions FROM table_name_73 WHERE gdp_2012_millions_of_euro = "600,638"
sql_create_context
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, ...
during this year, what are the top five most frequent diagnoses that patients were diagnosed in the same month after receiving umbilical vein cath.
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi...
mimic_iii
CREATE TABLE table_27320 ( "Region" text, "Prison inmates Men" real, "Prison inmates Women" real, "Prison inmates Total" real, "Incarceration rate Male" real, "Incarceration rate Female" real, "Incarceration rate Total" real, "Country comparison" text )
How many regions had 153 women prison inmates?
SELECT COUNT("Incarceration rate Total") FROM table_27320 WHERE "Prison inmates Women" = '153'
wikisql
CREATE TABLE table_14518 ( "State" text, "Abbr." text, "Capital" text, "Largest city" text, "Statehood" text, "Population est. (2012)" real, "House seat(s)" real )
What is the 2012 population for the state whose capital is Santa Fe?
SELECT "Population est. (2012)" FROM table_14518 WHERE "Capital" = 'santa fe'
wikisql
CREATE TABLE table_name_53 ( opponent VARCHAR, record VARCHAR )
Who is the opponent of the team with a 1-1-0 record?
SELECT opponent FROM table_name_53 WHERE record = "1-1-0"
sql_create_context
CREATE TABLE dependent ( sex VARCHAR )
how many female dependents are there?
SELECT COUNT(*) FROM dependent WHERE sex = 'F'
sql_create_context
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age te...
was the dulcolax prescribed to patient 032-9230 this month?
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-9230')) AND medication.drugname = 'dulcolax' AND DATETIME(medication.d...
eicu
CREATE TABLE table_20522228_2 ( episode VARCHAR, share VARCHAR )
What was the episode name when share was 8?
SELECT episode FROM table_20522228_2 WHERE share = 8
sql_create_context
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) 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...
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize a bar chart about the distribution of hire_date and the average of department_id bin hire_date by time, I want to sort Y in ascending order.
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(DEPARTMENT_ID)
nvbench
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 days of hospital stay is greater than 11 and lab test fluid is cerebrospinal fluid (csf)?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "11" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
医疗就诊68219842668的里面蒙脱石散开出的医疗类发票项目属于什么类别?
SELECT MED_INV_ITEM_TYPE FROM t_kc22 WHERE MED_CLINIC_ID = '68219842668' AND SOC_SRT_DIRE_NM = '蒙脱石散'
css
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, war...
on the first icu visit, when did patient 3267 have the first urine out foley output?
SELECT outputevents.charttime FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3267) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND outputevents.itemid I...
mimic_iii
CREATE TABLE table_204_301 ( id number, "nationality" text, "name" text, "term as a deputy judge" text, "reason for termination" text )
which country had the most deputy judges ?
SELECT "nationality" FROM table_204_301 GROUP BY "nationality" ORDER BY COUNT("name") DESC LIMIT 1
squall
CREATE TABLE table_48128 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What date was the match against carlisle united?
SELECT "Date" FROM table_48128 WHERE "Away team" = 'carlisle united'
wikisql
CREATE TABLE table_203_224 ( id number, "title" text, "year" number, "channel" text, "role" text, "notes" text )
what was the title of the last television appearance she had in 2010 ?
SELECT "title" FROM table_203_224 WHERE "year" = 2010 ORDER BY id DESC LIMIT 1
squall
CREATE TABLE table_70784 ( "Lithium" text, "Sodium" text, "Potassium" text, "Rubidium" text, "Caesium" text )
what is the properties of sodium when rubidium is nacl (2.1)?
SELECT "Sodium" FROM table_70784 WHERE "Rubidium" = 'nacl (2.1)'
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 drug code and drug dose of drug name lidocaine viscous 2%?
SELECT prescriptions.formulary_drug_cd, prescriptions.drug_dose FROM prescriptions WHERE prescriptions.drug = "Lidocaine Viscous 2%"
mimicsql_data
CREATE TABLE table_name_58 ( year INTEGER, team VARCHAR, wins VARCHAR )
Which Year is the highest that has a Team of walker racing, and Wins larger than 1?
SELECT MAX(year) FROM table_name_58 WHERE team = "walker racing" AND wins > 1
sql_create_context
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 the DINNER flights from BALTIMORE to OAKLAND
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, food_service WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND food_se...
atis
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...
count the number of patients whose ethnicity is american indian/alaska native and diagnoses long title is unspecified erythematous condition?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND diagnoses.long_title = "Unspecified erythematous condition"
mimicsql_data
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, ...
how many patients born before the year 2167 were primarily diagnosed for hyperglycemia?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HYPERGLYCEMIA" AND demographic.dob_year < "2167"
mimicsql_data
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...
在03年3月23日到15年11月12日之间病患55566777的洋地黄情况是怎么样的?
SELECT * 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 = '55566777' AND jyjgzbb.JYRQ BETWEEN '2003-03-23' AND '2015-1...
css
CREATE TABLE table_name_49 ( agg VARCHAR, opponent VARCHAR )
What was the aggregate total for the match against Koper?
SELECT agg FROM table_name_49 WHERE opponent = "koper"
sql_create_context
CREATE TABLE table_name_49 ( population__2011_ VARCHAR, population__2006_ VARCHAR )
What is the total number of people in 2011 speaking the mother tongue language spoken by 120 in 2006?
SELECT COUNT(population__2011_) FROM table_name_49 WHERE population__2006_ = 120
sql_create_context
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE CloseAsO...
SELECT TOP 100 FROM Posts.
SELECT * FROM Posts LIMIT 10000
sede
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, sh...
how many hours does it have been since patient 19428 last received a anion gap lab test in the current hospital encounter?
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'anion gap') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19428 AND admissio...
mimic_iii
CREATE TABLE table_26368963_1 ( year VARCHAR, under_15 VARCHAR, under_19 VARCHAR )
How many years are there where the the under-15 is Arturo Salazar Martinez and the under-19 is Moises Galvez?
SELECT COUNT(year) FROM table_26368963_1 WHERE under_15 = "Arturo Salazar Martinez" AND under_19 = "Moises Galvez"
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime t...
calculate the length of stay of patient 006-93519's first stay in the icu for.
SELECT STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-93519') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime LIMIT 1
eicu
CREATE TABLE table_71029 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
What Player with a Place of T10 had a Score of 80-70-72-72=294?
SELECT "Player" FROM table_71029 WHERE "Place" = 't10' AND "Score" = '80-70-72-72=294'
wikisql
CREATE TABLE table_203_9 ( id number, "state" text, "last execution date" text, "name" text, "crime" text, "method" text )
what is the total number of states that have never used capital punishment ?
SELECT COUNT("state") FROM table_203_9 WHERE "last execution date" = 'never used'
squall
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
provide the number of patients whose diagnoses short title is anxiety state nos and drug route is oral?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Anxiety state NOS" AND prescriptions.route = "ORAL"
mimicsql_data
CREATE TABLE table_68556 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
Which outcome has a Surface of clay and a Score of 4 6, 7 5, 2 6?
SELECT "Outcome" FROM table_68556 WHERE "Surface" = 'clay' AND "Score" = '4–6, 7–5, 2–6'
wikisql
CREATE TABLE table_name_61 ( area_km_2 INTEGER, member_state VARCHAR, population_in_millions VARCHAR )
What is the lowest area km2 of the member state of the Czech Republic and has a population in millions lesss than 10.3?
SELECT MIN(area_km_2) FROM table_name_61 WHERE member_state = "czech republic" AND population_in_millions < 10.3
sql_create_context
CREATE TABLE table_name_71 ( team VARCHAR, previous_team VARCHAR, pos VARCHAR )
Which Team has a Previous team of san diego rockets, and a Position of f?
SELECT team FROM table_name_71 WHERE previous_team = "san diego rockets" AND pos = "f"
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, ...
门诊诊断为口齿病(龋齿病)的病患的检测指标396011数值的平均值和最值具体均是?
SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE mzjzjlb.JZZDSM = '口齿病(龋齿病)' AND jyjgzbb.JCZBDM = '396011'
css
CREATE TABLE table_77554 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text )
Which team was the visitor on January 10?
SELECT "Visitor" FROM table_77554 WHERE "Date" = 'january 10'
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
give me the number of patients whose gender is f and primary disease is gastrointestinal bleed?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "GASTROINTESTINAL BLEED"
mimicsql_data
CREATE TABLE table_47921 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text, "Position in table" text )
Who replaced the manager of team arminia bielefeld?
SELECT "Replaced by" FROM table_47921 WHERE "Team" = 'arminia bielefeld'
wikisql
CREATE TABLE table_40014 ( "Date" text, "Home captain" text, "Away captain" text, "Venue" text, "Result" text )
Who was the away captain with a result of Eng by 1 wkt?
SELECT "Away captain" FROM table_40014 WHERE "Result" = 'eng by 1 wkt'
wikisql
CREATE TABLE publication ( abstract varchar, cid int, citation_num int, jid int, pid int, reference_num int, title varchar, year int ) CREATE TABLE domain_conference ( cid int, did int ) CREATE TABLE domain_keyword ( did int, kid int ) CREATE TABLE domain ( did int...
return me the abstract of ' Making database systems usable ' .
SELECT abstract FROM publication WHERE title = 'Making database systems usable'
academic
CREATE TABLE table_name_81 ( winner VARCHAR, year INTEGER )
Who was the winner after 2011?
SELECT winner FROM table_name_81 WHERE year > 2011
sql_create_context
CREATE TABLE table_22589 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text )
Name the total number of production code by david richardson and todd holland
SELECT COUNT("Production code") FROM table_22589 WHERE "Written by" = 'David Richardson' AND "Directed by" = 'Todd Holland'
wikisql
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
住院的病人64067392634其中医诊断的编号以及名称分别是什么啊?
SELECT ZYZYZDZZBM, ZYZYZDZZMC FROM zyjzjlb WHERE JZLSH = '64067392634'
css
CREATE TABLE table_34190 ( "Name" text, "Term" text, "Games" real, "Record (W\u2013L\u2013T / OTL)" text, "Points" real, "Win percentage" real )
Which Win percentage has a Name of red kelly?
SELECT SUM("Win percentage") FROM table_34190 WHERE "Name" = 'red kelly'
wikisql
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
StackOverflow Rank and Percentile by Tag.
WITH Rankings AS (SELECT Id, Ranking = ROW_NUMBER() OVER (ORDER BY Reputation DESC) FROM Users WHERE UPPER(Users.Location) LIKE UPPER('##Country##')), Counts AS (SELECT Count = COUNT(*) FROM Users WHERE Reputation > '##ReputationCutoff##') SELECT Id, Ranking, 100 - (100 * (CAST(Ranking AS FLOAT(20, 5)) / (SELECT Count ...
sede
CREATE TABLE table_61609 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What is the To Par of Peter Senior from Australia?
SELECT "To par" FROM table_61609 WHERE "Country" = 'australia' AND "Player" = 'peter senior'
wikisql
CREATE TABLE table_29786 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What was the team's score against detroit?
SELECT "Score" FROM table_29786 WHERE "Team" = 'Detroit'
wikisql
CREATE TABLE table_23177573_1 ( rank__week_ VARCHAR, written_by VARCHAR, directed_by VARCHAR )
What was the week ranking of the episode written by Thomas L. Moran and directed by Andrew Bernstein?
SELECT rank__week_ FROM table_23177573_1 WHERE written_by = "Thomas L. Moran" AND directed_by = "Andrew Bernstein"
sql_create_context
CREATE TABLE table_1448 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text )
What were the home team scores when carlton was the home team?
SELECT "Home team score" FROM table_1448 WHERE "Home team" = 'Carlton'
wikisql