instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_99 (
total INTEGER,
rank VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the least total number with a rank of 4 and a total silver number bigger than 3?
| SELECT MIN(total) FROM table_name_99 WHERE rank = 4 AND silver > 3 | 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,
... | SELECT gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '61021790' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 5648.4) UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '61021790' AND... | css |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT PHONE_NUMBER, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER | nvbench |
CREATE TABLE table_204_402 (
id number,
"rank" number,
"player" text,
"from" text,
"to" text,
"transfer fee\n(\u20ac million)" number,
"year" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the difference between rank 5 and rank 11 ... | SELECT ABS((SELECT "transfer fee\n(\u20ac million)" FROM table_204_402 WHERE "rank" = 5) - (SELECT "transfer fee\n(\u20ac million)" FROM table_204_402 WHERE "rank" = 11)) | squall |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostHistoryTypes (
Id number,
... | SELECT * FROM Tags WHERE Count = 1 | sede |
CREATE TABLE table_7484 (
"Name" text,
"Start of Reign" real,
"End of Reign" text,
"Birth Name" text,
"Title" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Title's Start of Reign is 1993?
| SELECT "Title" FROM table_7484 WHERE "Start of Reign" = '1993' | wikisql |
CREATE TABLE table_name_68 (
builder VARCHAR,
order_year VARCHAR,
fuel_propulsion VARCHAR,
model VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which builder has a Fuel Propulsion of diesel, a Model of d40lf, and an Order Year of 2005?
| SELECT builder FROM table_name_68 WHERE fuel_propulsion = "diesel" AND model = "d40lf" AND order_year = "2005" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "WIDOWED" AND lab.fluid = "Blood" | mimicsql_data |
CREATE TABLE table_33406 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" text,
"Finish" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What chassis was used with the Chevrolet engine in 1991?
| SELECT "Chassis" FROM table_33406 WHERE "Engine" = 'chevrolet' AND "Year" = '1991' | wikisql |
CREATE TABLE table_8202 (
"Team" text,
"Head coach" text,
"Team captain" text,
"Kitmaker" text,
"Shirt sponsor" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the head coach for the team, arminia bielefeld?
| SELECT "Head coach" FROM table_8202 WHERE "Team" = 'arminia bielefeld' | wikisql |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TAB... | SELECT diagnosis.diagnosistime FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-62367')) AND diagnosis.diagnosisname = 'leukocytosis' ORDER B... | eicu |
CREATE TABLE table_58304 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which driver has 62 laps?
| SELECT "Driver" FROM table_58304 WHERE "Laps" = '62' | wikisql |
CREATE TABLE table_name_83 (
gold INTEGER,
nation VARCHAR,
bronze VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Turkey's lowest gold when there were less than 2 bronze?
| SELECT MIN(gold) FROM table_name_83 WHERE nation = "turkey" AND bronze < 2 | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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,
... | (SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '奚妮娜' AND NOT... | css |
CREATE TABLE table_54825 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did essendon play away?
| SELECT "Date" FROM table_54825 WHERE "Away team" = 'essendon' | wikisql |
CREATE TABLE table_name_58 (
system VARCHAR,
current_version VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the System with the Current version 3.0.0?
| SELECT system FROM table_name_58 WHERE current_version = "3.0.0" | sql_create_context |
CREATE TABLE table_57018 (
"Date" text,
"Course" text,
"Distance" text,
"Type" text,
"Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type has rest day as a course and was on 21 may?
| SELECT "Type" FROM table_57018 WHERE "Course" = 'rest day' AND "Date" = '21 may' | wikisql |
CREATE TABLE table_16278349_1 (
language VARCHAR,
province VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the language for kunar
| SELECT language FROM table_16278349_1 WHERE province = "Kunar" | sql_create_context |
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 number,
appelation text,
county text,
state text,
area text,... | SELECT winery FROM wine ORDER BY score LIMIT 1 | spider |
CREATE TABLE table_54647 (
"Event" text,
"Data" text,
"Athlete" text,
"Date" text,
"Place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has a walking data of 3:10:48+?
| SELECT "Athlete" FROM table_54647 WHERE "Data" = '3:10:48+' | wikisql |
CREATE TABLE table_name_96 (
gold INTEGER,
bronze INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which is the highest gold that has a bronze greater than 4?
| SELECT MAX(gold) FROM table_name_96 WHERE bronze > 4 | sql_create_context |
CREATE TABLE table_name_23 (
surface VARCHAR,
score_in_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Surface, when Score in Final is 3-6, 6-3, 6-2?
| SELECT surface FROM table_name_23 WHERE score_in_final = "3-6, 6-3, 6-2" | sql_create_context |
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... | SELECT DISTINCT u.DisplayName, CONCAT('https://stackoverflow.com/users/', u.Id) AS "profile_link", u.Location, u.AboutMe, u.Reputation FROM Users AS u, Posts AS q, Posts AS a WHERE u.Id = a.OwnerUserId AND a.ParentId = q.Id AND a.PostTypeId = 2 AND q.Tags LIKE '%apex%' AND q.PostTypeId = 1 ORDER BY u.Reputation DESC | sede |
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... | SELECT All_Home, SUM(School_ID) FROM basketball_match GROUP BY All_Home | nvbench |
CREATE TABLE table_name_87 (
date VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date did Hawthorn play as the away team?
| SELECT date FROM table_name_87 WHERE away_team = "hawthorn" | sql_create_context |
CREATE TABLE table_27723526_10 (
score VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the game against portland?
| SELECT score FROM table_27723526_10 WHERE team = "Portland" | sql_create_context |
CREATE TABLE table_5835 (
"Round" real,
"Selection" text,
"Name" text,
"Position" text,
"College" text,
"Contract" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position does the College of Louisiana State have?
| SELECT "Position" FROM table_5835 WHERE "College" = 'louisiana state' | wikisql |
CREATE TABLE fzzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZD... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester = 'Spring' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
CREATE TABLE table_63544 (
"Children of Earth" text,
"Run time" text,
"Writer" text,
"Director" text,
"Original airdate" text,
"Viewers (including HD) in millions" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many viewers were there for Ch... | SELECT "Viewers (including HD) in millions" FROM table_63544 WHERE "Children of Earth" = 'day one' | 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
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Gemfibrozil" | mimicsql_data |
CREATE TABLE table_name_92 (
tourist_arrivals__2011___millions_ INTEGER,
tourism_competitiveness__2011___ttci_ VARCHAR,
tourism_receipts__2011___us$_per_arrival_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest tourism arrivals in 2011 ... | SELECT MAX(tourist_arrivals__2011___millions_) FROM table_name_92 WHERE tourism_competitiveness__2011___ttci_ = "3.82" AND tourism_receipts__2011___us$_per_arrival_ > 1 OFFSET 102 | sql_create_context |
CREATE TABLE table_name_92 (
rank INTEGER,
matches VARCHAR,
goals VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average rank for players with under 205 matches and under 100 goals?
| SELECT AVG(rank) FROM table_name_92 WHERE matches < 205 AND goals < 100 | sql_create_context |
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID DESC | nvbench |
CREATE TABLE table_52617 (
"Club" text,
"Premier League" text,
"Championship/First Division" text,
"League One/Second Division" text,
"League Two/Third Division" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the league one/second division fo... | SELECT "League One/Second Division" FROM table_52617 WHERE "Club" = 'millwall' | wikisql |
CREATE TABLE table_name_91 (
required_os VARCHAR,
developer_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the minimum operating system required by Stunlock Studios' game?
| SELECT required_os FROM table_name_91 WHERE developer_s_ = "stunlock studios" | sql_create_context |
CREATE TABLE table_70311 (
"Classification" text,
"Fastest time (s)" real,
"Athlete" text,
"Country" text,
"Date" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location of Classification of T12?
| SELECT "Location" FROM table_70311 WHERE "Classification" = 't12' | wikisql |
CREATE TABLE table_name_66 (
females VARCHAR,
language VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of females that has the Polish language?
| SELECT females FROM table_name_66 WHERE language = "polish" | sql_create_context |
CREATE TABLE table_51996 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the home team at VFL Park?
| SELECT "Home team" FROM table_51996 WHERE "Venue" = 'vfl park' | wikisql |
CREATE TABLE table_52718 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number in attendance for when the bulls visit... | SELECT COUNT("Attendance") FROM table_52718 WHERE "Visitor" = 'bulls' | 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... | SELECT zyjzjlb.JZKSDM, zyjzjlb.JZKSMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '74562535279' | css |
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate re... | SELECT Name, Weight FROM people | nvbench |
CREATE TABLE table_4549 (
"Team" text,
"Chassis" text,
"Engine" text,
"Tyre" text,
"Drivers" text,
"Races" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What engine did Casey Mears use on the Reynard 01i Chassis?
| SELECT "Engine" FROM table_4549 WHERE "Chassis" = 'reynard 01i' AND "Drivers" = 'casey mears' | wikisql |
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 lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND procedures.long_title = "Central venous catheter placement with guidance" | mimicsql_data |
CREATE TABLE table_name_28 (
location_attendance VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What location has an attendance and a score of l 90 91 (ot)?
| SELECT location_attendance FROM table_name_28 WHERE score = "l 90–91 (ot)" | sql_create_context |
CREATE TABLE table_43460 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the attendance when the opponent is the San Francisco 49ers?
| SELECT "Attendance" FROM table_43460 WHERE "Opponent" = 'san francisco 49ers' | wikisql |
CREATE TABLE table_name_8 (
team VARCHAR,
chassis VARCHAR,
champion VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team, with champion Bastian Kolmsee, used a Dallara f302 for the chassis?
| SELECT team FROM table_name_8 WHERE chassis = "dallara f302" AND champion = "bastian kolmsee" | sql_create_context |
CREATE TABLE shop (
shop_id VARCHAR,
address VARCHAR,
score INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the id and address of the shops whose score is below the average score.
| SELECT shop_id, address FROM shop WHERE score < (SELECT AVG(score) FROM shop) | sql_create_context |
CREATE TABLE table_39549 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many total gold medals did India receive?
| SELECT "Gold" FROM table_39549 WHERE "Nation" = 'india' | wikisql |
CREATE TABLE table_name_18 (
long INTEGER,
player VARCHAR,
avg VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average long that Ramon Richardson played and an average greater than 5.5?
| SELECT AVG(long) FROM table_name_18 WHERE player = "ramon richardson" AND avg > 5.5 | sql_create_context |
CREATE TABLE game (
stadium_id int,
id int,
Season int,
Date text,
Home_team text,
Away_team text,
Score text,
Competition text
)
CREATE TABLE stadium (
id int,
name text,
Home_Games int,
Average_Attendance real,
Total_Attendance real,
Capacity_Percentage real
)
... | SELECT Home_team, COUNT(Home_team) FROM game GROUP BY Home_team ORDER BY COUNT(Home_team) | nvbench |
CREATE TABLE table_name_83 (
country VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country is Relax-Gam from?
| SELECT country FROM table_name_83 WHERE team = "relax-gam" | sql_create_context |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
sh... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', icustays.intime)) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 95057) AND icustays.outtime IS NULL | mimic_iii |
CREATE TABLE table_name_99 (
position VARCHAR,
pick__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Position has a Pick # of 18?
| SELECT position FROM table_name_99 WHERE pick__number = 18 | sql_create_context |
CREATE TABLE table_15122 (
"Date" text,
"Home captain" text,
"Away captain" text,
"Venue" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When has a Venue of Adelaide Oval?
| SELECT "Date" FROM table_15122 WHERE "Venue" = 'adelaide oval' | wikisql |
CREATE TABLE table_52496 (
"Block A" text,
"BLACK BUSHI" text,
"BUSHI" text,
"Kaz Hayashi" text,
"Kenny Omega" text,
"Minoru" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the BUSHI when it has kenny omega of yang (7:27)
| SELECT "BUSHI" FROM table_52496 WHERE "Kenny Omega" = 'yang (7:27)' | wikisql |
CREATE TABLE table_3465 (
"Player" text,
"Number Of Selections" real,
"First Team" real,
"Second Team" real,
"Season MVP" real,
"Final Four MVP" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- when number of selection is 2 and first team is 1 who... | SELECT "Player" FROM table_3465 WHERE "First Team" = '1' AND "Number Of Selections" = '2' | wikisql |
CREATE TABLE table_name_11 (
females VARCHAR,
language VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many females speak Ukrainian?
| SELECT females FROM table_name_11 WHERE language = "ukrainian" | sql_create_context |
CREATE TABLE company (
Company_ID int,
Rank int,
Company text,
Headquarters text,
Main_Industry text,
Sales_billion real,
Profits_billion real,
Assets_billion real,
Market_Value real
)
CREATE TABLE gas_station (
Station_ID int,
Open_Year int,
Location text,
Manager_N... | SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters | nvbench |
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 lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Pure hypercholesterolemia" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_name_60 (
percent_of_slovenes_1951 VARCHAR,
number_of_people_1991 VARCHAR,
village__german_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Percent of Slovenes 1951 has a Number of people 1991 larger than 8, and a Village (German)... | SELECT percent_of_slovenes_1951 FROM table_name_60 WHERE number_of_people_1991 > 8 AND village__german_ = "plöschenberg" | sql_create_context |
CREATE TABLE table_name_34 (
year INTEGER,
pts VARCHAR,
entrant VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year did Ecurie Bleue score more than 0 points?
| SELECT AVG(year) FROM table_name_34 WHERE pts > 0 AND entrant = "ecurie bleue" | sql_create_context |
CREATE TABLE table_9235 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the game with 62 points?
| SELECT "Date" FROM table_9235 WHERE "Points" = '62' | wikisql |
CREATE TABLE bdmzjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH number,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZD... | SELECT jybgb.KSBM, jybgb.KSMC 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 = '60923283' AND jybgb.BGRQ BETWEEN '2002-07-29' AND '2003-... | css |
CREATE TABLE table_46319 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Points difference" text,
"Bonus Points" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What i... | SELECT "Points for" FROM table_46319 WHERE "Points against" = '571' | 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... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '44192397' AND t_kc22.STA_DATE BETWEEN '2016-04-29' AND '2016-04-30' AND t_kc22.SOC_SRT_DIRE_CD = '130906139' | css |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
a... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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-13... | eicu |
CREATE TABLE Organisations (
organisation_id VARCHAR,
organisation_type VARCHAR
)
CREATE TABLE organisation_Types (
organisation_type VARCHAR,
organisation_type_description VARCHAR
)
CREATE TABLE Grants (
organisation_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tab... | SELECT SUM(grant_amount) FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id = T2.organisation_id JOIN organisation_Types AS T3 ON T2.organisation_type = T3.organisation_type WHERE T3.organisation_type_description = 'Research' | sql_create_context |
CREATE TABLE table_71325 (
"Club" text,
"League" text,
"Sport" text,
"Venue" text,
"Established" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What League of VSL Sport was Established in 1935?
| SELECT "Sport" FROM table_71325 WHERE "Established" = '1935' AND "League" = 'vsl' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "E9530" AND lab."CATEGORY" = "Hematology" | mimicsql_data |
CREATE TABLE table_name_34 (
version VARCHAR,
developer VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Version has a Developer of dino games, and a Title of metronome?
| SELECT version FROM table_name_34 WHERE developer = "dino games" AND title = "metronome" | sql_create_context |
CREATE TABLE table_34004 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Surface has a Date of 16 november 2007?
| SELECT "Surface" FROM table_34004 WHERE "Date" = '16 november 2007' | wikisql |
CREATE TABLE table_name_29 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What in 2013 has a 2009 of 3r?
| SELECT 2013 FROM table_name_29 WHERE 2009 = "3r" | sql_create_context |
CREATE TABLE table_18600760_10 (
geo_id INTEGER,
county VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the geo id for Logan county?
| SELECT MAX(geo_id) FROM table_18600760_10 WHERE county = "Logan" | sql_create_context |
CREATE TABLE table_name_85 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What shows for 2002 when 2010 shows 69?
| SELECT 2002 FROM table_name_85 WHERE 2010 = "69" | sql_create_context |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '99198987' AND t_kc22.STA_DATE BETWEEN '2013-05-27' AND '2021-01-31' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
CREATE TABLE Problem_Status_Codes (
problem_status_code VARCHAR(20),
problem_status_description VARCHAR(80)
)
CREATE TABLE Problems (
problem_id INTEGER,
product_id INTEGER,
closure_authorised_by_staff_id INTEGER,
reported_by_staff_id INTEGER,
date_problem_reported DATETIME,
date_proble... | SELECT log_entry_description, COUNT(log_entry_description) FROM Problem_Log GROUP BY log_entry_description ORDER BY COUNT(log_entry_description) | nvbench |
CREATE TABLE table_23119 (
"Fleet #" text,
"Year" real,
"Manufacture" text,
"Model" text,
"Length (ft)" real,
"Engine" text,
"Transmission" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fleet number when the transmission is Voit... | SELECT "Fleet #" FROM table_23119 WHERE "Transmission" = 'Voith D863.4' AND "Engine" = 'Cummins ISL' | wikisql |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT MAX(t2.TagName) AS LeftTag, MAX(t.TagName) AS RightTag, COUNT(pt2.TagId) AS LeftCount, MAX(t.Count) AS RightCount, (CAST(COUNT(pt2.TagId) AS FLOAT) / CAST(MAX(t.Count) AS FLOAT)) AS Per FROM PostTags AS pt JOIN PostTags AS pt2 ON pt.PostId = pt2.PostId JOIN Tags AS t ON pt.TagId = t.Id JOIN Tags AS t2 ON pt2.Tag... | sede |
CREATE TABLE table_55193 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team plays at Punt Road Oval?
| SELECT "Home team" FROM table_55193 WHERE "Venue" = 'punt road oval' | wikisql |
CREATE TABLE table_2252 (
"Date" text,
"Location" text,
"Discipline" text,
"Winner" text,
"2nd place" text,
"3rd place" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won the cup on 30.11.2008?
| SELECT "Winner" FROM table_2252 WHERE "Date" = '30.11.2008' | wikisql |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
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 nu... | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JYZBLSH AND jybgb_jyjgzbb.jyjgzbb_id ... | css |
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 prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND demographic.dob_year < "2120" | mimicsql_data |
CREATE TABLE table_68776 (
"Name" text,
"Street Address" text,
"Years as tallest" text,
"Height ft / m" text,
"Floors" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- During what years did the tallest building, located at 211 Union Street, have less ... | SELECT "Years as tallest" FROM table_68776 WHERE "Floors" < '31' AND "Street Address" = '211 union street' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "5180" AND lab.flag = "abnormal" | mimicsql_data |
CREATE TABLE table_203_523 (
id number,
"state" text,
"swimsuit" number,
"interview" number,
"evening gown" number,
"average" number,
"finalists" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who scored the highest in the swimsuit round ?... | SELECT "state" FROM table_203_523 ORDER BY "swimsuit" DESC LIMIT 1 | squall |
CREATE TABLE affected_region (
region_id number,
storm_id number,
number_city_affected number
)
CREATE TABLE storm (
storm_id number,
name text,
dates_active text,
max_speed number,
damage_millions_usd number,
number_deaths number
)
CREATE TABLE region (
region_id number,
r... | SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id WHERE T2.region_name = 'Afghanistan' INTERSECT SELECT T3.name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id JOIN storm AS T3 ON T1.storm_id = T3.storm_id... | spider |
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_icd_diagnoses (
row_id number,
icd9_code text,
sh... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 427... | mimic_iii |
CREATE TABLE table_name_8 (
change__12_11_ VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the city is agadir what is the change (12/11)?
| SELECT change__12_11_ FROM table_name_8 WHERE city = "agadir" | sql_create_context |
CREATE TABLE table_name_66 (
result VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Result on October 27, 2002?
| SELECT result FROM table_name_66 WHERE date = "october 27, 2002" | sql_create_context |
CREATE TABLE table_13026799_3 (
scoring_average VARCHAR,
money_list_rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of scoring average for money list rank of 174
| SELECT COUNT(scoring_average) FROM table_13026799_3 WHERE money_list_rank = "174" | sql_create_context |
CREATE TABLE table_name_26 (
home_team VARCHAR,
road_team VARCHAR,
game VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which home team played against Los Angeles in game 1?
| SELECT home_team FROM table_name_26 WHERE road_team = "los angeles" AND game = "game 1" | sql_create_context |
CREATE TABLE table_3005999_1 (
provider VARCHAR,
destination VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are all providers with destination of Liverpool?
| SELECT provider FROM table_3005999_1 WHERE destination = "Liverpool" | sql_create_context |
CREATE TABLE table_name_46 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What shows for 2002 when the 1991 is w?
| SELECT 2002 FROM table_name_46 WHERE 1991 = "w" | 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
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Code DESC | nvbench |
CREATE TABLE table_name_58 (
overall INTEGER,
school_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is arizona state overall lowest?
| SELECT MIN(overall) FROM table_name_58 WHERE school_club_team = "arizona state" | sql_create_context |
CREATE TABLE table_name_13 (
name VARCHAR,
number VARCHAR,
season VARCHAR,
acquisition_via VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the player for the 2010-2011 season, from a Free Agency and is Number 14?
| SELECT name FROM table_name_13 WHERE season = "2010-2011" AND acquisition_via = "free agency" AND number = "14" | sql_create_context |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '66859587' AND t_kc22.STA_DATE BETWEEN '2013-08-16' AND '2014-03-07' AND t_kc22.SELF_PAY_AMO > 2896.1 | css |
CREATE TABLE table_16446652_1 (
season VARCHAR,
president VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was Jonny Leadbeater President?
| SELECT season FROM table_16446652_1 WHERE president = "Jonny Leadbeater" | sql_create_context |
CREATE TABLE table_31443 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who directed the episdoe veiwed by... | SELECT "Directed by" FROM table_31443 WHERE "Viewers (million)" = '3.24' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.