context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE table_name_77 (
losses VARCHAR,
against VARCHAR,
draws VARCHAR
) | How many total losses does the team have with an against of 2195 and the draws were greater than 0? | SELECT COUNT(losses) FROM table_name_77 WHERE against = 2195 AND draws > 0 | sql_create_context |
CREATE TABLE table_70644 (
"Player" text,
"Date" text,
"Original Team" text,
"Offer Team" text,
"Result" text
) | What Offer Team has a date of July 29, 1994? | SELECT "Offer Team" FROM table_70644 WHERE "Date" = 'july 29, 1994' | wikisql |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req 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 ... | Do you find EECS 441 or EECS 381 easier ? | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 441 OR course.number = 381) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... | advising |
CREATE TABLE table_60752 (
"Date" text,
"Time" text,
"Competition" text,
"Opponent" text,
"Ground" text,
"Score" text
) | What is the score of the friendly match competition on 24 July 2008? | SELECT "Score" FROM table_60752 WHERE "Competition" = 'friendly match' AND "Date" = '24 july 2008' | wikisql |
CREATE TABLE table_59874 (
"Name" text,
"Pos." text,
"Height" text,
"Weight" text,
"Date of Birth" text,
"Club" text
) | What is the Weight of the Player from DSHNK Almaty Club with a Height of m (ft 6in)? | SELECT "Weight" FROM table_59874 WHERE "Club" = 'dshnk almaty' AND "Height" = 'm (ft 6in)' | wikisql |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | 从08年1月2日到09年6月16日小儿肛肠外科的住院量是多少? | SELECT COUNT(*) FROM zyjzjlb WHERE JZKSMC = '小儿肛肠外科' AND RYDJSJ BETWEEN '2008-01-02' AND '2009-06-16' | css |
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... | Draw a bar chart about the distribution of All_Road and Team_ID , I want to order x axis in desc order. | SELECT All_Road, Team_ID FROM basketball_match ORDER BY All_Road DESC | nvbench |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insuranc... | have any microbiological tests been done on patient 74392's urine until 107 months ago? | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 74392) AND microbiologyevents.spec_type_desc = 'urine' AND DATETIME(microbiologyevents.charttime) <= DATETIME(CURRENT_TIME(), '-107 month') | mimic_iii |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 从2007年8月3日开始,截止到2009年8月24日,请把81818459的病人总共被开出的所有检验报告单中的标本采集部位给列出来 | SELECT jybgb.BBCJBW 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 = '81818459' AND jybgb.BGRQ BETWEEN '2007-08-03' AND '2009-08-24' UNI... | css |
CREATE TABLE table_20903658_1 (
medium VARCHAR,
title_subject VARCHAR
) | What medium was used for the sculpture of George Harold Baker? | SELECT medium FROM table_20903658_1 WHERE title_subject = "George Harold Baker" | sql_create_context |
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,... | what is the distance from YYZ airport to TORONTO | SELECT DISTINCT airport_service.miles_distant FROM airport, airport_service, city WHERE airport.airport_code = 'YYZ' AND airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'TORONTO' | atis |
CREATE TABLE table_25216791_3 (
november_3 VARCHAR,
january_15_16 VARCHAR
) | What was the data on November 3, if the data on January 15-16 is January 15, 2010? | SELECT november_3 FROM table_25216791_3 WHERE january_15_16 = "January 15, 2010" | sql_create_context |
CREATE TABLE teaches (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0)
)
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE section (
course_id... | Find the total number of students for each department with a bar chart, list X-axis in ascending order please. | SELECT T1.dept_name, COUNT(DISTINCT T2.ID) FROM department AS T1 JOIN student AS T2 ON T1.dept_name = T2.dept_name JOIN instructor AS T3 ON T1.dept_name = T3.dept_name ORDER BY T1.dept_name | nvbench |
CREATE TABLE table_name_56 (
tournament VARCHAR,
opponent_in_the_final VARCHAR,
surface VARCHAR,
date VARCHAR
) | Which Tournament has a Surface of carpet, and a Date smaller than 1995, and an Opponent in the final of ken flach robert seguso? | SELECT tournament FROM table_name_56 WHERE surface = "carpet" AND date < 1995 AND opponent_in_the_final = "ken flach robert seguso" | sql_create_context |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime 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_icd_diag... | how many days has it been since patient 72909's last calculated total co2 lab test in the current hospital visit? | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calculated total co2') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 72909 AN... | mimic_iii |
CREATE TABLE table_14585 (
"Game" real,
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Series" text
) | Who was the visitor for the April 17 game? | SELECT "Visitor" FROM table_14585 WHERE "Date" = 'april 17' | wikisql |
CREATE TABLE table_15223 (
"Animal" text,
"Bahia" real,
"Pernambuco" real,
"Cear\u00e1" real,
"Rio G do Norte" real,
"Alagoas" real,
"Northeast Total" text,
"BR Ranking & %" text
) | What is the value for Bahia when the Northeast total was 6747013? | SELECT "Bahia" FROM table_15223 WHERE "Northeast Total" = '6747013' | wikisql |
CREATE TABLE table_name_95 (
money___ INTEGER,
player VARCHAR
) | What is the highest Money ( ), when Player is 'Peter Hedblom'? | SELECT MAX(money___) AS £__ FROM table_name_95 WHERE player = "peter hedblom" | sql_create_context |
CREATE TABLE table_9285 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Who had the highest assists on the l.a. lakers? | SELECT "High assists" FROM table_9285 WHERE "Team" = 'l.a. lakers' | wikisql |
CREATE TABLE table_5690 (
"Week 6 Oct 5" text,
"Week 7 Oct 12" text,
"Week 9 Oct 26" text,
"Week 10 Nov 2" text,
"Week 11 Nov 9" text,
"Week 13 Nov 23" text,
"Week 14 Nov 30" text,
"Week 15 (Final) Dec 7" text
) | Which Week 10 Nov 2 has a Week 14 Nov 30 of penn state (11-1)? | SELECT "Week 10 Nov 2" FROM table_5690 WHERE "Week 14 Nov 30" = 'penn state (11-1)' | wikisql |
CREATE TABLE table_name_94 (
res VARCHAR,
round VARCHAR,
time VARCHAR
) | What is the result of the match that went to round 1 and only for 2:48? | SELECT res FROM table_name_94 WHERE round = 1 AND time = "2:48" | sql_create_context |
CREATE TABLE table_54372 (
"Date" text,
"Round" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
) | On what date was the Result 1-0? | SELECT "Date" FROM table_54372 WHERE "Result" = '1-0' | wikisql |
CREATE TABLE table_52915 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What is the highest Laps with a Time/Retired Wheel? | SELECT MAX("Laps") FROM table_52915 WHERE "Time/Retired" = 'wheel' | wikisql |
CREATE TABLE table_name_19 (
tie_no VARCHAR,
home_team VARCHAR,
date VARCHAR
) | What was the Tie no when then home team was Stoke City for the game played on 9 February 1946? | SELECT tie_no FROM table_name_19 WHERE home_team = "stoke city" AND date = "9 february 1946" | sql_create_context |
CREATE TABLE table_79287 (
"TV Station (Operator)" text,
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"2011 1H" real
) | What is the number of 2008 values having a 2006 under 17.3, 2010 over 4, and 2011 1H of 20? | SELECT COUNT("2008") FROM table_79287 WHERE "2006" < '17.3' AND "2010" > '4' AND "2011 1H" = '20' | wikisql |
CREATE TABLE table_58051 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the away score when the game was at Brunswick Street Oval? | SELECT "Away team score" FROM table_58051 WHERE "Venue" = 'brunswick street oval' | wikisql |
CREATE TABLE table_77284 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | Which week was the game played on December 8, 1974? | SELECT "Week" FROM table_77284 WHERE "Date" = 'december 8, 1974' | wikisql |
CREATE TABLE table_204_812 (
id number,
"#" number,
"prime minister" text,
"date of birth" text,
"start date\nof (first) term" text,
"age at beginning\nof (first) term" text,
"end date\nof (final) term" text,
"total time in\noffice" text,
"date of death" text,
"lifespan" text
) | how long was joseph lyons in office ? | SELECT "total time in\noffice" FROM table_204_812 WHERE "prime minister" = 'joseph lyons' | squall |
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 demographic ... | provide the number of patients whose item id is 51025? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51025" | mimicsql_data |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | how many patients year of birth is before 1821 with lab test lactate dehydrogenase csf? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "1821" AND lab.label = "Lactate Dehydrogenase, CSF" | mimicsql_data |
CREATE TABLE table_29799700_2 (
series_premiere VARCHAR,
alternante_title VARCHAR
) | What was the premiere date for the episode whose alternate title was mi o i przeznaczenie? | SELECT series_premiere FROM table_29799700_2 WHERE alternante_title = "Miłość i przeznaczenie" | sql_create_context |
CREATE TABLE table_name_49 (
name VARCHAR,
winning_team VARCHAR,
pole_position VARCHAR
) | Who won for Forsythe Racing when Bobby Rahal had pole position? | SELECT name FROM table_name_49 WHERE winning_team = "forsythe racing" AND pole_position = "bobby rahal" | sql_create_context |
CREATE TABLE table_204_343 (
id number,
"nation" text,
"model" text,
"length" text,
"barrel length" text,
"weight" text
) | which rifle has the longest barrel ? | SELECT "model" FROM table_204_343 ORDER BY "barrel length" DESC LIMIT 1 | squall |
CREATE TABLE table_38934 (
"Player" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
) | Which Points is the lowest one that has Touchdowns smaller than 1? | SELECT MAX("Points") FROM table_38934 WHERE "Touchdowns" < '1' | wikisql |
CREATE TABLE roles (
role_code text,
role_name text,
role_description text
)
CREATE TABLE ref_document_types (
document_type_code text,
document_type_name text,
document_type_description text
)
CREATE TABLE document_locations (
document_id number,
location_code text,
date_in_locati... | What are all the document type codes and document type names? | SELECT document_type_code, document_type_name FROM ref_document_types | spider |
CREATE TABLE table_20189 (
"Player" text,
"No." real,
"Nationality" text,
"Position" text,
"Years in Orlando" text,
"School/Club Team" text
) | Name the years in orlando for penn state | SELECT "Years in Orlando" FROM table_20189 WHERE "School/Club Team" = 'Penn State' | wikisql |
CREATE TABLE table_203_152 (
id number,
"province" text,
"capital" text,
"area (km2)" number,
"population" number,
"density" number
) | how many provinces have populations higher than 300,000 ? | SELECT COUNT("province") FROM table_203_152 WHERE "population" > 300000 | squall |
CREATE TABLE table_7190 (
"Season" real,
"Series" text,
"Team Name" text,
"Races" real,
"Podiums" real,
"Poles" real,
"Wins" real,
"Points" real,
"Final Placing" text
) | What is the largest number of races when there are less than 6 podiums, the series is the formula renault 2.0 eurocup, and there are more than 0 wins? | SELECT MAX("Races") FROM table_7190 WHERE "Podiums" < '6' AND "Series" = 'formula renault 2.0 eurocup' AND "Wins" > '0' | wikisql |
CREATE TABLE table_69622 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) | Name the lowest points for officine alfieri maserati | SELECT MIN("Points") FROM table_69622 WHERE "Entrant" = 'officine alfieri maserati' | wikisql |
CREATE TABLE table_23242958_1 (
original_air_date VARCHAR,
written_by VARCHAR
) | What is the original air date of the episode written by David Zuckerman? | SELECT original_air_date FROM table_23242958_1 WHERE written_by = "David Zuckerman" | sql_create_context |
CREATE TABLE table_203_52 (
id number,
"pos" text,
"no" number,
"driver" text,
"constructor" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
) | how many total laps were there in the 2008 canadian grand prix ? | SELECT MAX("laps") FROM table_203_52 | squall |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 T... | Show me salary by last name in a histogram, display X-axis in ascending order. | SELECT LAST_NAME, SALARY FROM employees ORDER BY LAST_NAME | 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... | 医疗就诊56302259723是在哪家定点医疗机构,看看这家机构的编码 | SELECT qtb.FLX_MED_ORG_ID FROM qtb WHERE qtb.MED_CLINIC_ID = '56302259723' UNION SELECT gyb.FLX_MED_ORG_ID FROM gyb WHERE gyb.MED_CLINIC_ID = '56302259723' UNION SELECT zyb.FLX_MED_ORG_ID FROM zyb WHERE zyb.MED_CLINIC_ID = '56302259723' UNION SELECT mzb.FLX_MED_ORG_ID FROM mzb WHERE mzb.MED_CLINIC_ID = '56302259723' | css |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE TagSynonyms (
Id number... | Top 150 Hyderabad, India Users. | SELECT Id, DisplayName, Reputation FROM Users WHERE Location LIKE '%Hyderabad%' ORDER BY Reputation DESC LIMIT 150 | sede |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | i'd like to know the ground travel available in FORT WORTH | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'FORT WORTH' AND ground_service.city_code = city.city_code | atis |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city var... | Which course this semester meets the prerequisites for most other courses ? | SELECT COUNT(DISTINCT course_prerequisite.course_id), course.department, course.name, course.number FROM course, course_offering, course_prerequisite, semester WHERE course.course_id = course_offering.course_id AND course.course_id = course_prerequisite.pre_course_id AND course.department = 'EECS' AND semester.semester... | advising |
CREATE TABLE Person (
job VARCHAR,
age INTEGER
) | What is minimum age for different job title? | SELECT MIN(age), job FROM Person GROUP BY job | sql_create_context |
CREATE TABLE table_name_10 (
tournament VARCHAR
) | What is the 2003 value for the french open, which has a 1r in 1994? | SELECT 2003 FROM table_name_10 WHERE 1994 = "1r" AND tournament = "french open" | sql_create_context |
CREATE TABLE table_name_36 (
team VARCHAR,
run_1 VARCHAR
) | Which team has run 1 of 1:17.44? | SELECT team FROM table_name_36 WHERE run_1 = "1:17.44" | sql_create_context |
CREATE TABLE table_15936 (
"UN Operation name" text,
"UN Operation title" text,
"Location" text,
"Dates of Australian involvement" text,
"Number of Australians involved" text,
"Australian role" text
) | What is Australia's role in the UN operation Unama? | SELECT "Australian role" FROM table_15936 WHERE "UN Operation name" = 'UNAMA' | wikisql |
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar... | What is offered for upper level electives for CS majors ? | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id | advising |
CREATE TABLE table_44980 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | What was the Attendance in Week 1? | SELECT "Attendance" FROM table_44980 WHERE "Week" = '1' | wikisql |
CREATE TABLE table_595 (
"No" real,
"Player" text,
"Height" text,
"Position" text,
"Year born" real,
"Current Club" text
) | What is the height for player number 5? | SELECT COUNT("Height") FROM table_595 WHERE "No" = '5' | wikisql |
CREATE TABLE table_name_92 (
score VARCHAR,
venue VARCHAR
) | What was the Score of the match in Torrance, California? | SELECT score FROM table_name_92 WHERE venue = "torrance, california" | sql_create_context |
CREATE TABLE table_53676 (
"Pick" real,
"Player" text,
"Country of origin*" text,
"PBA team" text,
"College" text
) | Which pick was MIchael Holper? | SELECT MIN("Pick") FROM table_53676 WHERE "Player" = 'michael holper' | wikisql |
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 TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
... | Create a bar chart showing the number of meter 200 across meter 200, and could you display by the X in asc? | SELECT meter_200, COUNT(meter_200) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 | nvbench |
CREATE TABLE table_12803263_1 (
_number INTEGER
) | What is the most number? | SELECT MAX(_number) FROM table_12803263_1 | sql_create_context |
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
) | Return a pie on how many captains are in each rank? | SELECT Rank, COUNT(*) FROM captain GROUP BY Rank | nvbench |
CREATE TABLE table_27250813_1 (
original_air_date VARCHAR,
production_code VARCHAR
) | How many times did an episode with a production code of 12003 was aired? | SELECT COUNT(original_air_date) FROM table_27250813_1 WHERE production_code = 12003 | sql_create_context |
CREATE TABLE table_19665 (
"Year" real,
"Mens singles" text,
"Womens singles" text,
"Mens doubles" text,
"Womens doubles" text,
"Mixed doubles" text
) | Name the mens singles for 1989 | SELECT "Mens singles" FROM table_19665 WHERE "Year" = '1989' | wikisql |
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Da... | For those payments processed with Visa, bin the payment day into Year interval and compute the total amount payment as the Y-axis, and sort by the y axis in descending please. | SELECT Date_Payment_Made, SUM(Amount_Payment) FROM Payments WHERE Payment_Method_Code = 'Visa' ORDER BY SUM(Amount_Payment) DESC | nvbench |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | Number of Views, Total Posts and Total Owners for Questions created in 2017. | SELECT SUM(ViewCount) AS total_views, COUNT(DISTINCT Id) AS post_cnt, COUNT(DISTINCT OwnerUserId) AS total_users_owners FROM Posts WHERE YEAR(CreationDate) = '2017' | sede |
CREATE TABLE table_name_67 (
number INTEGER,
artist VARCHAR
) | What is the highest number of artists on Scarface? | SELECT MAX(number) FROM table_name_67 WHERE artist = "scarface" | sql_create_context |
CREATE TABLE table_1637981_7 (
kalamazoo__azo_ VARCHAR,
lansing__lan_ VARCHAR
) | During the year when Lansing's fare is $433.59, what is the fare to Kalamazoo? | SELECT kalamazoo__azo_ FROM table_1637981_7 WHERE lansing__lan_ = "$433.59" | sql_create_context |
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 varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | How important is it to take SOC 895 in order to graduate ? | SELECT COUNT(*) > 0 FROM course, program_course WHERE course.department = 'SOC' AND course.number = 895 AND program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id | advising |
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,
... | provide the number of patients whose admission type is emergency and diagnoses long title is chronic diastolic heart failure? | 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 = "Chronic diastolic heart failure" | mimicsql_data |
CREATE TABLE table_19757 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" text,
"Jockey" text,
"Winner/2nd" text
) | Where was the 1400 m held? | SELECT "Venue" FROM table_19757 WHERE "Distance" = '1400 m' | wikisql |
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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | give me the number of patients whose year of birth is less than 2168 and drug route is buccal? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2168" AND prescriptions.route = "BUCCAL" | mimicsql_data |
CREATE TABLE fgwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | 统计医疗记录中入院诊断为精神分裂症的在医院4152205的最低和最高医疗费有什么总额? | SELECT MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '4152205' AND gwyjzb.IN_DIAG_DIS_NM = '精神分裂症' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '4152205' AND fgwyjzb.IN_DIAG_... | css |
CREATE TABLE table_name_92 (
place VARCHAR,
country VARCHAR,
player VARCHAR
) | What place did Jerry Barber of the United States come in at? | SELECT place FROM table_name_92 WHERE country = "united states" AND player = "jerry barber" | sql_create_context |
CREATE TABLE table_204_74 (
id number,
"#" number,
"title" text,
"producers" text,
"guest performers" text,
"length" text
) | what is the last track produced by mr. lee ? | SELECT "title" FROM table_204_74 WHERE "producers" = 'mr. lee' ORDER BY "#" DESC LIMIT 1 | squall |
CREATE TABLE table_203_516 (
id number,
"year" text,
"team" text,
"games" number,
"punt return attempts" number,
"punt return yards" number,
"punts returned for touchdown" number,
"punts fair caught" number,
"longest punt return" number,
"kickoff attempts" number,
"kickoff re... | the next year he only had 7 punt return attempts , which year was prior to that | SELECT "year" - 1 FROM table_203_516 WHERE "punt return attempts" = 7 | squall |
CREATE TABLE table_1643 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
) | Name the date of vacancy for fabio brini | SELECT "Date of vacancy" FROM table_1643 WHERE "Replaced by" = 'Fabio Brini' | wikisql |
CREATE TABLE table_16710971_2 (
opponents VARCHAR,
record VARCHAR
) | How many opponents were there for the game recorded as 6-4 in the Atlanta Falcons 1978 season? | SELECT COUNT(opponents) FROM table_16710971_2 WHERE record = "6-4" | sql_create_context |
CREATE TABLE table_name_74 (
time_retired VARCHAR,
constructor VARCHAR,
laps VARCHAR
) | what is the time/retired when the constructor is maserati and the laps is 90? | SELECT time_retired FROM table_name_74 WHERE constructor = "maserati" AND laps = 90 | 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 diagnoses short title is hamartoses nec and drug route is iv drip? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Hamartoses NEC" AND prescriptions.route = "IV DRIP" | mimicsql_data |
CREATE TABLE table_26561509_1 (
patient_portrayer VARCHAR,
production_code VARCHAR
) | Who is the patient portrayer of the episode with the production code 3T5004? | SELECT patient_portrayer FROM table_26561509_1 WHERE production_code = "3T5004" | sql_create_context |
CREATE TABLE table_71234 (
"Capital" text,
"Prefecture" text,
"Region" text,
"Island" text,
"Pop. \u00b9" real
) | Name the total number of pop for ibaraki | SELECT COUNT("Pop. \u00b9") FROM table_71234 WHERE "Prefecture" = 'ibaraki' | wikisql |
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 me the number of widow patients with diagnosis of nnb transitory tachypnea. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "WIDOWED" AND diagnoses.short_title = "NB transitory tachypnea" | mimicsql_data |
CREATE TABLE table_name_74 (
hometown_school VARCHAR,
team VARCHAR
) | Which Hometown/School has a Team of atlanta braves? | SELECT hometown_school FROM table_name_74 WHERE team = "atlanta braves" | sql_create_context |
CREATE TABLE Allergy_Type (
Allergy VARCHAR(20),
AllergyType VARCHAR(20)
)
CREATE TABLE Has_Allergy (
StuID INTEGER,
Allergy VARCHAR(20)
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER... | What is the number of each allergie the girl named Lisa has? Plot them as bar chart, and could you rank in desc by the y axis? | SELECT T1.Allergy, COUNT(T1.Allergy) FROM Allergy_Type AS T1 JOIN Has_Allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "Lisa" GROUP BY T1.Allergy ORDER BY T1.Allergy DESC | nvbench |
CREATE TABLE table_204_318 (
id number,
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" number,
"scorers" text
) | when was the first game played . | SELECT "date" FROM table_204_318 ORDER BY "date" LIMIT 1 | squall |
CREATE TABLE table_33688 (
"Name" text,
"Bullet" text,
"Length" text,
"Base" text,
"Shoulder" text,
"Neck" text
) | What is the name of the gun with a shoulder that measures 10.688 (.420)? | SELECT "Name" FROM table_33688 WHERE "Shoulder" = '10.688 (.420)' | 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... | 自2004年11月21日起,至2007年3月28日止,9771345的医院总共记录有多少门诊医疗次数 | SELECT COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '9771345' AND IN_HOSP_DATE BETWEEN '2004-11-21' AND '2007-03-28' AND CLINIC_TYPE = '门诊' | css |
CREATE TABLE table_27277284_8 (
v_core VARCHAR,
model_number VARCHAR
) | Name the number of v core for model number mobile athlon 64 3000+ | SELECT COUNT(v_core) FROM table_27277284_8 WHERE model_number = "Mobile Athlon 64 3000+" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | count the number of patients whose diagnoses short title is long-term use of aspirin and drug route is neb? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Long-term use of aspirin" AND prescriptions.route = "NEB" | mimicsql_data |
CREATE TABLE table_7253 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
) | What is the Result when the order is # 4, and the week # is top 12? | SELECT "Result" FROM table_7253 WHERE "Order #" = '4' AND "Week #" = 'top 12' | wikisql |
CREATE TABLE products (
code number,
name text,
price number,
manufacturer number
)
CREATE TABLE manufacturers (
code number,
name text,
headquarter text,
founder text,
revenue number
) | What is all the product data, as well as each product's manufacturer? | SELECT * FROM products AS T1 JOIN manufacturers AS T2 ON T1.manufacturer = T2.code | spider |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text 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... | Which is easier out of EECS 250 and EECS 566 ? | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 250 OR course.number = 566) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... | advising |
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),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALA... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find hire_date and the sum of department_id bin hire_date by time, and visualize them by a bar chart. | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | 门诊给患者韩奇正诊断为疾病Z28.586,那检测指标609254的结果定量及其单位是什么 | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.J... | css |
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 the comparison about Team_ID over the All_Games by a bar chart, and list by the Team_ID in descending. | SELECT All_Games, Team_ID FROM basketball_match ORDER BY Team_ID DESC | nvbench |
CREATE TABLE table_name_30 (
against VARCHAR,
draws INTEGER
) | What's the total against when the draws are more than 0? | SELECT COUNT(against) FROM table_name_30 WHERE draws > 0 | sql_create_context |
CREATE TABLE table_45755 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
) | What is Date of Appointment, when Outgoing Manager is 'Hakan Kutlu'? | SELECT "Date of appointment" FROM table_45755 WHERE "Outgoing manager" = 'hakan kutlu' | wikisql |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | Top Tags for the month. This should give you the tags with the most questions per month, arranged in | SELECT t.TagName, COUNT(*) AS total FROM Posts AS p, Tags AS t, PostTags AS pt, PostTypes AS ptype WHERE pt.PostId = p.Id AND pt.TagId = t.Id AND p.PostTypeId = ptype.Id AND ptype.Name = 'Question' AND p.CreationDate >= '2015-10-01' AND p.CreationDate <= '2015-10-31' GROUP BY t.TagName ORDER BY total DESC | sede |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE procedures_icd (
r... | how much changes in arterial bp [systolic] of patient 12410 last measured on the last icu visit compared to the value second to last measured on the last icu visit? | SELECT (SELECT 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 = 12410) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents... | mimic_iii |
CREATE TABLE table_10861 (
"Rank" real,
"Country" text,
"Overall" text,
"Innovation Inputs" text,
"Innovation Performance" text
) | What is the lowest ranking team in Australia? | SELECT MIN("Rank") FROM table_10861 WHERE "Country" = 'australia' | wikisql |
CREATE TABLE table_27965906_2 (
rnd VARCHAR,
ss_winning_car VARCHAR
) | Name the total number of rnd for kim baker, bobby archer, tommy archer | SELECT COUNT(rnd) FROM table_27965906_2 WHERE ss_winning_car = "Kim Baker, Bobby Archer, Tommy Archer" | sql_create_context |
CREATE TABLE table_78350 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
) | What was the score in the match against Sanaz Marand? | SELECT "Score" FROM table_78350 WHERE "Opponent" = 'sanaz marand' | wikisql |
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEG... | How many documents are created in each day? Bin the document date by weekday and group by document type description with a stacked bar chart. | 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 | nvbench |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.