instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
... | SELECT Text FROM PostHistory WHERE PostId = '##PostId:int##' | sede |
CREATE TABLE table_49111 (
"Date" text,
"Home team" text,
"Score" text,
"Away team" text,
"Venue" text,
"Crowd" real,
"Box Score" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times is the home team wollongong ha... | SELECT COUNT("Crowd") FROM table_49111 WHERE "Home team" = 'wollongong hawks' | wikisql |
CREATE TABLE table_33525 (
"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.
-- What is the home team's score at glenferrie oval... | SELECT "Home team score" FROM table_33525 WHERE "Venue" = 'glenferrie oval' | wikisql |
CREATE TABLE table_39681 (
"Year" text,
"Title" text,
"Role" text,
"Language" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which title is in Portuguese?
| SELECT "Title" FROM table_39681 WHERE "Language" = 'portuguese' | wikisql |
CREATE TABLE table_59691 (
"Tournament" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"1995" text,
"1996" text,
"1997" text,
"1998" text,
"Career SR" text,
"Career Win-Loss" text
)
-- Using valid SQLite, answer the following questions for the ta... | SELECT "Career SR" FROM table_59691 WHERE "1996" = 'a' AND "Tournament" = 'madrid (stuttgart)' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.gender = "M" | mimicsql_data |
CREATE TABLE table_49145 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the time of the match with a record of 9-0... | SELECT "Time" FROM table_49145 WHERE "Method" = 'tko (doctor stoppage)' AND "Record" = '9-0' | wikisql |
CREATE TABLE table_name_30 (
top_5 INTEGER,
wins INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest top 5 winners with less than 0?
| SELECT MIN(top_5) FROM table_name_30 WHERE wins < 0 | sql_create_context |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate ti... | SELECT ROW_NUMBER() OVER (ORDER BY Users.Reputation DESC) AS "#", Users.Id AS "user_link", Users.Age, Users.Location, Users.Reputation, Users.UpVotes FROM Users WHERE LOWER(Location) LIKE LOWER('%India%') OR LOWER(Location) LIKE '%Mumbai%' OR LOWER(Location) LIKE '%Trivandrum%' ORDER BY Reputation DESC LIMIT 4000 | sede |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description t... | SELECT Id FROM Users WHERE DisplayName = '##DisplayName##' | sede |
CREATE TABLE table_79359 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the tie no for the away team altrincham?
| SELECT "Tie no" FROM table_79359 WHERE "Away team" = 'altrincham' | wikisql |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
E... | SELECT c.UserId AS "user_link", COUNT(c.PostId) AS "comment_count", COUNT(DISTINCT c.PostId) AS "post_count" FROM Comments AS c JOIN Posts AS p ON c.PostId = p.Id WHERE p.OwnerUserId = '##UserId##' AND c.UserId != '##UserId##' GROUP BY c.UserId ORDER BY COUNT(DISTINCT c.PostId) DESC, COUNT(c.PostId) DESC | sede |
CREATE TABLE table_36248 (
"Rank by average" real,
"Place" real,
"Couple" text,
"Total" real,
"Number of dances" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Average is the lowest one that has a Total smaller than 134, an... | SELECT MIN("Average") FROM table_36248 WHERE "Total" < '134' AND "Number of dances" < '3' AND "Rank by average" < '12' | wikisql |
CREATE TABLE table_40764 (
"Season" real,
"Venue" text,
"Teams" real,
"Drivers" real,
"Champion" text,
"Second" text,
"Third" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country came in third when there were 13 teams in 1996?
| SELECT "Third" FROM table_40764 WHERE "Teams" = '13' AND "Season" = '1996' | wikisql |
CREATE TABLE table_28056 (
"Release" text,
"# of discs" real,
"Region 1" text,
"Region 2" text,
"Region 4" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many DVDs where were in the complete collection series 1-8 with extras?
| SELECT "# of discs" FROM table_28056 WHERE "Release" = 'The Complete Collection Series 1-8 with extras' | wikisql |
CREATE TABLE table_name_42 (
series__number INTEGER,
directed_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average of the Series #s that were directed by Matthew Penn?
| SELECT AVG(series__number) FROM table_name_42 WHERE directed_by = "matthew penn" | sql_create_context |
CREATE TABLE table_72409 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many were first elected in the Arkansas 4 district?
| SELECT COUNT("First elected") FROM table_72409 WHERE "District" = 'Arkansas 4' | wikisql |
CREATE TABLE table_name_72 (
score VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score on 2 October 2011?
| SELECT score FROM table_name_72 WHERE date = "2 october 2011" | sql_create_context |
CREATE TABLE table_name_30 (
score VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the game that had a result of 5 0?
| SELECT score FROM table_name_30 WHERE result = "5–0" | sql_create_context |
CREATE TABLE table_name_93 (
ends INTEGER,
since VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Ends with a Since of 2003, and a Name with m rquez?
| SELECT AVG(ends) FROM table_name_93 WHERE since = 2003 AND name = "márquez" | sql_create_context |
CREATE TABLE table_train_11 (
"id" int,
"pregnancy_or_lactation" bool,
"severe_sepsis" bool,
"active_infection" bool,
"heart_disease" bool,
"body_weight" float,
"septic_shock" bool,
"serum_aminotransferase_level_alt_ast" int,
"NOUSE" float
)
-- Using valid SQLite, answer the follow... | SELECT * FROM table_train_11 WHERE serum_aminotransferase_level_alt_ast > 112 | criteria2sql |
CREATE TABLE table_32582 (
"Round" real,
"Overall" real,
"Player" text,
"Position" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest overall rank for a center drafted before round 10?
| SELECT MAX("Overall") FROM table_32582 WHERE "Position" = 'center' AND "Round" < '10' | wikisql |
CREATE TABLE table_10179 (
"Role" text,
"Original Broadway production" text,
"First US National Tour" text,
"Second US National Tour" text,
"Original Italian production" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Role has a First US Nation... | SELECT "Role" FROM table_10179 WHERE "First US National Tour" = 'roger bart' | wikisql |
CREATE TABLE sqlite_sequence (
name text,
seq text
)
CREATE TABLE invoices (
id number,
customer_id number,
invoice_date time,
billing_address text,
billing_city text,
billing_state text,
billing_country text,
billing_postal_code text,
total number
)
CREATE TABLE invoice_li... | SELECT billing_state, COUNT(*) FROM invoices WHERE billing_country = "USA" GROUP BY billing_state | spider |
CREATE TABLE table_4258 (
"Name" text,
"Family name" text,
"Receptor" text,
"Coreceptor" text,
"Property" text,
"Chromosomal location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which chromosomes have an unknown property?
| SELECT "Name" FROM table_4258 WHERE "Property" = 'Unknown' | wikisql |
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 (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "15" AND lab.label = "Homocysteine" | mimicsql_data |
CREATE TABLE table_203_593 (
id number,
"tenure" text,
"coach" text,
"years" number,
"record" text,
"pct." number,
"ncaa tournament" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was coach before porter grant ?
| SELECT "coach" FROM table_203_593 WHERE "tenure" < (SELECT "tenure" FROM table_203_593 WHERE "coach" = 'porter grant') ORDER BY "tenure" DESC LIMIT 1 | squall |
CREATE TABLE table_76258 (
"Date From" text,
"Date To" text,
"Position" text,
"Name" text,
"From" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date did Toumani Diagouraga, who played position MF, start?
| SELECT "Date From" FROM table_76258 WHERE "Position" = 'mf' AND "Name" = 'toumani diagouraga' | wikisql |
CREATE TABLE mzjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
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,
... | SELECT COUNT(*) FROM (SELECT zyjybgb.KSBM FROM mzjzjlb JOIN zyjybgb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '0889574' AND zyjybgb.BGRQ BETWEEN '2000-11-03' AND '2012-11-14' GROUP BY zyjybgb.KSBM HAVING COUNT(*) >= 15 UNION SELECT mzjybgb.KSBM FROM mzjz... | css |
CREATE TABLE table_24096 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Wildcats points" real,
"Opponents" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of the game against Mississippi State?... | SELECT "Result" FROM table_24096 WHERE "Opponent" = 'Mississippi State' | wikisql |
CREATE TABLE table_204_889 (
id number,
"date" text,
"week (stage)" text,
"song choice" text,
"original artist" text,
"theme" text,
"result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many songs did babou sing during his time on the ... | SELECT COUNT("song choice") FROM table_204_889 | squall |
CREATE TABLE table_62354 (
"Event" text,
"Time" text,
"Nationality" text,
"Date" text,
"Meet" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the 1500m freestyle event?
| SELECT "Date" FROM table_62354 WHERE "Event" = '1500m freestyle' | wikisql |
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 TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTME... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(DEPARTMENT_ID) | nvbench |
CREATE TABLE table_21111 (
"Rank" real,
"Company" text,
"Headquarters" text,
"Industry" text,
"Sales (billion $)" text,
"Profits (billion $)" text,
"Assets (billion $)" text,
"Market Value (billion $)" text
)
-- Using valid SQLite, answer the following questions for the tables provided... | SELECT "Assets (billion $)" FROM table_21111 WHERE "Headquarters" = 'China' AND "Profits (billion $)" = '21.2' | wikisql |
CREATE TABLE table_10812938_5 (
cfl_team VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the team of the player from St. Francis Xavier College?
| SELECT cfl_team FROM table_10812938_5 WHERE college = "St. Francis Xavier" | sql_create_context |
CREATE TABLE wdmzjzjlb (
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,
MZZYZDZ... | SELECT COUNT(wdmzjzjlb.ZZYSGH) FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '水葛菲' AND wdmzjzjlb.JZKSRQ BETWEEN '2016-04-26' AND '2019-12-28' UNION SELECT COUNT(bd... | css |
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_capacity INTEGER,
gender VARCHAR(1)
)
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Has_amenity (
... | SELECT dorm_name, AVG(T1.Age) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name ORDER BY AVG(T1.Age) | nvbench |
CREATE TABLE table_name_89 (
division VARCHAR,
regular_season VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the regular season of 2nd, Northeast and the year was less than 2008 what was the total number of Division?
| SELECT COUNT(division) FROM table_name_89 WHERE regular_season = "2nd, northeast" AND year < 2008 | 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... | 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.icd9_code = "5781" | mimicsql_data |
CREATE TABLE table_203_175 (
id number,
"rank" text,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what country had the most medals ?
| SELECT "nation" FROM table_203_175 ORDER BY "total" DESC LIMIT 1 | squall |
CREATE TABLE table_55361 (
"Name" text,
"Years" text,
"Gender" text,
"Area" text,
"Authority" text,
"Decile" real,
"Roll" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the authority when the roll is 40?
| SELECT "Authority" FROM table_55361 WHERE "Roll" = '40' | wikisql |
CREATE TABLE table_20378 (
"N\u00b0" real,
"Television service" text,
"Country" text,
"Language" text,
"Content" text,
"DAR" text,
"HDTV" text,
"PPV" text,
"Package/Option" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the dar ... | SELECT "DAR" FROM table_20378 WHERE "Television service" = 'MTV Rocks' | wikisql |
CREATE TABLE table_11563 (
"HP Model" text,
"Command Set" text,
"# FDD" real,
"FDD Type" text,
"Sides" text,
"FDD Capacity (each)" text,
"# HDD" real,
"HDD Capacity" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want to know the HP mo... | SELECT "HP Model" FROM table_11563 WHERE "# HDD" = '1' AND "Sides" = 'ds' | wikisql |
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt ... | 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | atis |
CREATE TABLE table_name_39 (
name VARCHAR,
college VARCHAR,
pick VARCHAR,
round VARCHAR,
overall VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Name has a Round larger than 4, an Overall smaller than 338, a Pick smaller than 11, and a Colle... | SELECT name FROM table_name_39 WHERE round > 4 AND overall < 338 AND pick < 11 AND college = "virginia tech" | sql_create_context |
CREATE TABLE table_1973842_1 (
institution VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What school is located in Chestnut Hill, Massachusetts?
| SELECT institution FROM table_1973842_1 WHERE location = "Chestnut Hill, Massachusetts" | sql_create_context |
CREATE TABLE table_12784134_24 (
short_stem VARCHAR,
imperfect_stem VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the short stem for garbitzen?
| SELECT short_stem FROM table_12784134_24 WHERE imperfect_stem = "garbitzen" | sql_create_context |
CREATE TABLE table_79508 (
"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 Date of the game with an attendance of 72,051 after Week 9?
| SELECT "Date" FROM table_79508 WHERE "Week" > '9' AND "Attendance" = '72,051' | wikisql |
CREATE TABLE table_1341738_19 (
incumbent VARCHAR,
first_elected VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the incumbent who was first eleccted in 1940?
| SELECT incumbent FROM table_1341738_19 WHERE first_elected = 1940 | sql_create_context |
CREATE TABLE table_7923 (
"Season in Tamil" text,
"English Transliteration" text,
"English Translation" text,
"Season in Sanskrit" text,
"Season in English" text,
"Tamil Months" text,
"Gregorian Months" text
)
-- Using valid SQLite, answer the following questions for the tables provided ab... | SELECT "Tamil Months" FROM table_7923 WHERE "English Transliteration" = 'mun-pani' | wikisql |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
... | SELECT COUNT(*) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'ARABAM' AND course.number = 405 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 | advising |
CREATE TABLE table_37861 (
"Date" text,
"Home team" text,
"Score" text,
"Away team" text,
"Venue" text,
"Crowd" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did the away team have round 2?
| SELECT "Venue" FROM table_37861 WHERE "Away team" = 'round 2' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT demographic.insurance FROM demographic WHERE demographic.name = "Stephanie Suchan" | 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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "FEMORAL ARTERY THROMBOSIS" AND demographic.age < "89" | mimicsql_data |
CREATE TABLE table_71098 (
"Language" text,
"Number" text,
"percentage (%)" text,
"males" text,
"females" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which language has the percentage of 2.54?
| SELECT "Language" FROM table_71098 WHERE "percentage (%)" = '2.54' | wikisql |
CREATE TABLE table_39714 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Event" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position has notes of 2:12:53?
| SELECT "Position" FROM table_39714 WHERE "Notes" = '2:12:53' | wikisql |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId... | SELECT u.Id AS "user_link", u.LastAccessDate, c.CreationDate, c.Id AS "comment_link" FROM Users AS u INNER JOIN Comments AS c ON c.UserId = u.Id WHERE u.Id IN (622, 9754, 12952, 13854, 21674, 23350, 44121, 59234, 83702, 85306) ORDER BY c.CreationDate DESC LIMIT 100 | sede |
CREATE TABLE table_name_28 (
weight VARCHAR,
spike VARCHAR,
block VARCHAR,
height VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Weight of the player with a Block larger than 328, Spike greater than 375 and Height larger than 207?
| SELECT COUNT(weight) FROM table_name_28 WHERE block > 328 AND height > 207 AND spike > 375 | sql_create_context |
CREATE TABLE Visitors (
Tourist_ID INTEGER,
Tourist_Details VARCHAR(255)
)
CREATE TABLE Theme_Parks (
Theme_Park_ID INTEGER,
Theme_Park_Details VARCHAR(255)
)
CREATE TABLE Features (
Feature_ID INTEGER,
Feature_Details VARCHAR(255)
)
CREATE TABLE Hotels (
hotel_id INTEGER,
star_rating... | SELECT Name, COUNT(*) FROM Tourist_Attractions AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_55739 (
"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.
-- What was the score of the away team at Junction ... | SELECT "Away team score" FROM table_55739 WHERE "Venue" = 'junction oval' | wikisql |
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 lab (
labid numbe... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'lorazepam 0.5 mg tab') | eicu |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jy... | css |
CREATE TABLE member (
Member_ID int,
Member_Name text,
Party_ID text,
In_office text
)
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int... | SELECT Party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid numb... | 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 = '030-42006' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... | eicu |
CREATE TABLE table_1013129_10 (
nhl_team VARCHAR,
position VARCHAR,
pick VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Position in nhl team centre are all smaller pick than 243.0
| SELECT nhl_team FROM table_1013129_10 WHERE position = "Centre" AND pick < 243.0 | sql_create_context |
CREATE TABLE table_2528382_5 (
year INTEGER,
music_director VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year did Naushad Direct the Music?
| SELECT MAX(year) FROM table_2528382_5 WHERE music_director = "Naushad" | sql_create_context |
CREATE TABLE table_15915 (
"School" text,
"Location" text,
"Founded" real,
"Affiliation" text,
"Enrollment" real,
"Team Nickname" text,
"Primary conference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many of the schools are designate... | SELECT COUNT("Location") FROM table_15915 WHERE "Affiliation" = 'Private/Presbyterian' | wikisql |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TA... | 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, flight WHERE (((flight.arrival_time <= 2100 AND flight.arrival_time >= 2000) OR flight.arrival_time = arrival_time2) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND fl... | atis |
CREATE TABLE department (
dept_name text,
building text,
budget number
)
CREATE TABLE teaches (
id text,
course_id text,
sec_id text,
semester text,
year number
)
CREATE TABLE classroom (
building text,
room_number text,
capacity number
)
CREATE TABLE instructor (
id t... | SELECT name, dept_name FROM student ORDER BY tot_cred | spider |
CREATE TABLE table_58300 (
"Channel" text,
"Description" text,
"Financed by" text,
"Owned by" text,
"Launched" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What channel has a description of the public broadcaster?
| SELECT "Channel" FROM table_58300 WHERE "Description" = 'public broadcaster' | wikisql |
CREATE TABLE table_203_547 (
id number,
"ship" text,
"built" number,
"in service for cunard" text,
"type" text,
"tonnage" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the difference in the tonage between the queen mar... | SELECT (SELECT "tonnage" FROM table_203_547 WHERE "ship" = 'queen mary') - (SELECT "tonnage" FROM table_203_547 WHERE "ship" = 'media') | squall |
CREATE TABLE table_49875 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Score that has the December of 10?
| SELECT "Score" FROM table_49875 WHERE "December" = '10' | wikisql |
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments ... | SELECT DISTINCT semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'ES' AND course.number = 615 AND semester.semester_id = course_offering.semester ORDER BY semester.year LIMIT 1 | advising |
CREATE TABLE table_name_35 (
heat INTEGER,
nationality VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the heat when the nationality is australia and the rank is less than 1?
| SELECT AVG(heat) FROM table_name_35 WHERE nationality = "australia" AND rank < 1 | sql_create_context |
CREATE TABLE table_204_871 (
id number,
"ano" text,
"title" text,
"role" text,
"channel" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what year was natalia oriero 's first tv role ?
| SELECT MIN("ano") FROM table_204_871 | squall |
CREATE TABLE table_26865 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. code" text,
"Viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ... | SELECT "Original air date" FROM table_26865 WHERE "Written by" = 'Jay J. Demopoulos' | wikisql |
CREATE TABLE table_1108394_24 (
queens VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won the 1973 democratic initial primary for queens of 19%?
| SELECT 1973 AS _democratic_initial_primary FROM table_1108394_24 WHERE queens = "19_percentage" | sql_create_context |
CREATE TABLE table_27723526_17 (
high_rebounds VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the high rebound for June 9?
| SELECT high_rebounds FROM table_27723526_17 WHERE date = "June 9" | sql_create_context |
CREATE TABLE table_name_9 (
name VARCHAR,
qual_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had a second qualification time of 1:01.777?
| SELECT name FROM table_name_9 WHERE qual_2 = "1:01.777" | 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 ... | (SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND jybgb.YLJGDM =... | css |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text... | SELECT meter_600, meter_100 FROM swimmer ORDER BY meter_100 | nvbench |
CREATE TABLE table_204_324 (
id number,
"team 1" text,
"agg." text,
"team 2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many teams played in the 2011 caf u-23 championship qualification ?
| SELECT COUNT("team 1") + COUNT("team 2") FROM table_204_324 | squall |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%topic0%' OR name LIKE '%topic0%') AND department = 'EECS' | advising |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate ... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%des moines%' ORDER BY Reputation DESC | sede |
CREATE TABLE table_50966 (
"Title" text,
"Parent magazine" text,
"Magazine type" text,
"Frequency" text,
"Magazine run" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the magazine type that ran from March 3, 2009 February 5, 2010?
| SELECT "Magazine type" FROM table_50966 WHERE "Magazine run" = 'march 3, 2009–february 5, 2010' | wikisql |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE gsi (
c... | 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 course.number BETWEEN 300 AND 300 + 100 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester... | advising |
CREATE TABLE table_54076 (
"Year" real,
"Category" text,
"Character" text,
"For The Show" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In 2004 who was favourite maa?
| SELECT "Character" FROM table_54076 WHERE "Category" = 'favourite maa' AND "Year" = '2004' | wikisql |
CREATE TABLE table_24970 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT "Written by" FROM table_24970 WHERE "U.S. viewers (millions)" = '2.15' | wikisql |
CREATE TABLE table_66664 (
"Round" real,
"Opponent" text,
"Result" text,
"Opp." real,
"Venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the result when the round is less than 7 and the opponent is melbourne storm?
| SELECT "Result" FROM table_66664 WHERE "Round" < '7' AND "Opponent" = 'melbourne storm' | wikisql |
CREATE TABLE table_56089 (
"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.
-- What was the score of the team that played again... | SELECT "Home team score" FROM table_56089 WHERE "Away team" = 'fitzroy' | wikisql |
CREATE TABLE table_16225511_2 (
school VARCHAR,
percent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many schools had the win loss ratio of 0.667?
| SELECT COUNT(school) FROM table_16225511_2 WHERE percent = "0.667" | sql_create_context |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number... | SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8016)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.labe... | mimic_iii |
CREATE TABLE table_name_63 (
place VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what country has a score of 69-70-72=211?
| SELECT place FROM table_name_63 WHERE score = 69 - 70 - 72 = 211 | sql_create_context |
CREATE TABLE table_64748 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the earliest year with a note of 18.04 m wl?
| SELECT MIN("Year") FROM table_64748 WHERE "Notes" = '18.04 m wl' | 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 diagnoses.icd9_code, diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "18372" | mimicsql_data |
CREATE TABLE table_name_20 (
notes VARCHAR,
bronze VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Notes, when Bronze is 'Pasi Ikonen'?
| SELECT notes FROM table_name_20 WHERE bronze = "pasi ikonen" | sql_create_context |
CREATE TABLE table_78727 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text,
"Arena" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Loss has a Record of 41 32 6?
| SELECT "Loss" FROM table_78727 WHERE "Record" = '41–32–6' | 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... | (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_name_5 (
high_assists VARCHAR,
game INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had the high assists in the game less than 19?
| SELECT high_assists FROM table_name_5 WHERE game < 19 | sql_create_context |
CREATE TABLE table_204_323 (
id number,
"year" number,
"film" text,
"function" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which film was before the audacity of democracy ?
| SELECT "film" FROM table_204_323 WHERE id = (SELECT id FROM table_204_323 WHERE "film" = 'the audacity of democracy') - 1 | squall |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.