context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_203_797 ( id number, "genre" text, "year" number, "title" text, "role" text, "episodes" text, "notes" text )
in 2013 , how many films did domingo appear in ?
SELECT COUNT("title") FROM table_203_797 WHERE "year" = 2013
squall
CREATE TABLE table_name_13 ( score VARCHAR, opponent VARCHAR )
Which Score has an Opponent of @ buffalo sabres?
SELECT score FROM table_name_13 WHERE opponent = "@ buffalo sabres"
sql_create_context
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( ...
what lab tests are the four most commonly ordered until 2101?
SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE STRFTIME('%y', lab.labresulttime) <= '2101' GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 4
eicu
CREATE TABLE table_203_791 ( id number, "represented" text, "contestant" text, "age" number, "height" text, "hometown" text )
if you lined the contestants up by height with shortest first and tallest last , which contestant would be next after carolina ayala cromen ?
SELECT "contestant" FROM table_203_791 WHERE "height" > (SELECT "height" FROM table_203_791 WHERE "contestant" = 'carolina ayala cromen') ORDER BY "height" LIMIT 1
squall
CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real ) CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int...
Give me a bar chart about the number of countries in the artist table
SELECT Country, COUNT(Country) FROM artist GROUP BY Country
nvbench
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description t...
Find people with a tag-based silver badge in a certain country. Find people with a tag-based silver badge in a certain country. Useful to search experts on a given subject.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Users.Id AS "user_link", Reputation, Location FROM Users, Badges WHERE LOWER(Users.Location) LIKE LOWER('%##CountryName##%') AND Users.Id = Badges.UserId AND Badges.Class = 3 AND Badges.TagBased = 1 AND LOWER(Badges.Name) = LOWER('##TagName##') ORDER BY Reputa...
sede
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
自05年2月6日,到17年10月18日,这十多年间,手术记录排名在前23的科室名称和编码是哪些
SELECT MED_ORG_DEPT_CD, MED_ORG_DEPT_NM FROM t_kc22 WHERE STA_DATE BETWEEN '2005-02-06' AND '2017-10-18' AND MED_INV_ITEM_TYPE = '手术费' GROUP BY MED_ORG_DEPT_CD ORDER BY COUNT(*) DESC LIMIT 23
css
CREATE TABLE takes ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), grade varchar(2) ) CREATE TABLE section ( course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0), building varchar(15), room_numb...
Find the sum of credits of courses that have more than one prerequisites for each department with a bar chart, I want to sort in ascending by the X-axis.
SELECT dept_name, SUM(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY dept_name ORDER BY dept_name
nvbench
CREATE TABLE table_name_41 ( rank_final VARCHAR, year INTEGER )
What was the rank final before 2007?
SELECT rank_final FROM table_name_41 WHERE year < 2007
sql_create_context
CREATE TABLE table_1193 ( "Series Ep." text, "Episode" real, "Netflix" text, "Segment A" text, "Segment B" text, "Segment C" text, "Segment D" text )
Kitchen knives is segment a of what episode?
SELECT "Episode" FROM table_1193 WHERE "Segment A" = 'Kitchen Knives'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE icust...
when has patient 64292 entered the hospital for the first time since 6 years ago via the transfer from hosp/extram?
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 64292 AND admissions.admission_location = 'transfer from hosp/extram' AND DATETIME(admissions.admittime) >= DATETIME(CURRENT_TIME(), '-6 year') ORDER BY admissions.admittime LIMIT 1
mimic_iii
CREATE TABLE table_name_34 ( reserved_for___sc___st__none_ VARCHAR, constituency_number VARCHAR )
What is the reserved for the constituency of 192?
SELECT reserved_for___sc___st__none_ FROM table_name_34 WHERE constituency_number = "192"
sql_create_context
CREATE TABLE table_17275810_7 ( date_of_vacancy VARCHAR, replaced_by VARCHAR )
Name the date of vacancy for fabio brini
SELECT date_of_vacancy FROM table_17275810_7 WHERE replaced_by = "Fabio Brini"
sql_create_context
CREATE TABLE table_75686 ( "Year" real, "Winner" text, "Jockey" text, "Trainer" text, "Owner" text, "Distance (Miles)" text, "Time" text )
When the winner was No Race in a year after 1909, what was the distance?
SELECT "Distance (Miles)" FROM table_75686 WHERE "Winner" = 'no race' AND "Year" > '1909'
wikisql
CREATE TABLE zyjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, ...
哪些人在93390516653的医疗就诊中审核检验报告单是超过21份的?列出这些审核人的工号,还有姓名也列出来
SELECT zyjybgb.SHRGH, zyjybgb.SHRXM FROM zyjybgb WHERE zyjybgb.JZLSH = '93390516653' GROUP BY zyjybgb.SHRGH HAVING COUNT(*) > 21 UNION SELECT mzjybgb.SHRGH, mzjybgb.SHRXM FROM mzjybgb WHERE mzjybgb.JZLSH = '93390516653' GROUP BY mzjybgb.SHRGH HAVING COUNT(*) > 21
css
CREATE TABLE table_name_13 ( length VARCHAR, disc VARCHAR )
What is the length of disc 67?
SELECT length FROM table_name_13 WHERE disc = "67"
sql_create_context
CREATE TABLE table_74216 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Which game had a score of w 95-85?
SELECT MIN("Game") FROM table_74216 WHERE "Score" = 'W 95-85'
wikisql
CREATE TABLE document_types ( document_type_code text, document_description text ) CREATE TABLE grants ( grant_id number, organisation_id number, grant_amount number, grant_start_date time, grant_end_date time, other_details text ) CREATE TABLE project_outcomes ( project_id number,...
List from which date and to which date these staff work: project staff of the project which hires the most staffs
SELECT date_from, date_to FROM project_staff WHERE project_id IN (SELECT project_id FROM project_staff GROUP BY project_id ORDER BY COUNT(*) DESC LIMIT 1) UNION SELECT date_from, date_to FROM project_staff WHERE role_code = 'leader'
spider
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
在2000年6月7日到2017年4月4日内所有医疗记录在医院2770364的个人账户支出与医疗费总额的平均比值是多少?
SELECT AVG(t_kc24.PER_ACC_PAY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '2770364' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-06-07' AND '2017-04-04'
css
CREATE TABLE table_name_16 ( position VARCHAR, height_in_ft VARCHAR )
What position does the player who is 6-10 play?
SELECT position FROM table_name_16 WHERE height_in_ft = "6-10"
sql_create_context
CREATE TABLE plays_games ( stuid number, gameid number, hours_played number ) CREATE TABLE sportsinfo ( stuid number, sportname text, hoursperweek number, gamesplayed number, onscholarship text ) CREATE TABLE video_games ( gameid number, gname text, gtype text ) CREATE TAB...
Show the game name that has most number of hours played.
SELECT gname FROM plays_games AS T1 JOIN video_games AS T2 ON T1.gameid = T2.gameid GROUP BY T1.gameid ORDER BY SUM(hours_played) DESC LIMIT 1
spider
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...
count the number of patients whose primary disease is hyperglycemia;hyponatremia and procedure short title is nonop remov hrt asst sys?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "HYPERGLYCEMIA;HYPONATREMIA" AND procedures.short_title = "Nonop remov hrt asst sys"
mimicsql_data
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 (...
what is the number of patients whose admission type is emergency and ethnicity is black/african american?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.ethnicity = "BLACK/AFRICAN AMERICAN"
mimicsql_data
CREATE TABLE table_name_97 ( erp_w INTEGER, call_sign VARCHAR )
What is the average ERP W for callsign K207BK?
SELECT AVG(erp_w) FROM table_name_97 WHERE call_sign = "k207bk"
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...
provide the number of patients whose year of birth is less than 2080 and drug code is posa200l?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2080" AND prescriptions.formulary_drug_cd = "POSA200L"
mimicsql_data
CREATE TABLE table_name_95 ( tournament VARCHAR )
Name the 2010 for tournament of us open
SELECT 2010 FROM table_name_95 WHERE tournament = "us open"
sql_create_context
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...
95072739患者开出的药品在哪几次医疗记录中被均高于8153.6元?列出医疗就诊编号都是什么?
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '95072739' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 8153.6)
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 prescriptions...
provide the number of patients whose year of death is less than or equal to 2126 and procedure icd9 code is 3612?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2126.0" AND procedures.icd9_code = "3612"
mimicsql_data
CREATE TABLE table_name_46 ( laps INTEGER, time_retired VARCHAR, grid VARCHAR )
Tell me the lowest Laps with a time/retired of +2 Laps and Grid of 20
SELECT MIN(laps) FROM table_name_46 WHERE time_retired = "+2 laps" AND grid = 20
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...
病患华文康做的检查里哪些编号检验报告单对应的检验结果的全部指标都是正常的?上面的单号具体是多少?
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '华文康' AND NOT ...
css
CREATE TABLE zyb ( 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...
看看参保人76143414从2010.8.24到2019.3.19这期间,在门诊发生的西药费有多少总额
SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 JOIN mzb ON mzb.MED_ORG_DEPT_CD = t_kc22.MED_CLINIC_ID WHERE mzb.PERSON_NM = '76143414' AND t_kc22.STA_DATE BETWEEN '2010-08-24' AND '2019-03-19' AND t_kc22.MED_INV_ITEM_TYPE = '西药费'
css
CREATE TABLE table_62430 ( "Rank" text, "Name" text, "Height ft (m)" text, "Floors" real, "Year" real )
How many floors are in the building built after 2007, and ranked #10=?
SELECT AVG("Floors") FROM table_62430 WHERE "Rank" = '10=' AND "Year" > '2007'
wikisql
CREATE TABLE table_name_79 ( result VARCHAR, attendance VARCHAR )
What was the result of the game that had 20,627 fans in attendance?
SELECT result FROM table_name_79 WHERE attendance = "20,627"
sql_create_context
CREATE TABLE table_name_96 ( level INTEGER, team VARCHAR, season VARCHAR )
What's the highest level of team Astana since 2007?
SELECT MAX(level) FROM table_name_96 WHERE team = "astana" AND season > 2007
sql_create_context
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetake...
what was the top four of the most frequent procedures until 2104?
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE STRFTIME('%y', treatment.treatmenttime) <= '2104' GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 4
eicu
CREATE TABLE table_1515346_2 ( margin_of_victory VARCHAR, honoree_s_ VARCHAR )
What was the margin of victory in the year when the honoree was Tommy Armour?
SELECT margin_of_victory FROM table_1515346_2 WHERE honoree_s_ = "Tommy Armour"
sql_create_context
CREATE TABLE Customers_Cards ( card_id INTEGER, customer_id INTEGER, card_type_code VARCHAR(15), card_number VARCHAR(80), date_valid_from DATETIME, date_valid_to DATETIME, other_card_details VARCHAR(255) ) CREATE TABLE Financial_Transactions ( transaction_id INTEGER, previous_transa...
Scatter plot to show card id on x axis and customer_id on y axis.
SELECT card_id, customer_id FROM Customers_Cards
nvbench
CREATE TABLE table_45941 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the sum of Silver, when Total is less than 1?
SELECT SUM("Silver") FROM table_45941 WHERE "Total" < '1'
wikisql
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...
Find Name and Height , and visualize them by a bar chart, and could you order x-axis from high to low order please?
SELECT Name, Height FROM people ORDER BY Name DESC
nvbench
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
provide the number of patients whose ethnicity is black/african american and age is less than 79?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/AFRICAN AMERICAN" AND demographic.age < "79"
mimicsql_data
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE d_labitems ( row_id number...
when was patient 60219 last having the minimum value of platelet count since 81 months ago?
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 60219) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'platelet count') AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), ...
mimic_iii
CREATE TABLE table_50930 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" text )
Which player is from Australia, and has a place of t9?
SELECT "Player" FROM table_50930 WHERE "Place" = 't9' AND "Country" = 'australia'
wikisql
CREATE TABLE table_36613 ( "Weight Division" text, "Winner" text, "Loser" text, "Method" text, "Round" real, "Time" text )
What was the average number of rounds in the fight where Tank Abbott lost?
SELECT AVG("Round") FROM table_36613 WHERE "Loser" = 'tank abbott'
wikisql
CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE time_interval ( period text, begin_time in...
please list the flights from DALLAS FORT WORTH to WASHINGTON BALTIMORE on 7 23
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, date_day, days, flight WHERE ((CITY_0.city_code = AIRPORT_SERVICE_...
atis
CREATE TABLE table_7054 ( "Country" text, "Host" text, "Channel" text, "Premiere" text, "Jackpot" text )
Which channel comes out of Israel?
SELECT "Channel" FROM table_7054 WHERE "Country" = 'israel'
wikisql
CREATE TABLE table_35205 ( "Date" text, "Event" text, "Location" text, "Attendance" text, "PPV Buyrate" text )
What event was in New Orleans, Louisiana, USA?
SELECT "Event" FROM table_35205 WHERE "Location" = 'new orleans, louisiana, usa'
wikisql
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...
在06年4月21日到13年11月4日期间这个4162567号医院有几个科室收取的医疗费总额高于6541.72元的啊?
SELECT COUNT(*) FROM (SELECT t_kc24.t_kc21_MED_ORG_DEPT_CD FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '4162567' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-04-21' AND '2013-11-04' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) > 6541.72) AS T
css
CREATE TABLE catalogs ( catalog_id number, catalog_name text, catalog_publisher text, date_of_publication time, date_of_latest_revision time ) CREATE TABLE catalog_contents ( catalog_entry_id number, catalog_level_number number, parent_entry_id number, previous_entry_id number, ...
Which catalog contents have a product stock number that starts from '2'? Show the catalog entry names.
SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "2%"
spider
CREATE TABLE table_name_85 ( round INTEGER, opponent VARCHAR, record VARCHAR )
What was the highest number of rounds that had Hikaru Shinohara as an opponent and a record of 11-7?
SELECT MAX(round) FROM table_name_85 WHERE opponent = "hikaru shinohara" AND record = "11-7"
sql_create_context
CREATE TABLE table_train_35 ( "id" int, "pregnancy_or_lactation" bool, "glucocorticoid_history" bool, "impaired_consciousness" bool, "hematologic_disease" bool, "glasgow_come_score_gcs" int, "liver_disease" bool, "NOUSE" float )
severely impaired consciousness ( glasgow coma scale score < 7 of 15 )
SELECT * FROM table_train_35 WHERE impaired_consciousness = 1 OR glasgow_come_score_gcs < 7
criteria2sql
CREATE TABLE table_6180 ( "Model" text, "Platform & Frequency [MHz]" text, "RAM [MB]" text, "Flash Memory [MB]" text, "Wireless NIC" text, "WLAN standard [802.11]" text, "Ethernet port count" text, "Voltage Input [V/A]" text )
What is the voltage iinput [V/A] of the whr-g54s model?
SELECT "Voltage Input [V/A]" FROM table_6180 WHERE "Model" = 'whr-g54s'
wikisql
CREATE TABLE table_24101118_1 ( model__list_ VARCHAR, processor VARCHAR, brand_name VARCHAR )
what is the model where the processor is yorkfield and the brand name is xeon?
SELECT model__list_ FROM table_24101118_1 WHERE processor = "Yorkfield" AND brand_name = "Xeon"
sql_create_context
CREATE TABLE table_18042031_16 ( partnering VARCHAR, date VARCHAR )
Who was Gil's partner on 10 12 july 2009
SELECT partnering FROM table_18042031_16 WHERE date = "10–12 July 2009"
sql_create_context
CREATE TABLE table_4870 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the away team that scored 10.13 (73)?
SELECT "Away team" FROM table_4870 WHERE "Away team score" = '10.13 (73)'
wikisql
CREATE TABLE table_name_48 ( label VARCHAR, date VARCHAR )
Which Label has a Date of 20 July?
SELECT label FROM table_name_48 WHERE date = "20 july"
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...
门诊诊断为疾病Q71.430的患者45034642的脂肪酶的结果定量及其单位数据均为?
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.Y...
css
CREATE TABLE table_25334 ( "County" text, "Population" real, "Unemployment Rate" text, "Market Income Per Capita" text, "Poverty Rate" text, "Status" text )
What is the status of the county that has a 14.7% poverty rate?
SELECT "Status" FROM table_25334 WHERE "Poverty Rate" = '14.7%'
wikisql
CREATE TABLE table_name_95 ( top_5 VARCHAR, tournament VARCHAR, events VARCHAR )
what is the total number of times the tournament was pga championship and evens is less than 4?
SELECT COUNT(top_5) FROM table_name_95 WHERE tournament = "pga championship" AND events < 4
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc21 ( 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 ...
自2002-04-25起到2002-05-18医疗机构7767561的就诊记录里未就业人员的就诊记录有多少
SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7767561' AND t_kc21.IN_HOSP_DATE BETWEEN '2002-04-25' AND '2002-05-18' AND t_kc21.INSURED_STS = '未就业'
css
CREATE TABLE table_2112260_1 ( location VARCHAR, nick VARCHAR )
Where is every location where Nick is Bru?
SELECT location FROM table_2112260_1 WHERE nick = "BRU"
sql_create_context
CREATE TABLE table_name_51 ( driver VARCHAR, laps VARCHAR, constructor VARCHAR )
who is the driver that has laps more than 35 and the constructor is ferrari?
SELECT driver FROM table_name_51 WHERE laps > 35 AND constructor = "ferrari"
sql_create_context
CREATE TABLE table_name_35 ( laps VARCHAR, driver VARCHAR, grid VARCHAR )
How many laps did Chuck Stevenson have with a grid of less than 11?
SELECT COUNT(laps) FROM table_name_35 WHERE driver = "chuck stevenson" AND grid < 11
sql_create_context
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...
有多少门诊手术费是在2016年10月30日到2018年3月13日期间参保人00614824交付的?
SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '00614824' AND t_kc22.t_kc21_CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2016-10-30' AND '2018-03-13' AND t_kc22.MED_INV_ITEM_TYPE = '手术费'
css
CREATE TABLE table_74676 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which away team had a score of 4.12 (36)?
SELECT "Away team" FROM table_74676 WHERE "Away team score" = '4.12 (36)'
wikisql
CREATE TABLE table_59108 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What is the country that has a place of T6 that Eduardo Romero plays for?
SELECT "Country" FROM table_59108 WHERE "Place" = 't6' AND "Player" = 'eduardo romero'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREA...
what was patient 021-113379's first prescribed time for chlorhexidine (periogard) 0.12 % oral rinse 15 ml?
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-113379')) AND medication.drugname = 'chlorhexidine (periog...
eicu
CREATE TABLE table_56505 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which game at Arden Street Oval had the lowest attendance?
SELECT MIN("Crowd") FROM table_56505 WHERE "Venue" = 'arden street oval'
wikisql
CREATE TABLE table_19850806_3 ( report VARCHAR, rd VARCHAR )
Which report is where rd. is 9?
SELECT report FROM table_19850806_3 WHERE rd = "9"
sql_create_context
CREATE TABLE table_name_83 ( three VARCHAR, date VARCHAR )
Name the three for 16 december 1676
SELECT three FROM table_name_83 WHERE date = "16 december 1676"
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...
count the number of patients whose admission type is elective and discharge location is dead/expired?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.discharge_location = "DEAD/EXPIRED"
mimicsql_data
CREATE TABLE table_name_50 ( score VARCHAR, competition VARCHAR, result VARCHAR, location VARCHAR )
What was the score when the result was win, in Helsinki, competition was friendly?
SELECT score FROM table_name_50 WHERE result = "win" AND location = "helsinki" AND competition = "friendly"
sql_create_context
CREATE TABLE table_name_58 ( tyre VARCHAR, fastest_lap VARCHAR )
What is the tyre on the race where Bruce Mclaren had the fastest lap?
SELECT tyre FROM table_name_58 WHERE fastest_lap = "bruce mclaren"
sql_create_context
CREATE TABLE bdmzjzjlb ( 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...
从03年5月3日开始到09年5月24日结束患者45065975被开出的所有检验报告单的检验报告单号能否列出来?
SELECT jybgb.BGDH FROM hz_info JOIN wdmzjzjlb JOIN jybgb ON 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_MZJZJLB WHERE hz_info.RYBH = '45065975' AND jybgb.BGRQ BETWEEN '2003-05-03' AND '2009-...
css
CREATE TABLE Apartment_Buildings ( building_id INTEGER, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80) ) CREATE TABLE Apartment_Facilities ( apt_id I...
Show the number of bookings for different guests and group by guest first name in a bar chart.
SELECT guest_first_name, COUNT(guest_first_name) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id GROUP BY guest_first_name
nvbench
CREATE TABLE table_19201 ( "Designation" text, "Bus width (bits)" real, "Channels" text, "Clock rate (MHz)" real, "Bandwidth (MB/s)" real )
Name the maximum clock rate mhz
SELECT MAX("Clock rate (MHz)") FROM table_19201
wikisql
CREATE TABLE table_204_635 ( id number, "round" number, "selection" number, "player" text, "position" text, "college" text )
who got the first draft pick - washington or clemson ?
SELECT "college" FROM table_204_635 WHERE "college" IN ('washington', 'clemson') ORDER BY "round" LIMIT 1
squall
CREATE TABLE vehicles ( vehicle_id number, vehicle_details text ) CREATE TABLE lessons ( lesson_id number, customer_id number, lesson_status_code text, staff_id number, vehicle_id number, lesson_date time, lesson_time text, price number ) CREATE TABLE customers ( customer_i...
What are the first and last names of all customers who lived in Lockmanfurt?
SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt"
spider
CREATE TABLE table_15001681_1 ( mens_singles VARCHAR, year VARCHAR )
In 1987 who was the mens singles
SELECT mens_singles FROM table_15001681_1 WHERE year = 1987
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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...
门诊就诊48598074227的就诊状态代码是什么?就诊状态名称叫什么?
SELECT mzjzjlb.JZZTDM, mzjzjlb.JZZTMC FROM mzjzjlb WHERE mzjzjlb.JZLSH = '48598074227'
css
CREATE TABLE Addresses ( address_id INTEGER, line_1 VARCHAR(120), line_2 VARCHAR(120), line_3 VARCHAR(120), city VARCHAR(80), zip_postcode VARCHAR(20), state_province_county VARCHAR(50), country VARCHAR(50), other_address_details VARCHAR(255) ) CREATE TABLE Ref_Detention_Type ( ...
Visualize a scatter chart about the correlation between student_id and monthly_rental , and group by attribute other_details.
SELECT student_id, monthly_rental FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC
nvbench
CREATE TABLE t_kc21 ( 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, ...
在编号为74512529856的这次医疗就诊中,查一下给患者袁良哲开的药品名称及每次的用量和使用频次
SELECT t_kc22.SOC_SRT_DIRE_NM, t_kc22.EACH_DOSAGE, t_kc22.USE_FRE FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '74512529856'
css
CREATE TABLE table_75043 ( "Outcome" text, "Event" text, "Year" text, "Venue" text, "Opponent in the final" text )
What is the Opponent in final with an All England Open Outcome?
SELECT "Opponent in the final" FROM table_75043 WHERE "Outcome" = 'all england open'
wikisql
CREATE TABLE table_name_87 ( year INTEGER, cause VARCHAR, death_toll VARCHAR )
Which Year has a cause of firedamp and a Death toll larger than 11?
SELECT SUM(year) FROM table_name_87 WHERE cause = "firedamp" AND death_toll > 11
sql_create_context
CREATE TABLE table_58189 ( "Team" text, "Season" text, "Regular Season" real, "Tournament" real, "Total" real )
How many regular season titles did Kansas receive when they received fewer than 2 tournament titles and more than 0 total titles?
SELECT "Regular Season" FROM table_58189 WHERE "Tournament" < '2' AND "Total" > '0' AND "Team" = 'kansas'
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, ...
Tell me the drug code and drug type of Tacrolimus.
SELECT prescriptions.drug_type, prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Tacrolimus"
mimicsql_data
CREATE TABLE table_name_6 ( season VARCHAR, goals VARCHAR, apps VARCHAR, country VARCHAR, team VARCHAR )
What is Season, when Country is China, when Team is Dalian Shide, when Apps is greater than 8, and when Goals is 2?
SELECT season FROM table_name_6 WHERE country = "china" AND team = "dalian shide" AND apps > 8 AND goals = 2
sql_create_context
CREATE TABLE table_name_10 ( state VARCHAR, team VARCHAR )
What is the State with Gwangju Fc as the team?
SELECT state FROM table_name_10 WHERE team = "gwangju fc"
sql_create_context
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...
Suggested Tag Synonyms with no Votes.
SELECT 'site://tags/' + TargetTagName + '/synonyms|' + SourceTagName AS Synonym, TargetTagName AS Original, OwnerUserId AS "user_link" FROM TagSynonyms WHERE Score = 0 AND ApprovalDate IS NULL ORDER BY 'user_link' DESC
sede
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
How many White-Russian patients were given the drug topiramate (topamax)
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND prescriptions.drug = "Topiramate (Topamax)"
mimicsql_data
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE medication ( medi...
what are the five most commonly prescribed medications for patients that are also prescribed with nss infusion at the same time, in 2105?
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'nss infusion' AND STRFTIME('%y', medication.drugsta...
eicu
CREATE TABLE table_75235 ( "Season" text, "Oberliga Bayern" text, "Oberliga Hessen" text, "Oberliga Baden-W\u00fcrttemberg" text, "Oberliga S\u00fcdwest" text )
which Oberliga S dwes has an Oberliga Baden-W rttemberg of sv sandhausen in 1984-85?
SELECT "Oberliga S\u00fcdwest" FROM table_75235 WHERE "Oberliga Baden-W\u00fcrttemberg" = 'sv sandhausen' AND "Season" = '1984-85'
wikisql
CREATE TABLE Customers_cards ( card_id VARCHAR, customer_id VARCHAR, card_type_code VARCHAR, card_number VARCHAR )
Show ids, customer ids, card type codes, card numbers for all cards.
SELECT card_id, customer_id, card_type_code, card_number FROM Customers_cards
sql_create_context
CREATE TABLE table_name_33 ( date_released VARCHAR, _number_of_discs INTEGER )
What Date Released, when # Of Discs is greater than 4?
SELECT date_released FROM table_name_33 WHERE _number_of_discs > 4
sql_create_context
CREATE TABLE table_75916 ( "Name" text, "Height" text, "Position" text, "Year" text, "Home Town" text )
In what year of school is the forward Iman McFarland?
SELECT "Year" FROM table_75916 WHERE "Position" = 'forward' AND "Name" = 'iman mcfarland'
wikisql
CREATE TABLE table_17244 ( "Date of Issue" text, "Theme" text, "Denomination" text, "Design" text, "Illustration" text, "Printing Process" text, "Paper Type" text, "First Day Cover Cancellation" text )
What is the paper type of the University of Saskatchewan themed stamp?
SELECT "Paper Type" FROM table_17244 WHERE "Theme" = 'University of Saskatchewan'
wikisql
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTME...
Compare the average salary by each hire date (bin it into month interval) of employees using a bar chart, list from high to low by the mean salary.
SELECT HIRE_DATE, AVG(SALARY) FROM employees ORDER BY AVG(SALARY) DESC
nvbench
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...
住院时长少于15天的记录在医院7236122中有多少个科室达到?
SELECT COUNT(*) FROM (SELECT qtb.MED_ORG_DEPT_CD FROM qtb WHERE qtb.MED_SER_ORG_NO = '7236122' GROUP BY qtb.MED_ORG_DEPT_CD HAVING MAX(qtb.IN_HOSP_DAYS) < 15 UNION SELECT gyb.MED_ORG_DEPT_CD FROM gyb WHERE gyb.MED_SER_ORG_NO = '7236122' GROUP BY gyb.MED_ORG_DEPT_CD HAVING MAX(gyb.IN_HOSP_DAYS) < 15 UNION SELECT zyb.MED...
css
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) 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...
For all employees who have the letters D or S in their first name, a bar chart shows the distribution of hire_date and the sum of employee_id bin hire_date by time, and rank by the y axis from low to high.
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(EMPLOYEE_ID)
nvbench
CREATE TABLE table_10402018_1 ( london VARCHAR, us_tour VARCHAR )
How many characters is by Babs Rubenstein?
SELECT COUNT(london) FROM table_10402018_1 WHERE us_tour = "Babs Rubenstein"
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, ...
门诊在住院就诊02924196516中的中医诊断编号是多少?
SELECT zyjzjlb.MZZYZDZZBM FROM zyjzjlb WHERE zyjzjlb.JZLSH = '02924196516'
css