context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
CREATE TABLE song (
artist_name VARCHAR,
languages VARCHAR,
rating INTEGER
) | Find the names of the artists who have produced English songs but have never received rating higher than 8. | SELECT DISTINCT artist_name FROM song WHERE languages = "english" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating > 8 | sql_create_context |
CREATE TABLE table_11677691_12 (
player VARCHAR,
school VARCHAR
) | who are all the players for armwood high school | SELECT player FROM table_11677691_12 WHERE school = "Armwood High school" | sql_create_context |
CREATE TABLE table_68523 (
"Date" text,
"Course" text,
"Distance" text,
"Type" text,
"Winner" text
) | What type had a course of Grosseto To Rieti? | SELECT "Type" FROM table_68523 WHERE "Course" = 'grosseto to rieti' | wikisql |
CREATE TABLE table_name_25 (
season VARCHAR,
league VARCHAR,
european_competitions VARCHAR
) | What is the Season when league shows bundesliga, and a European competition of played korac cup? | SELECT season FROM table_name_25 WHERE league = "bundesliga" AND european_competitions = "played korac cup" | sql_create_context |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergy... | when's the first time patient 022-44805 had the maximum chloride in 12/this year? | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-44805')) AND lab.labname = 'chloride' AND DATETIME(lab.labresulttime, 'start of... | eicu |
CREATE TABLE table_name_30 (
points VARCHAR,
home VARCHAR,
date VARCHAR
) | What points have pittsburgh as the home, and November 29 as the date? | SELECT points FROM table_name_30 WHERE home = "pittsburgh" AND date = "november 29" | sql_create_context |
CREATE TABLE table_204_449 (
id number,
"no" number,
"episode" text,
"title" text,
"original airdate" text,
"viewers" number,
"nightly\nrank" number
) | which episode had at least 1.0 viewers ? | SELECT "title" FROM table_204_449 WHERE "viewers" >= 1.0 | squall |
CREATE TABLE table_51405 (
"Name" text,
"Current version" text,
"System" text,
"Platform" text,
"License" text
) | what is the current version of the name mupen64plus with gpl v2 license? | SELECT "Current version" FROM table_51405 WHERE "License" = 'gpl v2' AND "Name" = 'mupen64plus' | wikisql |
CREATE TABLE Order_Items (
item_id INTEGER,
order_item_status_code VARCHAR(15),
order_id INTEGER,
product_id INTEGER,
item_status_code VARCHAR(15),
item_delivered_datetime DATETIME,
item_order_quantity VARCHAR(80)
)
CREATE TABLE Premises (
premise_id INTEGER,
premises_type VARCHAR(1... | Show each premise type and the number of premises in that type Visualize by bar chart, and show by the Y in ascending please. | SELECT premises_type, COUNT(*) FROM Premises GROUP BY premises_type ORDER BY COUNT(*) | 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 d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
... | this month when was patient 11826 prescribed the first propofol? | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11826) AND prescriptions.drug = 'propofol' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month') ORDER BY p... | mimic_iii |
CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
departure_date date,
arrival_date date,
price number(7,2),
aid number(9,0)
)
CREAT... | Draw a bar chart of destination versus the total number, sort Y in asc order. | SELECT destination, COUNT(*) FROM flight GROUP BY destination ORDER BY COUNT(*) | nvbench |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | count the number of patients whose diagnosis short title is follicular cyst of ovary and drug route is buccal. | 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 = "Follicular cyst of ovary" AND prescriptions.route = "BUCCAL" | mimicsql_data |
CREATE TABLE checking (
custid number,
balance number
)
CREATE TABLE savings (
custid number,
balance number
)
CREATE TABLE accounts (
custid number,
name text
) | Find the checking balance of the accounts whose savings balance is higher than the average savings balance. | SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid WHERE T1.name IN (SELECT T1.name FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid WHERE T2.balance > (SELECT AVG(balance) FROM savings)) | spider |
CREATE TABLE table_name_85 (
tyre VARCHAR,
chassis VARCHAR
) | What tyre has a chassis of p57 p61? | SELECT tyre FROM table_name_85 WHERE chassis = "p57 p61" | sql_create_context |
CREATE TABLE table_72336 (
"Colt model no." text,
"Name" text,
"Stock" text,
"Fire control" text,
"Rear sight" text,
"Forward assist" text,
"Case deflector" text,
"Barrel length" text,
"Barrel profile" text,
"Barrel twist" text,
"Hand guards" text,
"Bayonet Lug" text,
... | What are the Colt model numbers of the models named GAU-5A/A, with no bayonet lug, no case deflector and stock of 2nd generation? | SELECT "Colt model no." FROM table_72336 WHERE "Bayonet Lug" = 'No' AND "Stock" = '2nd Generation' AND "Case deflector" = 'No' AND "Name" = 'GAU-5A/A' | wikisql |
CREATE TABLE table_68449 (
"Need" text,
"Being (qualities)" text,
"Having (things)" text,
"Doing (actions)" text,
"Interacting (settings)" text
) | Name the being qualities for having things of language, religions, work, customs, values, norms | SELECT "Being (qualities)" FROM table_68449 WHERE "Having (things)" = 'language, religions, work, customs, values, norms' | wikisql |
CREATE TABLE table_30018460_1 (
country_territory VARCHAR
) | How many first place participants where from croatia? | SELECT 3 AS rd_runner_up FROM table_30018460_1 WHERE country_territory = "Croatia" | 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... | 在00年2月11日到21年8月9日期间,因瘙痒症导致住院产生的平均费用在泌尿肿瘤科有多少 | SELECT AVG(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.MED_ORG_DEPT_NM = '泌尿肿瘤科' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-02-11' AND '2021-08-09' AND t_kc21.IN_DIAG_DIS_NM = '瘙痒症' AND t_kc21.CLINIC_TYPE = '住院' | css |
CREATE TABLE branch (
membership_amount INTEGER,
open_year VARCHAR,
city VARCHAR
) | Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London. | SELECT MIN(membership_amount), MAX(membership_amount) FROM branch WHERE open_year = 2011 OR city = 'London' | sql_create_context |
CREATE TABLE table_16457934_4 (
Id VARCHAR
) | what is the minimum of 60 -64? | SELECT MIN(60 AS _to_64) FROM table_16457934_4 | sql_create_context |
CREATE TABLE table_45280 (
"Series Number" real,
"Number of Episodes" real,
"Original Air Date" real,
"DVD Region 2 release date" text,
"DVD Region 1 release date" text
) | What was the original air date of series number 10? | SELECT AVG("Original Air Date") FROM table_45280 WHERE "Series Number" = '10' | wikisql |
CREATE TABLE table_name_8 (
tournament VARCHAR
) | Which 2007 has a 2006 of A, and a Tournament of canada? | SELECT 2007 FROM table_name_8 WHERE 2006 = "a" AND tournament = "canada" | sql_create_context |
CREATE TABLE table_203_98 (
id number,
"title" text,
"year" number,
"director" text,
"budget" text,
"gross (worldwide)" text,
"notes" text
) | did true romance make more or less money than diabolique ? | SELECT (SELECT "gross (worldwide)" FROM table_203_98 WHERE "title" = 'true romance') > (SELECT "gross (worldwide)" FROM table_203_98 WHERE "title" = 'diabolique') | squall |
CREATE TABLE table_2077192_2 (
italian VARCHAR,
english VARCHAR
) | What is the Italian word for the English word 'otter'? | SELECT italian FROM table_2077192_2 WHERE english = "otter" | sql_create_context |
CREATE TABLE Project_outcomes (
project_id VARCHAR
)
CREATE TABLE Project_Staff (
staff_id VARCHAR,
role_code VARCHAR,
project_id VARCHAR
)
CREATE TABLE Staff_Roles (
role_description VARCHAR,
role_code VARCHAR
) | Show the role description and the id of the project staff involved in most number of project outcomes? | SELECT T1.role_description, T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code = T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id = T3.project_id GROUP BY T2.staff_id ORDER BY COUNT(*) DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_name_94 (
date VARCHAR,
pole_position VARCHAR
) | Which Date has a Pole Position of michael devaney? | SELECT date FROM table_name_94 WHERE pole_position = "michael devaney" | sql_create_context |
CREATE TABLE table_name_46 (
to_par VARCHAR,
player VARCHAR
) | What is the to par that has jimmy hines as the player? | SELECT to_par FROM table_name_46 WHERE player = "jimmy hines" | sql_create_context |
CREATE TABLE table_55942 (
"Rank" real,
"Team" text,
"Floor Exercise" real,
"Pommel Horse" real,
"Rings" real,
"Vault" real,
"Parallel Bars" real,
"Horizontal Bar" real,
"Total" real
) | What is the sum of totals with a Vault of 38.437, and a Floor Exercise smaller than 37.524? | SELECT COUNT("Total") FROM table_55942 WHERE "Vault" = '38.437' AND "Floor Exercise" < '37.524' | wikisql |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
... | how many patients received glucose in the same hospital visit after the first ct scan - without contrast was performed since 5 years ago? | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'ct scan - without contrast' AND DATETIME(treatment.treatmenttime) >= DATE... | eicu |
CREATE TABLE stadium (
name VARCHAR
) | Which stadium name contains the substring 'Bank'? | SELECT name FROM stadium WHERE name LIKE "%Bank%" | sql_create_context |
CREATE TABLE table_22253 (
"Canton" text,
"Years of Kindergarten" real,
"Years of Kindergarten provided" text,
"Years of Kindergarten legally required" text,
"Length of Primary School" real,
"Length of mandatory Secondary School" real,
"Separate Secondary Schools?" text,
"Cooperative Sec... | Are there integrated secondary schools in Uri? | SELECT "Integrated Secondary Schools?" FROM table_22253 WHERE "Canton" = 'Uri' | wikisql |
CREATE TABLE table_74778 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the away team when the home team scored 10.8 (68)? | SELECT "Away team" FROM table_74778 WHERE "Home team score" = '10.8 (68)' | wikisql |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE date_day (
... | give me the flights on 12 27 with the fares from INDIANAPOLIS to ORLANDO | 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 AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AN... | atis |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype tex... | how many times did patient 22517 visit hospital until 2 years ago? | SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 22517 AND DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-2 year') | mimic_iii |
CREATE TABLE table_21436373_12 (
type_of_record VARCHAR,
result_games VARCHAR
) | what type of record was made where result/games is 10 games (29,606 avg.) | SELECT type_of_record FROM table_21436373_12 WHERE result_games = "10 games (29,606 avg.)" | sql_create_context |
CREATE TABLE table_41023 (
"City of license" text,
"Identifier" text,
"Frequency" text,
"Power" text,
"Class" text,
"RECNet" text
) | Which city has a C1 class and Identifier of CBCD-FM? | SELECT "City of license" FROM table_41023 WHERE "Class" = 'c1' AND "Identifier" = 'cbcd-fm' | wikisql |
CREATE TABLE table_21042 (
"Poll Source" text,
"Dates administered" text,
"Democrat: Vivian Davis Figures" text,
"Republican: Jeff Sessions" text,
"Lead Margin" real
) | On November 14, 2007, what are the Democrat: Vivian Davis Figures percentages? | SELECT "Democrat: Vivian Davis Figures" FROM table_21042 WHERE "Dates administered" = 'November 14, 2007' | wikisql |
CREATE TABLE table_7980 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | In which location was the method decision (split)? | SELECT "Location" FROM table_7980 WHERE "Method" = 'decision (split)' | wikisql |
CREATE TABLE table_63284 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"TV Time" text,
"Attendance" text
) | What is the time in week 3? | SELECT "TV Time" FROM table_63284 WHERE "Week" = '3' | wikisql |
CREATE TABLE table_name_84 (
home__2nd_leg_ VARCHAR
) | What was the 2nd leg score when atl tico tucum n played at home? | SELECT 2 AS nd_leg FROM table_name_84 WHERE home__2nd_leg_ = "atlético tucumán" | sql_create_context |
CREATE TABLE table_203_694 (
id number,
"#" number,
"name" text,
"took office" text,
"left office" text,
"party" text
) | which party had the most prime ministers ? | SELECT "party" FROM table_203_694 GROUP BY "party" ORDER BY COUNT("name") DESC LIMIT 1 | squall |
CREATE TABLE table_name_49 (
kaz_hayashi VARCHAR,
bushi VARCHAR
) | Name the Kaz Hayashi which has BUSHI of yang (9:43) | SELECT kaz_hayashi FROM table_name_49 WHERE bushi = "yang (9:43)" | sql_create_context |
CREATE TABLE table_name_56 (
genre VARCHAR,
year_recorded VARCHAR
) | What genre is the song recorded in 1926? | SELECT genre FROM table_name_56 WHERE year_recorded = "1926" | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | count the number of patients whose admission year is less than 2187 and lab test name is creatinine, urine? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2187" AND lab.label = "Creatinine, Urine" | mimicsql_data |
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 ... | show me the number of patients admitted before 2174 who have been diagnosed with ventricular septal defect. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2174" AND diagnoses.long_title = "Ventricular septal defect" | mimicsql_data |
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 ... | 在2016-11-12到2019-10-06期间,0731148医疗机构有多少次外地门诊就诊记录 | SELECT COUNT(*) FROM mzjzjlb WHERE YLJGDM = '0731148' AND JZKSRQ BETWEEN '2016-11-12' AND '2019-10-06' AND WDBZ > 0 | css |
CREATE TABLE table_25751274_2 (
rating VARCHAR,
share VARCHAR
) | What is the rating of the episode with a share of 4 and a rating/share (18-49) of 0.7/2? | SELECT rating FROM table_25751274_2 WHERE share = 4 AND rating / SHARE(18 - 49) = 0.7 / 2 | sql_create_context |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | Show me about the correlation between School_ID and ACC_Percent , and group by attribute Team_Name in a scatter chart. | SELECT School_ID, ACC_Percent FROM basketball_match GROUP BY Team_Name | nvbench |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE R... | close votes for particular tags. | SELECT p.Id, p.Id AS "post_link", p.CreationDate, p.Score, COUNT(PostHistory.Id) AS HistCount FROM Tags JOIN PostTags ON Tags.Id = PostTags.TagId JOIN Posts AS p ON p.Id = PostTags.PostId JOIN PostHistory ON PostHistory.PostId = p.Id WHERE Tags.TagName IN ('python') AND PostHistory.PostHistoryTypeId = 10 AND p.ClosedDa... | sede |
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... | which team gave up the most goals ? | SELECT "team\n(equipo)" FROM table_203_171 ORDER BY "goals conceded\n(gc)" DESC LIMIT 1 | squall |
CREATE TABLE table_78436 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What is the average Laps for a grid smaller than 17, and a Constructor of williams - bmw, driven by jenson button? | SELECT AVG("Laps") FROM table_78436 WHERE "Grid" < '17' AND "Constructor" = 'williams - bmw' AND "Driver" = 'jenson button' | wikisql |
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varch... | what flights on UA leave LGA for SAN JOSE and arrive around 10pm | SELECT DISTINCT flight.flight_id FROM airport, airport_service, city, flight WHERE (((flight.arrival_time <= 2230 AND flight.arrival_time >= 2130) AND city.city_code = airport_service.city_code AND city.city_name = 'SAN JOSE' AND flight.to_airport = airport_service.airport_code) AND airport.airport_code = 'LGA' AND fli... | atis |
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
) | For those records from the products and each product's manufacturer, visualize a scatter chart about the correlation between code and revenue , and group by attribute headquarter. | SELECT T1.Code, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | nvbench |
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
family_name VARCHAR(40)
)
CREATE TABLE Courses (
course_id INTEGER,
author_... | List each test result and its count in descending order of count by a pie chart. | SELECT test_result, COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_33425 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Stadium" text,
"Record" text,
"Box scores" text,
"Attendance" text
) | What is the date of the game later than week 13 and 41,862 people attended? | SELECT "Date" FROM table_33425 WHERE "Week" > '13' AND "Attendance" = '41,862' | wikisql |
CREATE TABLE table_59577 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
) | What is the score of the game with a tie no of 3? | SELECT "Score" FROM table_59577 WHERE "Tie no" = '3' | wikisql |
CREATE TABLE table_50210 (
"Opposing Team" text,
"Against" real,
"Date" text,
"Venue" text,
"Round" text
) | Which round was played in the H Venue on 29 january 1949? | SELECT "Round" FROM table_50210 WHERE "Venue" = 'h' AND "Date" = '29 january 1949' | wikisql |
CREATE TABLE table_10581 (
"Name" text,
"City" text,
"Height feet/m" text,
"Year" real,
"Period" text,
"Surpassed by" text
) | What was the period for 1896? | SELECT "Period" FROM table_10581 WHERE "Year" = '1896' | wikisql |
CREATE TABLE grapes (
id number,
grape text,
color text
)
CREATE TABLE wine (
no number,
grape text,
winery text,
appelation text,
state text,
name text,
year number,
price number,
score number,
cases number,
drink text
)
CREATE TABLE appellations (
no numbe... | What are the names and scores of wines that are made of white color grapes? | SELECT T2.name, T2.score FROM grapes AS T1 JOIN wine AS T2 ON T1.grape = T2.grape WHERE T1.color = "White" | spider |
CREATE TABLE table_25421463_1 (
races INTEGER
) | What is the fewest amount of races in any season? | SELECT MIN(races) FROM table_25421463_1 | sql_create_context |
CREATE TABLE endowment (
endowment_id number,
school_id number,
donator_name text,
amount number
)
CREATE TABLE budget (
school_id number,
year number,
budgeted number,
total_budget_percent_budgeted number,
invested number,
total_budget_percent_invested number,
budget_invest... | Show the names of donors who donated to both school 'Glenn' and 'Triton. | SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Glenn' INTERSECT SELECT T1.donator_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id WHERE T2.school_name = 'Triton' | spider |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE vitalperiodic (
vitalperio... | what is the hospital's maximum total cost when it includes cultures - urine in 2100? | SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'cultures - urine')) AND STRFTIME('%y', cost.... | eicu |
CREATE TABLE table_55829 (
"Episode" text,
"Airdate" text,
"Rating" real,
"Share" real,
"18-49 (Rating/Share)" text,
"Viewers (m)" real,
"Rank (#)" text
) | How many vieweres for the episode with a share of 1, a Rating larger than 0.7000000000000001, and a Rank (#) of 100/102? | SELECT "Viewers (m)" FROM table_55829 WHERE "Share" = '1' AND "Rating" > '0.7000000000000001' AND "Rank (#)" = '100/102' | wikisql |
CREATE TABLE table_77844 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What away team played against Footscray as the home team? | SELECT "Away team" FROM table_77844 WHERE "Home team" = 'footscray' | wikisql |
CREATE TABLE table_name_92 (
persian VARCHAR,
romani VARCHAR
) | What Persian word(s) has the same meaning as the Romani word duj? | SELECT persian FROM table_name_92 WHERE romani = "duj" | sql_create_context |
CREATE TABLE table_name_51 (
week INTEGER,
opponent VARCHAR
) | What is the highest week that has carolina panthers as the opponent? | SELECT MAX(week) FROM table_name_51 WHERE opponent = "carolina panthers" | sql_create_context |
CREATE TABLE table_name_32 (
centerfold_model VARCHAR,
date VARCHAR
) | Who was the Centerfold Model on 5-95? | SELECT centerfold_model FROM table_name_32 WHERE date = "5-95" | sql_create_context |
CREATE TABLE table_16537783_2 (
parameter VARCHAR
) | Name the 3rd stage for parameter of thrust | SELECT 3 AS rd_stage FROM table_16537783_2 WHERE parameter = "Thrust" | sql_create_context |
CREATE TABLE table_73253 (
"Locale" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
) | What is the pf for Rebecca Jean Macphee? | SELECT MIN("PF") FROM table_73253 WHERE "Skip" = 'Rebecca Jean MacPhee' | wikisql |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
econ... | fares from DALLAS to BALTIMORE | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_... | atis |
CREATE TABLE table_79162 (
"Year" real,
"Date" text,
"Home Team" text,
"Result" text,
"Visiting Team" text,
"Venue" text,
"Attendance" real
) | Who is the home team when the san francisco 49ers are visiting with a result of 42-14? | SELECT "Home Team" FROM table_79162 WHERE "Visiting Team" = 'san francisco 49ers' AND "Result" = '42-14' | wikisql |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE... | what is the minimum hospital cost involving a drug that is called 0.9% sodium chloride (mini bag plus)? | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = '0.9% sodium chloride (mini bag plus)') GROUP BY cost.hadm_id) AS t1 | mimic_iii |
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,... | 在08年1月22日到13年2月4日内患者26493101哪个医院是最常去的? | SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_ID = '26493101' AND IN_HOSP_DATE BETWEEN '2008-01-22' AND '2013-02-04' GROUP BY MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 | css |
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... | 在2005年11月3日到2007年9月11日期间患者张嘉惠就诊医生数有多少人? | SELECT COUNT(mzjzjlb.ZZYSGH) FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX ... | css |
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 insurance is private and procedure long title is coronary arteriography using a single catheter? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Coronary arteriography using a single catheter" | mimicsql_data |
CREATE TABLE table_60001 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What's the score of the t10 player from australia? | SELECT "Score" FROM table_60001 WHERE "Place" = 't10' AND "Country" = 'australia' | wikisql |
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
) | Count the number of captains that have each rank Visualize by bar chart, and show from low to high by the x axis please. | SELECT Rank, COUNT(*) FROM captain GROUP BY Rank ORDER BY Rank | nvbench |
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Apartment_Bookings (
apt_bookin... | Return the number of booking end dates for the apartments that have type code 'Duplex' for each year in a bar chart, rank by the Y-axis in ascending. | SELECT booking_end_date, COUNT(booking_end_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex" ORDER BY COUNT(booking_start_date) | nvbench |
CREATE TABLE table_74186 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Name the team for january 17 | SELECT "Team" FROM table_74186 WHERE "Date" = 'January 17' | 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 jyjgzbb (
BGDH text,
BGRQ tim... | 需要查看04251278145这个检验报告出报告单的年、月、日 | SELECT zyjybgb.BGRQ FROM zyjybgb WHERE zyjybgb.BGDH = '04251278145' UNION SELECT mzjybgb.BGRQ FROM mzjybgb WHERE mzjybgb.BGDH = '04251278145' | css |
CREATE TABLE table_17288869_7 (
high_points VARCHAR,
high_rebounds VARCHAR
) | Who had the high points while Dirk Nowitzki (13) had the high rebounds? | SELECT high_points FROM table_17288869_7 WHERE high_rebounds = "Dirk Nowitzki (13)" | sql_create_context |
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... | 在18年9月23日到2021年10月29日内病患93673084的有多少检验结果指标记录的检测人为窦虹雨的检验指标流水号? | SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJ... | css |
CREATE TABLE table_203_198 (
id number,
"season" text,
"series" text,
"team" text,
"races" number,
"wins" number,
"poles" number,
"fast laps" number,
"points" number,
"pos." text
) | what is the only series listed in 2007-2008 ? | SELECT "series" FROM table_203_198 WHERE "season" = '2007-08' | squall |
CREATE TABLE table_65023 (
"Rank" real,
"Athletes" text,
"Country" text,
"Time" text,
"Notes" text
) | What is the rank of Manuel Cortina Mart nez? | SELECT "Rank" FROM table_65023 WHERE "Athletes" = 'manuel cortina martínez' | wikisql |
CREATE TABLE table_2064747_1 (
location_s_ VARCHAR,
founded VARCHAR
) | Where was there a school founded in 1927? | SELECT location_s_ FROM table_2064747_1 WHERE founded = 1927 | sql_create_context |
CREATE TABLE table_22701 (
"Album#" text,
"English Title" text,
"Chinese (Traditional)" text,
"Chinese (Simplified)" text,
"Release date" text,
"Label" text
) | Name the chinese traditional for | SELECT "Chinese (Traditional)" FROM table_22701 WHERE "Chinese (Simplified)" = '美丽人生' | wikisql |
CREATE TABLE table_20010140_10 (
high_points VARCHAR,
date VARCHAR
) | how many high points where date is february 19 | SELECT COUNT(high_points) FROM table_20010140_10 WHERE date = "February 19" | sql_create_context |
CREATE TABLE table_204_780 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
) | in what competition did this competitor place the same as he did at the 1984 olympic games ? | SELECT "competition" FROM table_204_780 WHERE "year" <> 1984 AND "position" = (SELECT "position" FROM table_204_780 WHERE "year" = 1984) | squall |
CREATE TABLE table_name_36 (
method VARCHAR,
time VARCHAR,
opponent VARCHAR
) | What method had Adriano Martins as an opponent and a time of 5:00? | SELECT method FROM table_name_36 WHERE time = "5:00" AND opponent = "adriano martins" | sql_create_context |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
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,
... | Bar chart x axis meter 500 y axis meter_100 | SELECT meter_500, meter_100 FROM swimmer | nvbench |
CREATE TABLE table_name_22 (
points INTEGER,
year VARCHAR,
chassis VARCHAR
) | What is the most points earlier than 1953 with a Ferrari 375/50 chassis? | SELECT MAX(points) FROM table_name_22 WHERE year < 1953 AND chassis = "ferrari 375/50" | sql_create_context |
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 ... | 检验报告单11288812225的具体日期为何年?何月?何日 | SELECT BGRQ FROM jybgb WHERE BGDH = '11288812225' | css |
CREATE TABLE table_68541 (
"2001" text,
"2004" text,
"2009" text,
"2013" text,
"Total" real
) | What is the total of 2013 with 6th? | SELECT MAX("Total") FROM table_68541 WHERE "2013" = '6th' | wikisql |
CREATE TABLE table_53287 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What is the smallest grid for driver of juan pablo montoya? | SELECT MIN("Grid") FROM table_53287 WHERE "Driver" = 'juan pablo montoya' | wikisql |
CREATE TABLE table_name_9 (
local_affairs VARCHAR,
year VARCHAR
) | Who was in local affairs in 2012-2013? | SELECT local_affairs FROM table_name_9 WHERE year = "2012-2013" | sql_create_context |
CREATE TABLE gwyjzb (
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,
... | 患者华文星在医院5083153中做的出院诊断中包含阿片类的疾病名的医疗就诊记录编号有哪些 | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '华文星' AND gwyjzb.MED_SER_ORG_NO = '5083153' AND gwyjzb.OUT_DIAG_DIS_NM LIKE '%阿片类%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '华文星' AND fgwyjzb.MED_SER_ORG_NO = '5083153' AND fgwyjzb.OUT_DIAG_DIS_NM LIKE '%阿片类%' | css |
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_offi... | How many parties of the time they left office, binning the left office time into Year interval, and then split by the minister's name, sort in desc by the y-axis. | SELECT Left_office, COUNT(Left_office) FROM party GROUP BY Minister ORDER BY COUNT(Left_office) DESC | nvbench |
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... | how many patients stayed in hospital for more than 6 days and were diagnosed with orthostatic hypertension? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "6" AND diagnoses.short_title = "Orthostatic hypotension" | mimicsql_data |
CREATE TABLE table_73520 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | Name the least game for january 29 | SELECT MIN("Game") FROM table_73520 WHERE "Date" = 'January 29' | wikisql |
CREATE TABLE table_name_30 (
perigee__km_ INTEGER,
launch_date VARCHAR
) | What is the lowest Perigee with a Launch date of 1970-08-26? | SELECT MIN(perigee__km_) FROM table_name_30 WHERE launch_date = "1970-08-26" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.