context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_2668352_11 (
first_elected VARCHAR,
incumbent VARCHAR
) | Name the first elected for jacob markell | SELECT first_elected FROM table_2668352_11 WHERE incumbent = "Jacob Markell" | sql_create_context |
CREATE TABLE station (
name VARCHAR,
LOCATION VARCHAR,
Annual_entry_exit VARCHAR,
Annual_interchanges VARCHAR
) | List the names and locations of all stations ordered by their yearly entry exit and interchange amounts. | SELECT name, LOCATION FROM station ORDER BY Annual_entry_exit, Annual_interchanges | sql_create_context |
CREATE TABLE table_name_99 (
region INTEGER,
name VARCHAR,
code VARCHAR
) | What is total population of Saint-Agapit (code 33045)? | SELECT SUM(region) FROM table_name_99 WHERE name = "saint-agapit" AND code < 33045 | sql_create_context |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varch... | At what time do CHEMBIO 601 course lectures start next semester ? | SELECT DISTINCT course_offering.start_time FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'CHEMBIO' AND course... | advising |
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
)
... | provide the number of patients whose ethnicity is hispanic/latino - puerto rican and drug code is hydx25? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.formulary_drug_cd = "HYDX25" | mimicsql_data |
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... | What is the first and last name of all students who play Football or Lacrosse? | SELECT T2.lname, T2.fname FROM sportsinfo AS T1 JOIN student AS T2 ON T1.stuid = T2.stuid WHERE T1.sportname = "Football" OR T1.sportname = "Lacrosse" | spider |
CREATE TABLE table_33957 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
) | What is the score for a game after 34 with a record of 31-11? | SELECT "Score" FROM table_33957 WHERE "Game" > '34' AND "Record" = '31-11' | wikisql |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time... | Modify the query to display the users ordered by decreasing reputation.. | SELECT DisplayName, Id, Location, Reputation FROM Users WHERE Reputation >= 550000 | sede |
CREATE TABLE table_33396 (
"Incident No." text,
"Date" text,
"Place" text,
"Killed" real,
"Injured" real
) | What is the highest number killed in incident #14? | SELECT MAX("Killed") FROM table_33396 WHERE "Incident No." = '14' | wikisql |
CREATE TABLE table_name_67 (
points_against VARCHAR,
try_diff VARCHAR
) | What is the points against when try diff is +23? | SELECT points_against FROM table_name_67 WHERE try_diff = "+23" | sql_create_context |
CREATE TABLE table_name_67 (
year_set INTEGER,
event VARCHAR
) | What was the latest year that had a 100m freestyle? | SELECT MAX(year_set) FROM table_name_67 WHERE event = "100m freestyle" | sql_create_context |
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city v... | Is Dr. Kristi Holmstrom teaching next semester , which courses ? | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Kristi Holmstrom%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.... | advising |
CREATE TABLE table_69392 (
"Rank" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | How many gold medals correspond with a total over 4? | SELECT "Gold" FROM table_69392 WHERE "Total" > '4' | 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... | 从08.12.31开始,截止到13.11.25,药品908952总共被医院开出给患者朱涵蓄多少次 | SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '朱涵蓄' AND t_kc22.STA_DATE BETWEEN '2008-12-31' AND '2013-11-25' AND t_kc22.SOC_SRT_DIRE_CD = '908952' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_NM = '朱涵蓄' ... | css |
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
... | How many documents are created in each day? Bin the document date by year interval and group by document type description with a group line chart, and I want to show in ascending by the X-axis. | SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description ORDER BY Document_Date | nvbench |
CREATE TABLE table_79352 (
"Club" text,
"Wins" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the draw when the losses were more than 8 and less than 2 wins? | SELECT MAX("Draws") FROM table_79352 WHERE "Losses" > '8' AND "Wins" < '2' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | give me the number of patients who have been diagnosed with unspecified pleural effusion and were admitted on an emergency basis. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Unspecified pleural effusion" | mimicsql_data |
CREATE TABLE table_73060 (
"Province" text,
"Capital" text,
"Area (km\u00b2)" text,
"Population" real,
"Density" real,
"Map region" real
) | How many capitals are there when area (km ) is 1111.14? | SELECT COUNT("Capital") FROM table_73060 WHERE "Area (km\u00b2)" = '1111.14' | wikisql |
CREATE TABLE table_26646 (
"State (class)" text,
"Vacator" text,
"Reason for change" text,
"Successor" text,
"Date of successors formal installation" text
) | Who was the vacator when the successor was formally installed on February 1, 1871? | SELECT "Vacator" FROM table_26646 WHERE "Date of successors formal installation" = 'February 1, 1871' | wikisql |
CREATE TABLE table_203_789 (
id number,
"season" text,
"team" text,
"country" text,
"division" number,
"apps" number,
"goals" number,
"assists" number
) | what was the last team played for ? | SELECT "team" FROM table_203_789 ORDER BY id DESC LIMIT 1 | squall |
CREATE TABLE table_18424435_4 (
no INTEGER
) | What is the maximum number of episodes in the series listed? | SELECT MAX(no) FROM table_18424435_4 | sql_create_context |
CREATE TABLE table_6833 (
"Season" text,
"Competition" text,
"Round" text,
"Opponent" text,
"Home" text,
"Away" text
) | What is the home team of the UEFA cup in the 2000-2001 season with a second round? | SELECT "Home" FROM table_6833 WHERE "Competition" = 'uefa cup' AND "Season" = '2000-2001' AND "Round" = 'second round' | wikisql |
CREATE TABLE table_28966 (
"Detailed Family Information" text,
"From" real,
"To" real,
"Anchor" real,
"Orientation" text,
"Conserved in Mus Musculus" text,
"Matrix Sim" text,
"Sequence" text,
"Occurrence" real
) | What is the smallest number listed in the from category? | SELECT MIN("From") FROM table_28966 | wikisql |
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,
... | 列一下医院4652099所有的记录里,按照不一样的科室名和入院时诊断的病名算一下患者平均是多大年纪 | SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.IN_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4652099' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.IN_DIAG_DIS_NM | css |
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
Crea... | Average Reputation for above 100. | SELECT AVG(Reputation) FROM Users WHERE Reputation > 100 | sede |
CREATE TABLE table_5406 (
"Number" real,
"Name" text,
"Position" text,
"Date of birth" text,
"Height" text
) | What is Alexander Wronski's Position? | SELECT "Position" FROM table_5406 WHERE "Name" = 'alexander wronski' | wikisql |
CREATE TABLE table_30028 (
"Year" real,
"Location" text,
"Distance (miles)" real,
"Rider Names" text,
"Horse Name" text,
"Best-Conditioned Horse" text
) | What was the total distance (in miles) of the championship where the best conditioned horse was Freedom? | SELECT "Distance (miles)" FROM table_30028 WHERE "Best-Conditioned Horse" = 'Freedom' | wikisql |
CREATE TABLE table_name_28 (
local_name VARCHAR,
dates_aired VARCHAR
) | What is the local name for the episodes that aired in 1981? | SELECT local_name FROM table_name_28 WHERE dates_aired = "1981" | 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... | 08630771病患在01年9月16日到21年7月12日之间在医疗机构8807369经历了多少次检查? | SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '08630771' AND t_kc22.STA_DATE BETWEEN '2001-09-16' AND '2021-07-12' AND t_kc22.t_kc21_MED_SER_ORG_NO = '8807369' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varch... | What options are offered for the upper-level 7 -credit classes ? | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 7 AND program_course.category LIKE 'ULCS' | advising |
CREATE TABLE table_28652521_1 (
description VARCHAR,
storage_case VARCHAR,
for_shank_type VARCHAR
) | What are all the different descriptions for the buttonholer with cardboard box for storage and a low shank type? | SELECT description FROM table_28652521_1 WHERE storage_case = "cardboard box" AND for_shank_type = "low" | sql_create_context |
CREATE TABLE table_6210 (
"Date" text,
"Course" text,
"Distance" text,
"Type" text,
"Winner" text
) | What is the date for the La Granja de San Ildefonso to Alto de Navacerrada course? | SELECT "Date" FROM table_6210 WHERE "Course" = 'la granja de san ildefonso to alto de navacerrada' | wikisql |
CREATE TABLE table_name_83 (
silver INTEGER,
bronze INTEGER
) | What is the least amount of silver when there is less than 0 bronze? | SELECT MIN(silver) FROM table_name_83 WHERE bronze < 0 | sql_create_context |
CREATE TABLE CUSTOMER (
Address VARCHAR,
CustomerId VARCHAR,
country VARCHAR
)
CREATE TABLE INVOICE (
CustomerId VARCHAR
) | Find the address of all customers that live in Germany and have invoice. | SELECT DISTINCT T1.Address FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId = T2.CustomerId WHERE T1.country = "Germany" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | Provide the number of patients who have hyperglycemia hyponatremia as their primary disease and underwent nonoperative removal of heart assist system. | 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 table_51194 (
"Year" real,
"Theme" text,
"Artist" text,
"Composition" text,
"Mintage" real,
"Issue Price" text
) | What was the theme when the issue price was $508.95? | SELECT "Theme" FROM table_51194 WHERE "Issue Price" = '$508.95' | wikisql |
CREATE TABLE table_name_65 (
report VARCHAR,
fastest_lap VARCHAR,
grand_prix VARCHAR
) | During the Australian Grand Prix and the fastest lap was driven by Jacques Villeneuve, what's the report recorded? | SELECT report FROM table_name_65 WHERE fastest_lap = "jacques villeneuve" AND grand_prix = "australian grand prix" | sql_create_context |
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
First_Elected real,
Committee text
)
CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
)
CREATE TABLE party (
Party_ID int,
... | Show how many delegates in each county with a bar chart, I want to display by the total number in desc. | SELECT County_name, COUNT(County_name) FROM county AS T1 JOIN election AS T2 ON T1.County_Id = T2.District GROUP BY County_name ORDER BY COUNT(County_name) DESC | nvbench |
CREATE TABLE table_78375 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was North Melbourne's score as the home team? | SELECT "Home team score" FROM table_78375 WHERE "Home team" = 'north melbourne' | wikisql |
CREATE TABLE table_name_48 (
apps INTEGER,
rank VARCHAR,
goals VARCHAR
) | How many Apps have a Rank larger than 2, and Goals smaller than 102? | SELECT SUM(apps) FROM table_name_48 WHERE rank > 2 AND goals < 102 | sql_create_context |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label te... | how many patients were prescribed levothyroxine sodium within 2 months since 2105 after the procedure of cath base invasv ep test. | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'cath base i... | mimic_iii |
CREATE TABLE table_10641 (
"Publication" text,
"Country" text,
"Accolade" text,
"Year" real,
"Rank" text
) | Which country is ranked 24? | SELECT "Country" FROM table_10641 WHERE "Rank" = '24' | wikisql |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId ... | Number of questions on DO NOT USE tags. | SELECT * FROM Tags AS T JOIN Posts AS P ON T.ExcerptPostId = P.Id WHERE P.Body LIKE 'DO NOT USE%' | sede |
CREATE TABLE table_63356 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | What was the result of week 11? | SELECT "Result" FROM table_63356 WHERE "Week" = '11' | wikisql |
CREATE TABLE Ref_Document_Status (
Id VARCHAR
)
CREATE TABLE Documents (
Id VARCHAR
) | What is the document status description of the document with id 1? | SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1 | sql_create_context |
CREATE TABLE table_name_54 (
opponents_in_the_final VARCHAR,
score_in_the_final VARCHAR
) | Who were the opponents in the final in which the score was 6 1, 1 6, 4 6? | SELECT opponents_in_the_final FROM table_name_54 WHERE score_in_the_final = "6–1, 1–6, 4–6" | sql_create_context |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,... | I 'd like to take a computing infrastructure course , so where do you think I should start ? | SELECT DISTINCT course.department, course.name, course.number FROM area, course WHERE area.area LIKE '%computing infrastructure%' AND course.course_id = area.course_id | advising |
CREATE TABLE table_75049 (
"Stage" text,
"Time" text,
"Name" text,
"Length" text,
"Winner" text
) | What is the Name of the SS11 Stage? | SELECT "Name" FROM table_75049 WHERE "Stage" = 'ss11' | wikisql |
CREATE TABLE table_38626 (
"Call sign" text,
"Frequency MHz" text,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
) | Which city has a frequency of 104.5 fm? | SELECT "City of license" FROM table_38626 WHERE "Frequency MHz" = '104.5 fm' | wikisql |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Give me a pie chart to reflect the proportion of All_Neutral and School_ID. | SELECT All_Neutral, School_ID FROM basketball_match | nvbench |
CREATE TABLE table_30463 (
"Stage" real,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Young rider classification" text,
"Team classification" text
) | When svein tuft is the winner what is the highest stage? | SELECT MAX("Stage") FROM table_30463 WHERE "Winner" = 'Svein Tuft' | wikisql |
CREATE TABLE table_name_35 (
method VARCHAR,
round VARCHAR
) | What is the method when the round shows 3? | SELECT method FROM table_name_35 WHERE round = 3 | sql_create_context |
CREATE TABLE member (
member_id number,
name text,
country text,
college_id number
)
CREATE TABLE college (
college_id number,
name text,
leader_name text,
college_location text
)
CREATE TABLE round (
round_id number,
member_id number,
decoration_theme text,
rank_in_rou... | Which countries have more than two members? | SELECT country FROM member GROUP BY country HAVING COUNT(*) > 2 | spider |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | tell me the total number of patients who stayed in careunit sicu? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'sicu') | mimic_iii |
CREATE TABLE table_name_6 (
result VARCHAR,
attendance VARCHAR
) | What is the result of the game when the attendance is 62,078? | SELECT result FROM table_name_6 WHERE attendance = "62,078" | sql_create_context |
CREATE TABLE table_15511178_3 (
race VARCHAR,
winning_team VARCHAR,
pole_position VARCHAR
) | Which race was the winning team mathiasen motorsports and the pole belonged to jonathan bomarito | SELECT race FROM table_15511178_3 WHERE winning_team = "Mathiasen Motorsports" AND pole_position = "Jonathan Bomarito" | sql_create_context |
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... | 统计年龄不低于6岁患者的医疗记录的平均医疗费总额有多少? | SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_AGE >= 6 UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_AGE >= 6) | css |
CREATE TABLE table_36505 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
) | Which Score has a Date of june 22? | SELECT "Score" FROM table_36505 WHERE "Date" = 'june 22' | wikisql |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
... | Average score of questions by creation date. | SELECT DATE(CreationDate), AvgScore = ROUND(AVG(CAST(Score AS FLOAT)), 2) FROM Posts WHERE PostTypeId = 1 AND DATE(CreationDate) BETWEEN @startDate AND @endDate AND ClosedDate IS NULL AND CommunityOwnedDate IS NULL GROUP BY DATE(CreationDate) ORDER BY DATE(CreationDate) | sede |
CREATE TABLE table_name_97 (
internet_explorer VARCHAR,
chrome VARCHAR
) | What percentage of browsers were using Internet Explorer during the period in which 24.91% were using Chrome? | SELECT internet_explorer FROM table_name_97 WHERE chrome = "24.91%" | sql_create_context |
CREATE TABLE table_name_60 (
hdtv VARCHAR,
content VARCHAR
) | What is the HDTV of the Music Content Channel? | SELECT hdtv FROM table_name_60 WHERE content = "music" | sql_create_context |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
) | Just list the name and price of its most expensive product in a bar chart, I want to rank X in descending order. | SELECT T1.Name, MAX(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY Name DESC | nvbench |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airline (
airline_code varchar,... | can you find me a flight from salt lake city to new york city next saturday before arriving before 1800 | SELECT DISTINCT flight.flight_id FROM airport AS AIRPORT_0, airport AS AIRPORT_1, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, days, flight WHERE AIRPORT_0.airport_code = AIRPORT_SERVICE_0.airport_code AND AIRPORT_1.airport_code = AIRPORT_SERVICE_1.airport_... | atis |
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 age and insurance of subject id 17595? | SELECT demographic.age, demographic.insurance FROM demographic WHERE demographic.subject_id = "17595" | mimicsql_data |
CREATE TABLE table_203_258 (
id number,
"year" number,
"team" text,
"games" number,
"combined tackles" number,
"tackles" number,
"assisted tackles" number,
"sacks" number,
"forced fumbles" number,
"fumble recoveries" number,
"fumble return yards" number,
"interceptions" n... | in what year did babin have the highest amount of fumble recoveries | SELECT "year" FROM table_203_258 ORDER BY "fumble recoveries" DESC LIMIT 1 | squall |
CREATE TABLE table_6756 (
"Year" real,
"Pick" text,
"Player" text,
"Position" text,
"College" text
) | Which position ranked 10th overall? | SELECT "Position" FROM table_6756 WHERE "Pick" = '10th overall' | wikisql |
CREATE TABLE table_48845 (
"Result" text,
"Opponent" text,
"Method" text,
"Date" text,
"Round" real
) | When did alfonse d'amore compete? | SELECT "Date" FROM table_48845 WHERE "Opponent" = 'alfonse d''amore' | wikisql |
CREATE TABLE table_47592 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What was the time of the race that was on a grid smaller than 9 with jeremy mcwilliams as the rider doing 21 laps? | SELECT "Time/Retired" FROM table_47592 WHERE "Grid" < '9' AND "Laps" = '21' AND "Rider" = 'jeremy mcwilliams' | wikisql |
CREATE TABLE table_14911550_1 (
wins INTEGER
) | Name the least wins | SELECT MIN(wins) FROM table_14911550_1 | sql_create_context |
CREATE TABLE table_203_777 (
id number,
"years" text,
"building" text,
"city" text,
"height (ctbuh)" text,
"floors" number
) | what is the only building in canada to have more than 60 floors ? | SELECT "building" FROM table_203_777 WHERE "floors" > 60 | squall |
CREATE TABLE table_57200 (
"Type of sign" text,
"Shape" text,
"Border" text,
"Background colour" text,
"Text/Symbol" text
) | Which sign has a red border and a warning sign? | SELECT "Text/Symbol" FROM table_57200 WHERE "Border" = 'red' AND "Type of sign" = 'warning' | wikisql |
CREATE TABLE table_34934 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | Which Surface had a Date of june 13, 1983? | SELECT "Surface" FROM table_34934 WHERE "Date" = 'june 13, 1983' | wikisql |
CREATE TABLE table_74969 (
"Condition" text,
"Prothrombin time" text,
"Partial thromboplastin time" text,
"Bleeding time" text,
"Platelet count" text
) | Which Platelet count has a Condition of factor v deficiency? | SELECT "Platelet count" FROM table_74969 WHERE "Condition" = 'factor v deficiency' | wikisql |
CREATE TABLE table_name_71 (
country VARCHAR,
wins INTEGER
) | Which Country has a number of Wins larger than 2? | SELECT country FROM table_name_71 WHERE wins > 2 | 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... | 58661647患者被门诊诊断为疾病I06.952的降钙素原的结果定量是什么?单位都是什么? | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb... | css |
CREATE TABLE table_11381701_3 (
other VARCHAR,
symbian___series_40 VARCHAR
) | When Symbian/Series 40 is 0.40%, what is the percentage of 'other'? | SELECT other FROM table_11381701_3 WHERE symbian___series_40 = "0.40%" | sql_create_context |
CREATE TABLE table_203_171 (
id number,
"place\n(posicion)" number,
"team\n(equipo)" text,
"played\n(pj)" number,
"won\n(pg)" number,
"draw\n(pe)" number,
"lost\n(pp)" number,
"goals scored\n(gf)" number,
"goals conceded\n(gc)" number,
"+/-\n(dif.)" number,
"points\n(pts.)" n... | who finished on top of the apertura 2008 standings . | SELECT "team\n(equipo)" FROM table_203_171 WHERE "place\n(posicion)" = 1 | squall |
CREATE TABLE table_36612 (
"Weight Division" text,
"Winner" text,
"Loser" text,
"Method" text,
"Round" real,
"Time" text
) | Who was the loser of the fight against antonio silva? | SELECT "Loser" FROM table_36612 WHERE "Winner" = 'antonio silva' | wikisql |
CREATE TABLE table_name_35 (
issue_price__bu_ VARCHAR,
_clarification_needed_ VARCHAR,
year VARCHAR,
mintage__proof_ VARCHAR
) | What's the Issue Price (BU) [Clarification Needed] with a Year larger than 2002 and Mintage (Proof) of 50,000? | SELECT issue_price__bu_ AS "_clarification_needed_" FROM table_name_35 WHERE year > 2002 AND mintage__proof_ = "50,000" | sql_create_context |
CREATE TABLE table_16388439_3 (
away_team VARCHAR,
home_team VARCHAR
) | Name the away team score for carlton | SELECT away_team AS score FROM table_16388439_3 WHERE home_team = "Carlton" | sql_create_context |
CREATE TABLE table_name_42 (
score VARCHAR,
away_team VARCHAR
) | What is the score for the game in which Arsenal was the away team? | SELECT score FROM table_name_42 WHERE away_team = "arsenal" | sql_create_context |
CREATE TABLE table_203_677 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
) | what tournament did anton lyuboslavskiy first place in ? | SELECT "competition" FROM table_203_677 WHERE "position" = 1 | squall |
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... | 患者97116983从06年12月8日起到2015年10月12日之内在医疗机构2605542的门诊的就诊次数一共是有多少次? | SELECT COUNT(*) FROM hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.... | css |
CREATE TABLE table_57573 (
"Ward" text,
"Bello" text,
"Ben-Tahir" text,
"Doucet" text,
"Furtenbacher" text,
"Gauthier" text,
"Haydon" text,
"Larter" text,
"Lawrance" text,
"Libweshya" text,
"Liscumb" text
) | What Haydon had a 33 Ben-Tahir? | SELECT "Haydon" FROM table_57573 WHERE "Ben-Tahir" = '33' | wikisql |
CREATE TABLE table_23490 (
"Season" real,
"Network" text,
"Host" text,
"Contestants" real,
"Winner" text,
"Destination" text
) | What season was won by Anthony Yeh? | SELECT "Season" FROM table_23490 WHERE "Winner" = 'Anthony Yeh' | wikisql |
CREATE TABLE table_21296 (
"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 score of game 35? | SELECT "Score" FROM table_21296 WHERE "Game" = '35' | wikisql |
CREATE TABLE table_23186738_6 (
record VARCHAR,
team VARCHAR
) | Name the record for houston | SELECT record FROM table_23186738_6 WHERE team = "Houston" | sql_create_context |
CREATE TABLE election (
Election_ID int,
Representative_ID int,
Date text,
Votes real,
Vote_Percent real,
Seats real,
Place real
)
CREATE TABLE representative (
Representative_ID int,
Name text,
State text,
Party text,
Lifespan text
) | A bar chart showing how many representatives in each party, order X in asc order. | SELECT Party, COUNT(Party) FROM representative GROUP BY Party ORDER BY Party | nvbench |
CREATE TABLE table_name_82 (
opponent VARCHAR,
attendance VARCHAR
) | Which Opponent has a Attendance of 6,275? | SELECT opponent FROM table_name_82 WHERE attendance = "6,275" | sql_create_context |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | when has patient 006-232560 gotten a prescription for the last time in 08/2104? | 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 = '006-232560')) AND STRFTIME('%y-%m', medication.drugstarttime) ... | eicu |
CREATE TABLE table_37640 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text
) | What was the score when the visitor was pittsburgh? | SELECT "Score" FROM table_37640 WHERE "Visitor" = 'pittsburgh' | wikisql |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | 患者10580420所做的检验报告中有哪些报告对应的检验结果指标均正常?列出检验报告单号即可 | (SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '10580420' AND NOT jybgb.BGDH IN (SELECT BGDH FROM jyjgzbb WHERE JCZ... | css |
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | During the next 2 years will 477 be offered ? | SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 477 AND semester.semester_id = course_offering.semester AND semester.year IN (2016, 2017) | advising |
CREATE TABLE table_27946 (
"meas. num" real,
"passed" text,
"YES votes" real,
"NO votes" real,
"% YES" text,
"Const. Amd.?" text,
"type" text,
"description" text
) | Was the constitution amended for the measure with description , to annex part of Washington county to multnomah? | SELECT "Const. Amd.?" FROM table_27946 WHERE "description" = 'To Annex Part of Washington County to Multnomah' | wikisql |
CREATE TABLE table_44809 (
"Date" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Total" text
) | What date was the total 56 75? | SELECT "Date" FROM table_44809 WHERE "Total" = '56–75' | wikisql |
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... | 二零零七年十一月二十日到二零一七年十一月八日,查一下在这段时间患者40200914买西药的次数 | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '40200914' AND t_kc22.STA_DATE BETWEEN '2007-11-20' AND '2017-11-08' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE table_11748 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | I want the highest grid for Laps of 38 | SELECT MAX("Grid") FROM table_11748 WHERE "Laps" = '38' | 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... | 都有什么编号的医疗记录中显示名叫水高超的患者被开出了价格都不小于8518.36元的药物? | SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '水高超' AND NOT t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 8518.36) | css |
CREATE TABLE table_39952 (
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the lowest wins with less than 2 Byes? | SELECT MIN("Wins") FROM table_39952 WHERE "Byes" < '2' | 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 regions (
REGION_ID decimal(5,0),
... | For those employees who did not have any job in the past, find job_id and the average of salary , and group by attribute job_id, and visualize them by a bar chart. | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.