context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE table_name_26 ( number_of_decimal_digits VARCHAR, total_bits VARCHAR, exponent VARCHAR )
What's the number of decimal digits when the total bits is more than 32 and the exponent is less than 15?
SELECT number_of_decimal_digits FROM table_name_26 WHERE total_bits > 32 AND exponent < 15
sql_create_context
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE T...
Active people from Greece before 2019.
SELECT COUNT(*) FROM Users WHERE LastAccessDate >= '2018-01-01' AND CreationDate <= '2019-01-01' AND Location LIKE '%greece%' COLLATE Latin1_General_CI_AI_KS_WS
sede
CREATE TABLE table_204_301 ( id number, "nationality" text, "name" text, "term as a deputy judge" text, "reason for termination" text )
how many deputy judges served on the permanent court of international justice after 1930 ?
SELECT COUNT("name") FROM table_204_301 WHERE "term as a deputy judge" > 1930
squall
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
列一下医院5728238所有就诊记录里,在不同科室就诊的患者和有不同的入院诊断编号患者的平均年纪
SELECT MED_ORG_DEPT_NM, IN_DIAG_DIS_CD, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '5728238' GROUP BY MED_ORG_DEPT_NM, IN_DIAG_DIS_CD
css
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, hi...
what flights are available monday from SAN FRANCISCO to PITTSBURGH
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBURGH' AND date_day.day_number = 21 AND date_day.month_number = 2 AN...
atis
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
患者72267378以前就诊的地方在哪?
SELECT mzjzjlb.YLJGDM FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '72267378' UNION SELECT wdmzjzjlb.YLJGDM FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmz...
css
CREATE TABLE table_27329061_2 ( default_desktop_environment VARCHAR, code_base VARCHAR, edition VARCHAR )
What is the default desktop environment when the code base is ubuntu 8.04 and edition is fluxbox ce?
SELECT default_desktop_environment FROM table_27329061_2 WHERE code_base = "Ubuntu 8.04" AND edition = "Fluxbox CE"
sql_create_context
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id nu...
Users scoring lower than the questions they answer. Does not count self-answers. Shows users with at least @MinAnswers answers. Does not count self-answers. Shows users with at least @MinAnswers answers.
SELECT u.Id AS "user_link", COUNT(*) AS NumAnswers, CAST(AVG(CAST((q.Score - a.Score) AS FLOAT)) AS FLOAT(6, 2)) AS AvgVoteDelta FROM Posts AS a INNER JOIN Users AS u ON u.Id = a.OwnerUserId INNER JOIN Posts AS q ON a.ParentId = q.Id WHERE (q.OwnerUserId != u.Id OR q.OwnerUserId IS NULL) GROUP BY u.Id HAVING COUNT(*) >...
sede
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
何阳夏患者的检验报告单对应的检验结果指标均异常有哪些?列出异常的检验报告单号都是哪些?
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 table_19001916_2 ( country VARCHAR, entities VARCHAR )
What are all the countries where the electric company Ebisa has a presence?
SELECT country FROM table_19001916_2 WHERE entities = "EBISA"
sql_create_context
CREATE TABLE suppliers ( supplier_id number, supplier_name text, supplier_phone text ) CREATE TABLE department_store_chain ( dept_store_chain_id number, dept_store_chain_name text ) CREATE TABLE customers ( customer_id number, payment_method_code text, customer_code text, customer_...
How many department stores does the store chain South have?
SELECT COUNT(*) FROM department_stores AS T1 JOIN department_store_chain AS T2 ON T1.dept_store_chain_id = T2.dept_store_chain_id WHERE T2.dept_store_chain_name = "South"
spider
CREATE TABLE table_21256068_3 ( round VARCHAR, attendance VARCHAR )
state the round that had a game attended attended by 9359 people
SELECT round FROM table_21256068_3 WHERE attendance = 9359
sql_create_context
CREATE TABLE table_7684 ( "Ballarat FL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real )
Can you tell me the lowest Wins that has the Ballarat FL of daylesford, and the Byes smaller than 1?
SELECT MIN("Wins") FROM table_7684 WHERE "Ballarat FL" = 'daylesford' AND "Byes" < '1'
wikisql
CREATE TABLE domain ( did int, name varchar ) CREATE TABLE publication ( abstract varchar, cid int, citation_num int, jid int, pid int, reference_num int, title varchar, year int ) CREATE TABLE keyword ( keyword varchar, kid int ) CREATE TABLE conference ( cid int,...
return me the paper in Databases area with more than 200 citations .
SELECT publication.title FROM domain, domain_publication, publication WHERE domain.did = domain_publication.did AND domain.name = 'Databases' AND publication.citation_num > 200 AND publication.pid = domain_publication.pid
academic
CREATE TABLE table_name_49 ( election_date VARCHAR, member VARCHAR )
What is the Election date for Member william richmond category:articles with hcards?
SELECT election_date FROM table_name_49 WHERE member = "william richmond category:articles with hcards"
sql_create_context
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, ...
what is the daily minimum of sao2 for patient 30296 when they came to the hospital last time?
SELECT MIN(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30296 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND chart...
mimic_iii
CREATE TABLE table_name_53 ( college VARCHAR, round VARCHAR, pick VARCHAR )
Which College has a Round of 11, and a Pick of 14?
SELECT college FROM table_name_53 WHERE round = 11 AND pick = 14
sql_create_context
CREATE TABLE table_name_10 ( name VARCHAR, average VARCHAR )
What is the Name with an Average that is 16.4?
SELECT name FROM table_name_10 WHERE average = 16.4
sql_create_context
CREATE TABLE table_name_40 ( rounds VARCHAR, driver VARCHAR )
Which rounds was Hap Sharp a driver in?
SELECT rounds FROM table_name_40 WHERE driver = "hap sharp"
sql_create_context
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 )
which element is listed directly above copper ?
SELECT "name" FROM table_204_39 WHERE id = (SELECT id FROM table_204_39 WHERE "name" = 'copper') - 1
squall
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
what is minimum age of patients whose primary disease is hypoxia and year of death is less than 2155?
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "HYPOXIA" AND demographic.dod_year < "2155.0"
mimicsql_data
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal bool...
My answers (with body) ordered by CreationDate. My answers ordered by score
SELECT q.Id, q.Title, q.CreationDate, q.Tags, q.Body, a.Body FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId AND a.PostTypeId = 2 AND q.PostTypeId = 1 WHERE a.OwnerUserId = '##UserId##' ORDER BY q.CreationDate
sede
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE...
A bar chart shows the distribution of meter_700 and meter_100 .
SELECT meter_700, meter_100 FROM swimmer
nvbench
CREATE TABLE table_17288869_7 ( high_rebounds VARCHAR, high_points VARCHAR )
High points earned by Josh Howard (19) resulted in how many high rebounds?
SELECT COUNT(high_rebounds) FROM table_17288869_7 WHERE high_points = "Josh Howard (19)"
sql_create_context
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 jybgb_jyjgzbb ( JYZBLSH number, ...
名叫俞欣怡的病人在01年1月29日到2014年9月27日期间被开出的所有检验报告单的科室编码以及名称分别叫什么?
SELECT jybgb.KSBM, jybgb.KSMC 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 = '俞...
css
CREATE TABLE table_name_52 ( played INTEGER, lost VARCHAR, against VARCHAR )
What is the highest number of games played for teams that lost over 5 games and had an against total of 228?
SELECT MAX(played) FROM table_name_52 WHERE lost > 5 AND against = 228
sql_create_context
CREATE TABLE table_13397394_1 ( building VARCHAR, address VARCHAR )
what is the total number of building for address on 201 1st avenue south
SELECT COUNT(building) FROM table_13397394_1 WHERE address = "201 1st Avenue South"
sql_create_context
CREATE TABLE table_42875 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text, "Notes" text )
Which Notes has a Venue of barcelona, spain?
SELECT "Notes" FROM table_42875 WHERE "Venue" = 'barcelona, spain'
wikisql
CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby i...
what kind of papers does shwetak patel publish
SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'shwetak patel' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid
scholar
CREATE TABLE table_name_59 ( team VARCHAR, year VARCHAR, player VARCHAR )
Which team did daniel bradshaw play for after 1935?
SELECT team FROM table_name_59 WHERE year > 1935 AND player = "daniel bradshaw"
sql_create_context
CREATE TABLE table_name_57 ( Id VARCHAR )
What 1976 has a 1978 of grand slam tournaments?
SELECT 1976 FROM table_name_57 WHERE 1978 = "grand slam tournaments"
sql_create_context
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ...
show me ground transportation in BALTIMORE
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'BALTIMORE' AND ground_service.city_code = city.city_code
atis
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
what is the number of patients whose discharge location is disc-tran cancer/chldrn h and lab test name is basophils?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" AND lab.label = "Basophils"
mimicsql_data
CREATE TABLE table_name_1 ( away_team VARCHAR )
What is essendon's away team score?
SELECT away_team AS score FROM table_name_1 WHERE away_team = "essendon"
sql_create_context
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
For those employees who was hired before 2002-06-21, find job_id and the average of employee_id , and group by attribute job_id, and visualize them by a bar chart.
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID
nvbench
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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, ...
when was the first time patient 16554 had meropenem prescribed in 01/this year?
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16554) AND prescriptions.drug = 'meropenem' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME...
mimic_iii
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
Get the maximum days the patients that died stayed at the hospital.
SELECT MAX(demographic.days_stay) FROM demographic WHERE demographic.expire_flag = "1"
mimicsql_data
CREATE TABLE table_name_4 ( written_by VARCHAR, production_code VARCHAR )
Who wrote the episode that has the production code ad1c05?
SELECT written_by FROM table_name_4 WHERE production_code = "ad1c05"
sql_create_context
CREATE TABLE table_45107 ( "Year" real, "Team" text, "Co-Drivers" text, "Class" text, "Laps" real, "Pos." text, "Class Pos." text )
In what class is the laps greater than 134 and the position is 4th?
SELECT "Class" FROM table_45107 WHERE "Laps" > '134' AND "Pos." = '4th'
wikisql
CREATE TABLE table_name_7 ( january VARCHAR, points VARCHAR )
what is the average for January with points of 51
SELECT january FROM table_name_7 WHERE points = 51
sql_create_context
CREATE TABLE table_78024 ( "Code" real, "Type" text, "Name" text, "Area (km 2 )" real, "Population" real, "Regional County Municipality" text, "Region" real )
What was the region for Malartic with 159.31 km2?
SELECT COUNT("Region") FROM table_78024 WHERE "Name" = 'malartic' AND "Area (km 2 )" < '159.31'
wikisql
CREATE TABLE table_19633 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Packers points" real, "Opponents" real, "First Downs" real, "Record" text, "Streak" text, "Venue" text, "Attendance" real )
How many first downs were there when the attendance was 13196?
SELECT MIN("First Downs") FROM table_19633 WHERE "Attendance" = '13196'
wikisql
CREATE TABLE table_name_68 ( name VARCHAR, moving_to VARCHAR )
Who was the player moving to Arminia Bielefeld?
SELECT name FROM table_name_68 WHERE moving_to = "arminia bielefeld"
sql_create_context
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE c...
had a microbiology test been done since 4 months ago for patient 76327?
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 76327) AND DATETIME(microbiologyevents.charttime) >= DATETIME(CURRENT_TIME(), '-4 month')
mimic_iii
CREATE TABLE table_34523 ( "Club" text, "Wins" text, "Last win" text, "Runners-up" text, "Last final lost" text )
When was the last final lost of the club with 7 wins?
SELECT "Last final lost" FROM table_34523 WHERE "Wins" = '7'
wikisql
CREATE TABLE table_4492 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Where did Collingwood play as the home team?
SELECT "Venue" FROM table_4492 WHERE "Home team" = 'collingwood'
wikisql
CREATE TABLE table_11417 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Total" text )
What was the Set 1 game score when Set 3 game score was 15 4, and a Set 2 game score was 15 7?
SELECT "Set 1" FROM table_11417 WHERE "Set 3" = '15–4' AND "Set 2" = '15–7'
wikisql
CREATE TABLE table_11661 ( "Order" real, "Name" text, "Seasons" text, "Games" real, "Goals" real )
Which name has an Order smaller than 997,more than 5 goals, and 215 games?
SELECT "Name" FROM table_11661 WHERE "Order" < '997' AND "Goals" > '5' AND "Games" = '215'
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...
在2017年10月25到2021年2月18日期间,看看医院6557792有多少科室的医疗费总额不低于4465.4元
SELECT COUNT(*) FROM (SELECT qtb.MED_ORG_DEPT_CD FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '6557792' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2017-10-25' AND '2021-02-18' GROUP BY qtb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) >= 4465.4 UNION SELECT gyb.MED_ORG_DEPT_CD FRO...
css
CREATE TABLE table_77362 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real )
What is the Money ($) when the Place is t6, and Player is chris dimarco?
SELECT "Money ( $ )" FROM table_77362 WHERE "Place" = 't6' AND "Player" = 'chris dimarco'
wikisql
CREATE TABLE table_47034 ( "Draw" real, "Song" text, "Performer" text, "Points" real, "Rank" text )
WHAT IS THE DRAW FOR PERFORMER ANDREA CUBRIC?
SELECT "Draw" FROM table_47034 WHERE "Performer" = 'andrea cubric'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
how many patients of black/cape verdean ethnicity are below the age 89?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.age < "89"
mimicsql_data
CREATE TABLE table_name_41 ( code VARCHAR, population INTEGER )
What is the total code number for places with a population greater than 87,585?
SELECT COUNT(code) FROM table_name_41 WHERE population > 87 OFFSET 585
sql_create_context
CREATE TABLE table_name_53 ( date_released VARCHAR, green_communist VARCHAR )
What's the date released when there was 9.7% of Green communist?
SELECT date_released FROM table_name_53 WHERE green_communist = "9.7%"
sql_create_context
CREATE TABLE table_name_39 ( date VARCHAR, name VARCHAR )
What is the date for the name of Granville?
SELECT date FROM table_name_39 WHERE name = "granville"
sql_create_context
CREATE TABLE table_35279 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text )
tries against correct as of 2007-10-15 has what tries for?
SELECT "Tries for" FROM table_35279 WHERE "Tries against" = 'correct as of 2007-10-15'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, ...
what are the three most frequently prescribed medications for patients who have been prescribed with ceftriaxone sodium 1 g ij solr previously within 2 months, until 2104?
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 = 'ceftriaxone sodium 1 g ij solr' AND STRFTIME('%y', ...
eicu
CREATE TABLE table_59939 ( "Spaceport" text, "Launch complex" text, "Launcher" text, "Spacecraft" text, "Flights" text, "Years" text )
Which spacecraft were launched by the Titan II?
SELECT "Spacecraft" FROM table_59939 WHERE "Launcher" = 'titan ii'
wikisql
CREATE TABLE table_name_6 ( college_junior_club_team VARCHAR, pick__number VARCHAR )
To which college/junior/club team did the player that was Pick 16 belong?
SELECT college_junior_club_team FROM table_name_6 WHERE pick__number = "16"
sql_create_context
CREATE TABLE table_name_44 ( years VARCHAR, player VARCHAR )
What years did Alvin Mitchell play?
SELECT years FROM table_name_44 WHERE player = "alvin mitchell"
sql_create_context
CREATE TABLE table_name_94 ( chassis VARCHAR, drivers VARCHAR )
What Chassis did Rich Vogler use?
SELECT chassis FROM table_name_94 WHERE drivers = "rich vogler"
sql_create_context
CREATE TABLE table_name_21 ( run_2 INTEGER, run_1 VARCHAR, athlete VARCHAR )
What was john farrow's run 2 associated with a run 1 of greater than 52.25?
SELECT MAX(run_2) FROM table_name_21 WHERE run_1 > 52.25 AND athlete = "john farrow"
sql_create_context
CREATE TABLE tryout ( cName VARCHAR, pPos VARCHAR ) CREATE TABLE college ( state VARCHAR, cName VARCHAR )
How many states that have some college students playing in the mid position but not in the goalie position.
SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName = T2.cName WHERE T2.pPos = 'goalie')
sql_create_context
CREATE TABLE station ( Station_ID int, Name text, Annual_entry_exit real, Annual_interchanges real, Total_Passengers real, Location text, Main_Services text, Number_of_Platforms int ) CREATE TABLE train_station ( Train_ID int, Station_ID int ) CREATE TABLE train ( Train_ID ...
Bar chart x axis location y axis sum total passengers, I want to sort in descending by the Location please.
SELECT Location, SUM(Total_Passengers) FROM station GROUP BY Location ORDER BY Location DESC
nvbench
CREATE TABLE table_204_416 ( id number, "chip" text, "flash size" text, "eeprom" number, "sram" number, "frequency\n[mhz]" number, "package" text )
what is the difference in frequency between the at90s1200 and the at90s2313 ?
SELECT ABS((SELECT "frequency\n[mhz]" FROM table_204_416 WHERE "chip" = 'at90s1200') - (SELECT "frequency\n[mhz]" FROM table_204_416 WHERE "chip" = 'at90s2313'))
squall
CREATE TABLE table_1672976_5 ( winner VARCHAR, attendance VARCHAR )
Who was the winner when the total attendance was 16597?
SELECT winner FROM table_1672976_5 WHERE attendance = 16597
sql_create_context
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
For those records from the products and each product's manufacturer, show me about the distribution of founder and the sum of price , and group by attribute founder in a bar chart, sort x-axis from high to low order.
SELECT Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC
nvbench
CREATE TABLE table_10660 ( "Round" real, "Overall" text, "Player" text, "Position" text, "Nationality" text, "Club team" text )
What is the Nationality Club Team of Quebec remparts (qmjhl)?
SELECT "Nationality" FROM table_10660 WHERE "Club team" = 'quebec remparts (qmjhl)'
wikisql
CREATE TABLE table_22395 ( "Episode" text, "Garfield Episode 1" text, "U.S. Acres Episode" text, "Garfield Episode 2" text, "Original Airdate" text )
what is the 2nd garfield episode where u.s. acres episode is the bunny rabbits is coming!
SELECT "Garfield Episode 2" FROM table_22395 WHERE "U.S. Acres Episode" = 'The Bunny Rabbits is Coming!'
wikisql
CREATE TABLE table_name_45 ( record VARCHAR, home VARCHAR, date VARCHAR )
What's the record for home team ottawa senators on march 6?
SELECT record FROM table_name_45 WHERE home = "ottawa senators" AND date = "march 6"
sql_create_context
CREATE TABLE table_37628 ( "Date" text, "Title" text, "Origin" text, "Label & Cat. no." text, "Chart no." real )
What is the highest chart number for the song Yardbirds aka Roger the Engineer?
SELECT MAX("Chart no.") FROM table_37628 WHERE "Title" = 'yardbirds aka roger the engineer'
wikisql
CREATE TABLE table_25475 ( "Date" text, "Location" text, "Opponent" text, "Irish Points" real, "Opp. Points" real, "Record" text )
Name the opponent for 2-27-10
SELECT "Opponent" FROM table_25475 WHERE "Date" = '2-27-10'
wikisql
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, C...
Necromancer-winning answers on questions with zero or negative score.
SELECT q.Id AS "post_link", a.OwnerUserId AS "user_link", q.Score AS QuestionScore, a.Score AS AnswerScore, q.CreationDate AS QuestionCreationDate, a.CreationDate AS AnswerCreationDate, DATEDIFF(day, q.CreationDate, CreationDate) AS DateDifference FROM Posts AS a JOIN Posts AS q ON q.Id = a.ParentId WHERE a.Score >= 5 ...
sede
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
有哪些就诊编号的医疗记录里显示医院给病员35376610开出的药品均低于3078.5元?
SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '35376610' AND NOT MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT >= 3078.5)
css
CREATE TABLE table_203_707 ( id number, "rank" number, "npc" text, "gold" number, "silver" number, "bronze" number, "total" number )
how many silver medals did poland win ?
SELECT "silver" FROM table_203_707 WHERE "npc" = 'poland'
squall
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, ...
PHYSED 415 is offered on which days ?
SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_i...
advising
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
从2017-09-06到2021-12-14,医疗机构6088792的头颈肿瘤外科有多少处理的住院就诊数?
SELECT COUNT(*) FROM zyjzjlb WHERE YLJGDM = '6088792' AND JZKSMC = '头颈肿瘤科' AND RYDJSJ BETWEEN '2017-09-06' AND '2021-12-14'
css
CREATE TABLE table_name_98 ( s_registered_user VARCHAR, userpics_free VARCHAR )
What is the S Registered User, when Userpics Free is 6 [free] or 15 [plus]?
SELECT s_registered_user FROM table_name_98 WHERE userpics_free = "6 [free] or 15 [plus]"
sql_create_context
CREATE TABLE table_1342149_18 ( candidates VARCHAR, result VARCHAR, district VARCHAR )
What candidate was re-elected in the Louisiana 5 district?
SELECT candidates FROM table_1342149_18 WHERE result = "Re-elected" AND district = "Louisiana 5"
sql_create_context
CREATE TABLE table_28181401_4 ( round VARCHAR, scorers VARCHAR )
when roberts 86' is the scorer what is the round?
SELECT round FROM table_28181401_4 WHERE scorers = "Roberts 86'"
sql_create_context
CREATE TABLE table_71614 ( "Date" text, "Company" text, "Business" text, "Country" text, "Value ( USD )" text )
For the United Kingdom, what's the date?
SELECT "Date" FROM table_71614 WHERE "Country" = 'united kingdom'
wikisql
CREATE TABLE table_name_51 ( overall INTEGER, round VARCHAR )
What is the highest overall number for someone from round 16?
SELECT MAX(overall) FROM table_name_51 WHERE round = 16
sql_create_context
CREATE TABLE table_name_62 ( name VARCHAR, constituency_number VARCHAR )
Who has a constituency of 84?
SELECT name FROM table_name_62 WHERE constituency_number = "84"
sql_create_context
CREATE TABLE table_name_21 ( format VARCHAR, catalog VARCHAR )
What format was used for Mobil 1?
SELECT format FROM table_name_21 WHERE catalog = "mobil 1"
sql_create_context
CREATE TABLE table_52832 ( "Year" real, "Award" text, "Category" text, "Nominee" text, "Result" text )
Which nominee won the Drama Desk Award for outstanding choreography?
SELECT "Nominee" FROM table_52832 WHERE "Award" = 'drama desk award' AND "Result" = 'won' AND "Category" = 'outstanding choreography'
wikisql
CREATE TABLE table_10812938_3 ( college VARCHAR, cfl_team VARCHAR )
What was the college for the player with the cfl team of Edmonton Eskimos (via calgary)?
SELECT college FROM table_10812938_3 WHERE cfl_team = "Edmonton Eskimos (via Calgary)"
sql_create_context
CREATE TABLE table_67338 ( "Call sign" text, "Frequency MHz" text, "City of license" text, "ERP W" real, "Class" text, "FCC info" text )
How much is the total ERP W for an 107.9 fm freqeuncy MHz?
SELECT COUNT("ERP W") FROM table_67338 WHERE "Frequency MHz" = '107.9 fm'
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 ) ...
Give me both the short title and long title of the procedure for procedure icd9 code 5059.
SELECT procedures.short_title, procedures.long_title FROM procedures WHERE procedures.icd9_code = "5059"
mimicsql_data
CREATE TABLE table_11545282_12 ( player VARCHAR, years_for_jazz VARCHAR, school_club_team VARCHAR )
Which player is from Marshall and played 1974-75?
SELECT player FROM table_11545282_12 WHERE years_for_jazz = "1974-75" AND school_club_team = "Marshall"
sql_create_context
CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE time_slot ( time_slot_id varchar(4), day varchar(1), start_hr numeric(2), start_min numeric(2), end_hr numeric(2), end_min numeric(2) ) CREATE TABLE prereq ( course_id va...
Find the average capacity among rooms in each building with a bar chart, I want to sort from high to low by the building please.
SELECT building, AVG(capacity) FROM classroom GROUP BY building ORDER BY building DESC
nvbench
CREATE TABLE table_14833 ( "Position" real, "Club" text, "Played" real, "Points" text, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real )
What is the average draws with more than 38 played?
SELECT AVG("Draws") FROM table_14833 WHERE "Played" > '38'
wikisql
CREATE TABLE table_67730 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real )
What is the average of the top-25 with 16 cuts and less than 23 events?
SELECT AVG("Top-25") FROM table_67730 WHERE "Cuts made" = '16' AND "Events" < '23'
wikisql
CREATE TABLE mzb ( 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...
有几个科室在医院6029517的平均医疗住院时长多于25天?
SELECT COUNT(*) FROM (SELECT qtb.MED_ORG_DEPT_CD FROM qtb WHERE qtb.MED_SER_ORG_NO = '6029517' GROUP BY qtb.MED_ORG_DEPT_CD HAVING AVG(qtb.IN_HOSP_DAYS) > 25 UNION SELECT gyb.MED_ORG_DEPT_CD FROM gyb WHERE gyb.MED_SER_ORG_NO = '6029517' GROUP BY gyb.MED_ORG_DEPT_CD HAVING AVG(gyb.IN_HOSP_DAYS) > 25 UNION SELECT zyb.MED...
css
CREATE TABLE table_56966 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Who is the away team that played at punt road oval where the crowd was larger than 17,000?
SELECT "Away team" FROM table_56966 WHERE "Crowd" > '17,000' AND "Venue" = 'punt road oval'
wikisql
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE restriction ( restriction_code text, advance_purc...
may i have a listing of flight numbers from COLUMBUS OHIO to MINNEAPOLIS MINNESOTA on monday
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight, state AS STATE_0, state AS STATE_1 WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MINNEAPOLIS' AND date_day.day_number ...
atis
CREATE TABLE table_67188 ( "Year" real, "Film" text, "Director" text, "Nationality of director" text, "Award" text )
Year larger than 2008, and a Nationality of director of lebanon is what director?
SELECT "Director" FROM table_67188 WHERE "Year" > '2008' AND "Nationality of director" = 'lebanon'
wikisql
CREATE TABLE table_4774 ( "Season" text, "Series" text, "Team Name" text, "Races" real, "Poles" real, "Wins" real, "Points" real, "Position" text )
What season has races larger than 18 and 36 points?
SELECT "Season" FROM table_4774 WHERE "Races" > '18' AND "Points" = '36'
wikisql
CREATE TABLE table_44457 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
The game in week 11 has what result?
SELECT "Result" FROM table_44457 WHERE "Week" = '11'
wikisql
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM ...
从二00四年十一月二十日到二0一六年四月五日这段时间,患者63934308的检测指标492955找的哪些医务人员做的,这些医务人员的工号和姓名报一下
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb....
css
CREATE TABLE table_32983 ( "Chapter" text, "Colonized" text, "Chartered" text, "School" text, "State" text, "Status" text, "Charter Range" text )
When was shippensburg university Colonized?
SELECT "Colonized" FROM table_32983 WHERE "School" = 'shippensburg university'
wikisql