instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_61 (
gold VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many gold medals were won in 1970?
| SELECT gold FROM table_name_61 WHERE year = "1970" | sql_create_context |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
t... | SELECT COUNT(DISTINCT course_prerequisite.course_id), course.department, course.name, course.number FROM course, course_offering, course_prerequisite, semester WHERE course.course_id = course_offering.course_id AND course.course_id = course_prerequisite.pre_course_id AND course.department = 'EECS' AND semester.semester... | advising |
CREATE TABLE person_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 * FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '鲁修齐' AND hz_info.YLJGDM = '0966893' AND zyjzjlb.JZKSMC LIKE '%换药%' | css |
CREATE TABLE table_19897294_10 (
original_air_date VARCHAR,
family_families VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did the episode with the Ririe family air for the first time?
| SELECT original_air_date FROM table_19897294_10 WHERE family_families = "The Ririe Family" | 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... | 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 table_204_525 (
id number,
"rank" number,
"player" text,
"county" text,
"tally" text,
"total" number,
"opposition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many players are from cork ?
| SELECT COUNT("player") FROM table_204_525 WHERE "county" = 'cork' | squall |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description ... | SELECT p.Title, p.Id, t.TagName, p.Body FROM Posts AS p, PostTags AS pt, Tags AS t, PostHistory AS ph WHERE t.TagName = 'tornado' AND t.Id = pt.TagId AND pt.PostId = p.Id AND p.Id = ph.PostId | sede |
CREATE TABLE table_name_82 (
game INTEGER,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the game number that was played on November 15?
| SELECT MIN(game) FROM table_name_82 WHERE date = "november 15" | sql_create_context |
CREATE TABLE table_203_794 (
id number,
"year" number,
"location" text,
"attendance" number,
"theme phrase" text,
"top messages" text,
"host" text,
"opening general session guest(s)" text,
"closing general session guest(s)" text,
"sunday night reception" text,
"wednesday nigh... | SELECT (SELECT "attendance" FROM table_203_794 WHERE "year" = 2001) - (SELECT "attendance" FROM table_203_794 WHERE "year" = 2004) | squall |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" AND procedures.icd9_code = "7935" | mimicsql_data |
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE station (
id int,
network_name text,
services text,
local_authority text
)
CREATE TABLE route (
train_id int,
station_id int
)
CREATE TA... | SELECT local_authority, COUNT(local_authority) FROM station GROUP BY local_authority ORDER BY COUNT(local_authority) | nvbench |
CREATE TABLE table_5892 (
"Rank" real,
"Rider" text,
"Team" text,
"Speed" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Team has a Time of 1:14.51.73?
| SELECT "Team" FROM table_5892 WHERE "Time" = '1:14.51.73' | wikisql |
CREATE TABLE table_42513 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of silver medals of the nation with 3 bronzes and more than 4 tot... | SELECT AVG("Silver") FROM table_42513 WHERE "Bronze" = '3' AND "Total" > '4' | wikisql |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTa... | SELECT * FROM Comments WHERE CreationDate BETWEEN '2012-11-01' AND '2012-11-30' ORDER BY Score DESC LIMIT 50 | sede |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange ... | SELECT DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS SN, COUNT(*) AS Num, Tags.TagName FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE Posts.PostTypeId = 1 GROUP BY Tags.TagName HAVING COUNT(*) > 100 ORDER BY Num DESC | sede |
CREATE TABLE table_name_16 (
rank INTEGER,
borough VARCHAR,
population VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Rank is the lowest one that has a Borough of richmondshire, and a Population larger than 8,178?
| SELECT MIN(rank) FROM table_name_16 WHERE borough = "richmondshire" AND population > 8 OFFSET 178 | sql_create_context |
CREATE TABLE table_13500 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the silver when the nation is syria (syr) and gold is more than 0?
| SELECT SUM("Silver") FROM table_13500 WHERE "Nation" = 'syria (syr)' AND "Gold" > '0' | wikisql |
CREATE TABLE table_53730 (
"Tie no" real,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the home team when tie no is less than 7 and the away team is havant & waterlooville?
| SELECT "Home team" FROM table_53730 WHERE "Tie no" < '7' AND "Away team" = 'havant & waterlooville' | wikisql |
CREATE TABLE table_name_78 (
unanimous VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the unanimous result of the player from Michigan Dartmouth?
| SELECT unanimous FROM table_name_78 WHERE school = "michigan dartmouth" | 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... | SELECT zzmzjzjlb.JZKSBM, zzmzjzjlb.JZKSMC FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '00146277879' UNION SELECT fzzmzjzjlb.JZKSBM, fzzmzjzjlb.JZKSMC FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '00146277879' | css |
CREATE TABLE airlines (
alid VARCHAR,
name VARCHAR
)
CREATE TABLE routes (
alid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the number of different airports which are the destinations of the American Airlines.
| SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines' | sql_create_context |
CREATE TABLE table_74724 (
"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 average crowd at Western Oval?
| SELECT AVG("Crowd") FROM table_74724 WHERE "Venue" = 'western oval' | wikisql |
CREATE TABLE table_train_235 (
"id" int,
"urinary_protein" float,
"nephrotic_range_proteinuria" bool,
"hepatic_disease" bool,
"estimated_glomerular_filtration_rate_egfr" int,
"kidney_disease" bool,
"renal_transplantation" bool,
"NOUSE" float
)
-- Using valid SQLite, answer the followin... | SELECT * FROM table_train_235 WHERE nephrotic_range_proteinuria = 1 OR urinary_protein > 3.5 | criteria2sql |
CREATE TABLE table_37167 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which school was the drafted player from in a pick larger than 181?
| SELECT "School" FROM table_37167 WHERE "Pick" > '181' | wikisql |
CREATE TABLE personfriend (
name text,
friend text,
year number
)
CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the number of people who is under 40 for each... | SELECT COUNT(*), gender FROM person WHERE age < 40 GROUP BY gender | spider |
CREATE TABLE table_204_600 (
id number,
"name" text,
"status" text,
"population" number,
"district" text,
"former local authority" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many people live in the bold civil parish ?
| SELECT "population" FROM table_204_600 WHERE "name" = 'bold' | squall |
CREATE TABLE table_76239 (
"Rank" real,
"Title" text,
"Studio" text,
"Director" text,
"Worldwide Gross" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Title of the Film with a Rank greater than 11 and Worldwide Gross of $131,002,597?
| SELECT "Title" FROM table_76239 WHERE "Rank" > '11' AND "Worldwide Gross" = '$131,002,597' | wikisql |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDa... | SELECT DISTINCT CreationDate, Posts.Id AS "post_link", Posts.Tags AS "tagged_with" FROM Posts WHERE (Tags LIKE '%matlab%') ORDER BY CreationDate DESC LIMIT 5 | sede |
CREATE TABLE table_55734 (
"State" text,
"Interview" real,
"Swimsuit" real,
"Evening gown" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the lowest average for a swimsuit over 6.89, evening gown over 7.76, and an interview ov... | SELECT MIN("Average") FROM table_55734 WHERE "Swimsuit" > '6.89' AND "Evening gown" > '7.76' AND "State" = 'illinois' AND "Interview" > '8.57' | wikisql |
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT course.name, course.number, semester.semester, semester.year FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'FA' AND semester.year = 2017) OR (semester.semester = 'FA' AND semester.year = 2018) OR (semester.semester = 'WN' AND se... | advising |
CREATE TABLE table_60715 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average bronze for less than 0 gold?
| SELECT AVG("Bronze") FROM table_60715 WHERE "Gold" < '0' | wikisql |
CREATE TABLE table_3477 (
"District" real,
"Representative" text,
"Party" text,
"Residence" text,
"First Elected" text,
"Term Limited" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times was Scott Oelslager a representative?
| SELECT COUNT("Residence") FROM table_3477 WHERE "Representative" = 'Scott Oelslager' | wikisql |
CREATE TABLE table_name_52 (
fall_08 VARCHAR,
fall_06 VARCHAR,
fall_05 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number is Fall 08 from the state with 57 in Fall 06 and 74 or less in Fall 05?
| SELECT COUNT(fall_08) FROM table_name_52 WHERE fall_06 = 57 AND fall_05 < 74 | sql_create_context |
CREATE TABLE invoiceline (
invoicelineid number,
invoiceid number,
trackid number,
unitprice number,
quantity number
)
CREATE TABLE playlist (
playlistid number,
name text
)
CREATE TABLE customer (
customerid number,
firstname text,
lastname text,
company text,
address ... | SELECT MAX(milliseconds), MIN(milliseconds) FROM genre AS T1 JOIN track AS T2 ON T1.genreid = T2.genreid WHERE T1.name = "Pop" | spider |
CREATE TABLE table_name_16 (
pommel_horse VARCHAR,
rings VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many pommel Horses have Rings of 37.461, and a Total smaller than 229.507?
| SELECT COUNT(pommel_horse) FROM table_name_16 WHERE rings = 37.461 AND total < 229.507 | sql_create_context |
CREATE TABLE table_40270 (
"Year" text,
"Team" text,
"Comp" text,
"Long" text,
"Rate" text,
"RAtt" text,
"RYds" text,
"RAvg" text,
"Lost" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the RAtt when the long is 73?
| SELECT "RAtt" FROM table_40270 WHERE "Long" = '73' | wikisql |
CREATE TABLE table_32004 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank of the nation that has more than 1 Bronze medals and fewer than 4 Gold meda... | SELECT MIN("Rank") FROM table_32004 WHERE "Bronze" > '1' AND "Gold" < '4' | wikisql |
CREATE TABLE table_4476 (
"Number" text,
"Name" text,
"Meaning" text,
"Fleet" text,
"Launched" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- when was garibaldets ( ) launched?
| SELECT "Launched" FROM table_4476 WHERE "Name" = 'garibaldets (гарибальдиец)' | wikisql |
CREATE TABLE table_name_51 (
nfl_club VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What club is robert gallery a part of
| SELECT nfl_club FROM table_name_51 WHERE player = "robert gallery" | sql_create_context |
CREATE TABLE table_name_74 (
year_built VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was John m. Belk Arena built?
| SELECT year_built FROM table_name_74 WHERE venue = "john m. belk arena" | 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 t_kc24.REF_SLT_FLG FROM t_kc24 JOIN t_kc21_t_kc24 JOIN t_kc21 ON t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID AND t_kc21_t_kc24.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '40153169364' | css |
CREATE TABLE table_13410 (
"Overall points" text,
"100 m" text,
"400 m" text,
"110 m H" text,
"1500 m" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 100 m time when the 110 m H number is 0 dnf?
| SELECT "100 m" FROM table_13410 WHERE "110 m H" = '0 dnf' | wikisql |
CREATE TABLE table_name_70 (
playoffs VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Playoffs were held during the years of 2007-08?
| SELECT playoffs FROM table_name_70 WHERE year = "2007-08" | sql_create_context |
CREATE TABLE table_52205 (
"Rank" real,
"Movie" text,
"Year" real,
"Studio(s)" text,
"Third Week Nett. Gross" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the average rank for dharma productions before 2013
| SELECT AVG("Rank") FROM table_52205 WHERE "Studio(s)" = 'dharma productions' AND "Year" < '2013' | wikisql |
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_NM = '章恺乐' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 3006.5) UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '章恺乐' AND fgwyjzb.ME... | css |
CREATE TABLE zyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.OUT_DIAG_DIS_CD, qtb.OUT_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_NM = '潘天蓝' AND qtb.MED_SER_ORG_NO = '0395177' AND qtb.OUT_DIAG_DOC_NM LIKE '柳%' UNION SELECT gyb.OUT_DIAG_DIS_CD, gyb.OUT_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_NM = '潘天蓝' AND gyb.MED_SER_ORG_NO = '0395177' AND gyb.OUT_DIAG_DOC_NM LIKE '柳%' UNION ... | css |
CREATE TABLE submission (
Submission_ID int,
Scores real,
Author text,
College text
)
CREATE TABLE Acceptance (
Submission_ID int,
Workshop_ID int,
Result text
)
CREATE TABLE workshop (
Workshop_ID int,
Date text,
Venue text,
Name text
)
-- Using valid SQLite, answer the ... | SELECT Result, COUNT(Result) FROM Acceptance GROUP BY Result | nvbench |
CREATE TABLE table_1847523_2 (
affiliation VARCHAR,
station VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What station is affiliated with kmgh-tv?
| SELECT affiliation FROM table_1847523_2 WHERE station = "KMGH-TV" | sql_create_context |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '许飞烟' AND NOT t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 1281.74) | css |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT COUNT(*) FROM zyjzjlb WHERE YLJGDM = '7733540' AND JZKSMC = '小儿心理科' AND RYDJSJ BETWEEN '2005-08-04' AND '2018-04-04' | css |
CREATE TABLE table_name_64 (
fa_cup VARCHAR,
total VARCHAR,
play_offs VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total number of FA Cup with a Play-offs of 3, and the Name of Mitch Cook Category:Articles with hCards and h... | SELECT COUNT(fa_cup) FROM table_name_64 WHERE play_offs = 3 AND name = "mitch cook category:articles with hcards" AND total < 11 | sql_create_context |
CREATE TABLE table_40385 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score when the opponent in the final was iroda tulyaganova?
| SELECT "Score" FROM table_40385 WHERE "Opponent in the final" = 'iroda tulyaganova' | wikisql |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'pituitary cushing syndrome' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-1 year')) | eicu |
CREATE TABLE table_name_55 (
post_season_record_ VARCHAR,
e_ VARCHAR,
mlb_affiliate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the post-season record for kansas city
| SELECT post_season_record_ AS "e_" FROM table_name_55 WHERE mlb_affiliate = "kansas city" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid numb... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 'hdl') | eicu |
CREATE TABLE table_22384475_1 (
team__a_ VARCHAR,
margin VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games were won by a margin of 131 runs?
| SELECT COUNT(team__a_) FROM table_22384475_1 WHERE margin = "131 runs" | sql_create_context |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varch... | SELECT JOB_ID, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY | nvbench |
CREATE TABLE table_name_69 (
roll VARCHAR,
name VARCHAR,
decile VARCHAR,
authority VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the roll of Bishop Viard College (An Integrated College), which has a decile larger than 1?
| SELECT COUNT(roll) FROM table_name_69 WHERE decile > 1 AND authority = "integrated" AND name = "bishop viard college" | sql_create_context |
CREATE TABLE table_9761 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Result of the AFG Arena, St. Gallen Competition with a Score of 1 0?
| SELECT "Result" FROM table_9761 WHERE "Venue" = 'afg arena, st. gallen' AND "Score" = '1–0' | wikisql |
CREATE TABLE table_name_88 (
structure VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What structure is in Chile?
| SELECT structure FROM table_name_88 WHERE country = "chile" | 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... | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '01420537' AND t_kc21.MED_SER_ORG_NO = '2864800' AND NOT t_kc21.IN_DIAG_DIS_NM LIKE '%脑瘫%' | css |
CREATE TABLE table_name_48 (
pop__2004_ INTEGER,
governorate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Pop (2004) has a Governorate of al mahwit?
| SELECT SUM(pop__2004_) FROM table_name_48 WHERE governorate = "al mahwit" | sql_create_context |
CREATE TABLE invoices (
billing_country VARCHAR,
total INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- A list of the top 10 countries by average invoice size. List country name and average invoice size.
| SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10 | sql_create_context |
CREATE TABLE table_name_52 (
result VARCHAR,
goals VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the result for goals which has goals of deacon 6/6
| SELECT result FROM table_name_52 WHERE goals = "deacon 6/6" | sql_create_context |
CREATE TABLE table_26202940_6 (
no VARCHAR,
score_in_the_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many numbers correspond to the score in the final of 6 3, 6 4, 7 6 (13 11)?
| SELECT COUNT(no) FROM table_26202940_6 WHERE score_in_the_final = "6–3, 6–4, 7–6 (13–11)" | sql_create_context |
CREATE TABLE Ref_Incident_Type (
incident_type_code VARCHAR(10),
incident_type_description VARCHAR(80)
)
CREATE TABLE Student_Addresses (
student_id INTEGER,
address_id INTEGER,
date_address_from DATETIME,
date_address_to DATETIME,
monthly_rental DECIMAL(19,4),
other_details VARCHAR(255... | SELECT date_address_to, AVG(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE editor (
Editor_ID int,
Name text,
Age real
)
CREATE TABLE journal_committee (
Editor_ID int,
Journal_ID int,
Work_Type text
)
CREATE TABLE journal (
Journal_ID int,
Date text,
Theme text,
Sales int
)
-- Using valid SQLite, answer the following questions for the ... | SELECT T1.Theme, T1.Sales FROM journal EXCEPT SELECT T1.Date, T1.Theme, T1.Sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.Journal_ID = T2.Journal_ID ORDER BY T1.Theme DESC | nvbench |
CREATE TABLE table_38250 (
"Election" text,
"D\u00e1il" text,
"Share of votes" text,
"Seats" real,
"Government" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many seats does the 6th Dail have?
| SELECT COUNT("Seats") FROM table_38250 WHERE "D\u00e1il" = '6th' | wikisql |
CREATE TABLE table_name_23 (
bats VARCHAR,
first VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which bats did mitchell play first?
| SELECT bats FROM table_name_23 WHERE first = "mitchell" | sql_create_context |
CREATE TABLE table_45843 (
"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 was the score of the game when Sheffield Wednesday was the home team?
| SELECT "Score" FROM table_45843 WHERE "Home team" = 'sheffield wednesday' | wikisql |
CREATE TABLE table_203_450 (
id number,
"team" text,
"outgoing manager" text,
"manner of departure" text,
"date of vacancy" text,
"replaced by" text,
"date of appointment" text,
"position in table" text
)
-- Using valid SQLite, answer the following questions for the tables provided abo... | SELECT "team" FROM table_203_450 WHERE id = (SELECT id FROM table_203_450 WHERE "team" = 'manchester city') + 1 | squall |
CREATE TABLE table_1745843_2 (
part_4 VARCHAR,
part_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For part 2 *lauk, what is listed for part 4?
| SELECT part_4 FROM table_1745843_2 WHERE part_2 = "*lauk" | 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... | SELECT (SELECT COUNT(*) FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '76980404' AND txmzjzjlb.JZKSRQ BETWEEN '2001-07-25' AND '2018-06-20' UNION SELECT COUNT(*) FROM hz_info JOIN ftxmzjzjlb ON hz_info.YLJGDM = ftxmzjz... | css |
CREATE TABLE table_26638600_3 (
lites_2_race_one_winning_team VARCHAR,
lites_1_race_two_winning_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many different circuits had Gary Gibson has the Lites 1 race two winning team?
| SELECT COUNT(lites_2_race_one_winning_team) FROM table_26638600_3 WHERE lites_1_race_two_winning_team = "Gary Gibson" | sql_create_context |
CREATE TABLE table_15187735_13 (
segment_b VARCHAR,
episode VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the segment b for 167
| SELECT segment_b FROM table_15187735_13 WHERE episode = 167 | sql_create_context |
CREATE TABLE table_2226817_9 (
no_in_season INTEGER,
no_in_series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many seasons had episode 158?
| SELECT MIN(no_in_season) FROM table_2226817_9 WHERE no_in_series = 158 | sql_create_context |
CREATE TABLE table_34846 (
"Tournament" text,
"1981" text,
"1982" text,
"1983" text,
"1984" text,
"1985" text,
"1986" text,
"1987" text,
"1988" text,
"1989" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Tournament has A in... | SELECT "Tournament" FROM table_34846 WHERE "1987" = 'a' | wikisql |
CREATE TABLE table_79523 (
"Date" text,
"Internet Explorer" text,
"Firefox" text,
"Safari" text,
"Opera" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the safari value with a 2.4% opera and 29.9% internet explorer?
| SELECT "Safari" FROM table_79523 WHERE "Opera" = '2.4%' AND "Internet Explorer" = '29.9%' | wikisql |
CREATE TABLE table_29232 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the replaced by when the date of... | SELECT "Replaced by" FROM table_29232 WHERE "Date of vacancy" = '27 December 2010' | wikisql |
CREATE TABLE table_name_12 (
pick VARCHAR,
nhl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the pick for pittsburgh penguins
| SELECT pick FROM table_name_12 WHERE nhl_team = "pittsburgh penguins" | sql_create_context |
CREATE TABLE table_name_89 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the game when the record was 53 104?
| SELECT date FROM table_name_89 WHERE record = "53–104" | sql_create_context |
CREATE TABLE table_204_983 (
id number,
"year" number,
"1st venue" text,
"2nd venue" text,
"3rd venue" text,
"4th venue" text,
"5th venue" text,
"6th venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- name a year whose second venue wa... | SELECT "year" FROM table_204_983 WHERE "year" <> 2011 AND "2nd venue" = (SELECT "2nd venue" FROM table_204_983 WHERE "year" = 2011) | squall |
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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2194" AND lab.itemid = "50817" | mimicsql_data |
CREATE TABLE table_34513 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Record of 6 8 had what attendance?
| SELECT "Attendance" FROM table_34513 WHERE "Record" = '6–8' | wikisql |
CREATE TABLE table_name_86 (
rank VARCHAR,
ø_pts VARCHAR,
games VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the rank for 1.26 -Pts in game 1458?
| SELECT COUNT(rank) FROM table_name_86 WHERE ø_pts > 1.26 AND games = 1458 | sql_create_context |
CREATE TABLE table_204_932 (
id number,
"#" number,
"title" text,
"time" text,
"lead vocals" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how long is the song i love you jesus ?
| SELECT "time" FROM table_204_932 WHERE "title" = 'i love you jesus' | squall |
CREATE TABLE table_name_89 (
rebounds VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many rebounds does Ann Wauters have?
| SELECT COUNT(rebounds) FROM table_name_89 WHERE name = "ann wauters" | sql_create_context |
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,... | SELECT MED_ORG_DEPT_NM, IN_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '5826228' GROUP BY MED_ORG_DEPT_NM, IN_DIAG_DIS_NM | css |
CREATE TABLE table_31361 (
"Subject" text,
"No. Sat" real,
"No. Passed" real,
"% Pass" real,
"Highest mark" real,
"Lowest mark" real,
"Mean" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many lowest mark entries are there when % passed ... | SELECT COUNT("Lowest mark") FROM table_31361 WHERE "% Pass" = '76' | wikisql |
CREATE TABLE table_name_17 (
engine VARCHAR,
driver VARCHAR,
tyre VARCHAR,
constructor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the engine when the tyre is d, the constructor is era and the driver is bob gerard?
| SELECT engine FROM table_name_17 WHERE tyre = "d" AND constructor = "era" AND driver = "bob gerard" | sql_create_context |
CREATE TABLE table_32809 (
"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 smallest crowd size at a home game ... | SELECT MIN("Crowd") FROM table_32809 WHERE "Home team" = 'footscray' | wikisql |
CREATE TABLE music_festival (
id number,
music_festival text,
date_of_ceremony text,
category text,
volume number,
result text
)
CREATE TABLE artist (
artist_id number,
artist text,
age number,
famous_title text,
famous_release_date text
)
CREATE TABLE volume (
volume_i... | SELECT AVG(T2.weeks_on_top) FROM artist AS T1 JOIN volume AS T2 ON T1.artist_id = T2.artist_id WHERE T1.age <= 25 | spider |
CREATE TABLE table_31145 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many episodes were wri... | SELECT COUNT("No. in series") FROM table_31145 WHERE "Written by" = 'Gregg Mettler' | wikisql |
CREATE TABLE table_28132 (
"Episode" real,
"Air Date" text,
"Team Swash" text,
"Team guest captain" text,
"Team Coxy" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the team guest captain for episode 2?
| SELECT "Team guest captain" FROM table_28132 WHERE "Episode" = '2' | 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.religion = "PROTESTANT QUAKER" AND lab.label = "Thyroid Stimulating Hormone" | mimicsql_data |
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT Class, COUNT(Class) FROM Ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM captain) GROUP BY Class ORDER BY Class | nvbench |
CREATE TABLE table_name_41 (
song VARCHAR,
draw INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What song has draw number less than 2?
| SELECT song FROM table_name_41 WHERE draw < 2 | sql_create_context |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '89171613' | css |
CREATE TABLE table_15049 (
"Film" text,
"Director(s)" text,
"Producer(s)" text,
"Writer(s)" text,
"Recipient" text,
"Date" text,
"Award" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the producer for the film 'Strange Little Girls'?... | SELECT "Producer(s)" FROM table_15049 WHERE "Film" = 'strange little girls' | wikisql |
CREATE TABLE table_name_55 (
visitor VARCHAR,
home VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the visitor for detroit on february 24
| SELECT visitor FROM table_name_55 WHERE home = "detroit" AND date = "february 24" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.