instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_66 (
pos VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the position in 2006?
| SELECT pos FROM table_name_66 WHERE year = 2006 | sql_create_context |
CREATE TABLE table_9929 (
"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 DATE WITH AN AWAY TEAM OF WORKINGTON?
| SELECT "Date" FROM table_9929 WHERE "Away team" = 'workington' | wikisql |
CREATE TABLE mountain (
Mountain_ID int,
Name text,
Height real,
Prominence real,
Range text,
Country text
)
CREATE TABLE climber (
Climber_ID int,
Name text,
Country text,
Time text,
Points real,
Mountain_ID int
)
-- Using valid SQLite, answer the following questions ... | SELECT T2.Name, COUNT(T2.Name) FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID GROUP BY T2.Name ORDER BY T2.Name DESC | nvbench |
CREATE TABLE table_42696 (
"Result" text,
"Record" text,
"Opponent" text,
"Method" text,
"Date" text,
"Round" real,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What do the notes say for 1989 May 7?
| SELECT "Notes" FROM table_42696 WHERE "Date" = '1989 may 7' | 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 t_kc22.MED_DIRE_CD, t_kc22.MED_DIRE_NM FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '47707543040' AND t_kc22.SOC_SRT_DIRE_CD = '4379-c' | css |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
... | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jy... | css |
CREATE TABLE table_19523142_5 (
group_11 VARCHAR,
group_12 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who played in group 11 when Persipal Palu played in group 12?
| SELECT group_11 FROM table_19523142_5 WHERE group_12 = "Persipal Palu" | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Benign neoplasm of spinal meninges" | mimicsql_data |
CREATE TABLE table_name_87 (
rank INTEGER,
population VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What rank has a population of 4839400?
| SELECT MIN(rank) FROM table_name_87 WHERE population = "4839400" | sql_create_context |
CREATE TABLE table_name_70 (
region VARCHAR,
date VARCHAR,
catalog VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What region has a 2002 date, and a Catalog dos 195?
| SELECT region FROM table_name_70 WHERE date = "2002" AND catalog = "dos 195" | sql_create_context |
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 zzmzjzjlb.JZKSRQ FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '54076263049' UNION SELECT fzzmzjzjlb.JZKSRQ FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '54076263049' | css |
CREATE TABLE table_name_38 (
name VARCHAR,
reported_age VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has a reported age of 111 years, 66 days?
| SELECT name FROM table_name_38 WHERE reported_age = "111 years, 66 days" | sql_create_context |
CREATE TABLE table_1331313_1 (
department VARCHAR,
acronym VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the department with acronym being deped (ked)
| SELECT department FROM table_1331313_1 WHERE acronym = "DepEd (KEd)" | sql_create_context |
CREATE TABLE Product_Categories (
production_type_code VARCHAR(15),
product_type_description VARCHAR(80),
vat_rating DECIMAL(19,4)
)
CREATE TABLE Customers (
customer_id INTEGER,
customer_first_name VARCHAR(50),
customer_middle_initial VARCHAR(1),
customer_last_name VARCHAR(50),
gender ... | SELECT transaction_type, SUM(transaction_amount) FROM Financial_Transactions GROUP BY transaction_type ORDER BY transaction_type | nvbench |
CREATE TABLE table_32141 (
"Tournament" text,
"1966" text,
"1967" text,
"1968" text,
"1969" text,
"1970" text,
"1971" text,
"1972" text,
"1973" text,
"1974" text,
"1975" text,
"1976" text,
"Career SR" text
)
-- Using valid SQLite, answer the following questions for ... | SELECT "1968" FROM table_32141 WHERE "1967" = '1r' | wikisql |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
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,
test... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'ARCH' AND course.number = 589 AND semester.semester = 'Winter' AND semester.semester_id = course_offering.semester | advising |
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 zyb WHERE zyb.PERSON_SEX = '施舒云' AND MOD(zyb.MED_CLINIC_ID, 1) = 0 | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medication... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-47576')) AND medication.drugname = 'maalox' AND STRFTIME('%y', medicat... | eicu |
CREATE TABLE table_name_58 (
name VARCHAR,
source VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player is associated with soenderjyske.dk?
| SELECT name FROM table_name_58 WHERE source = "soenderjyske.dk" | sql_create_context |
CREATE TABLE table_203_486 (
id number,
"place" number,
"team" text,
"matches" number,
"won" number,
"drawn" number,
"lost" number,
"difference" text,
"points" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many teams won at le... | SELECT COUNT("team") FROM table_203_486 WHERE "won" >= 2 | squall |
CREATE TABLE table_49026 (
"School Year" text,
"Volleyball" text,
"Cross Country" text,
"Soccer" text,
"Tennis" text,
"Golf" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is School Year, when Cross Country is Lexington, when Soccer is Ashl... | SELECT "School Year" FROM table_49026 WHERE "Cross Country" = 'lexington' AND "Soccer" = 'ashland' AND "Volleyball" = 'wooster' | wikisql |
CREATE TABLE table_203_61 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the total number of medals won by madagascar ?
| SELECT "total" FROM table_203_61 WHERE "nation" = 'madagascar' | squall |
CREATE TABLE table_32595 (
"Rank" real,
"Player" text,
"Nation" text,
"Assist" real,
"Games" real,
"Years" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games had an assist number greater than 54?
| SELECT SUM("Games") FROM table_32595 WHERE "Assist" > '54' | wikisql |
CREATE TABLE table_18349697_1 (
province VARCHAR,
_community VARCHAR,
age VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the province where the age of the contestant is 27?
| SELECT province, _community FROM table_18349697_1 WHERE age = 27 | sql_create_context |
CREATE TABLE qtb (
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 COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '4063324' AND qtb.IN_HOSP_DATE BETWEEN '2006-09-30' AND '2009-06-22' AND qtb.INSURED_STS = '未就业' UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '4063324' AND gyb.IN_HOSP_DATE BETWEEN '2006-09-30' AND '2009-06-22' AND gyb.INSURED_STS = '未就业' UNION SELECT COU... | css |
CREATE TABLE table_40944 (
"Season" text,
"Round" text,
"Opponents" text,
"Home leg" text,
"Away leg" text,
"Aggregate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home leg who are opponents of rotor volgograd
| SELECT "Home leg" FROM table_40944 WHERE "Opponents" = 'rotor volgograd' | wikisql |
CREATE TABLE table_name_43 (
opponents VARCHAR,
djurgården_scorers VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the Opponents that have Djurg rden scorers of sj lund (2)?
| SELECT opponents FROM table_name_43 WHERE djurgården_scorers = "sjölund (2)" | sql_create_context |
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Oth... | SELECT T1.Project_Details, T1.Project_ID FROM Projects AS T1 JOIN Documents AS T2 ON T1.Project_ID = T2.Project_ID | nvbench |
CREATE TABLE table_name_97 (
team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team plays in Dinamo, Brest?
| SELECT team FROM table_name_97 WHERE venue = "dinamo, brest" | sql_create_context |
CREATE TABLE table_34782 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Opponent from the final with a Partner named jorgelina cr... | SELECT "Opponent in the final" FROM table_34782 WHERE "Partner" = 'jorgelina cravero' | wikisql |
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CR... | 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBU... | atis |
CREATE TABLE table_12890 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location/Attendance" text,
"Record" text,
"Streak" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Record has an Opponent of milwaukee bucks?
| SELECT "Record" FROM table_12890 WHERE "Opponent" = 'milwaukee bucks' | wikisql |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2203" AND lab.label = "Carboxyhemoglobin" | mimicsql_data |
CREATE TABLE table_name_38 (
points INTEGER,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sum of points for 1992
| SELECT SUM(points) FROM table_name_38 WHERE year = 1992 | sql_create_context |
CREATE TABLE table_203_134 (
id number,
"place" text,
"player" text,
"country" text,
"score" text,
"to par" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of players who tied for fourth , seventh , and tenth combined ?... | SELECT COUNT("player") FROM table_203_134 WHERE "place" IN (4, 7, 10) | squall |
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE dataset (
datasetid int,
datasetname varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'lasso' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2014 AND venue.venueid = paper.venueid AND venue.venuename = 'icml' | scholar |
CREATE TABLE table_18914438_1 (
best VARCHAR,
career VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Best score during the game played from 1971-1984?
| SELECT best FROM table_18914438_1 WHERE career = "1971-1984" | sql_create_context |
CREATE TABLE table_55229 (
"Event" text,
"Record" text,
"Athlete" text,
"Nationality" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date of the discus throw for Bulgaria?
| SELECT "Date" FROM table_55229 WHERE "Nationality" = 'bulgaria' AND "Event" = 'discus throw' | wikisql |
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.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_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.J... | css |
CREATE TABLE table_74143 (
"Date" text,
"Player" text,
"Injury" text,
"Date of injury" text,
"Number of matches (Total)" text,
"Source" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times was the date october 3, 2010?
| SELECT COUNT("Player") FROM table_74143 WHERE "Date" = 'October 3, 2010' | wikisql |
CREATE TABLE table_19744915_18 (
couple VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 9 is the rank who are the couple?
| SELECT couple FROM table_19744915_18 WHERE rank = 9 | sql_create_context |
CREATE TABLE table_name_55 (
event VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which event had Carlos Alexandre Pereira as opponent?
| SELECT event FROM table_name_55 WHERE opponent = "carlos alexandre pereira" | sql_create_context |
CREATE TABLE table_name_77 (
opponents_in_the_final VARCHAR,
date VARCHAR,
score_in_the_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Opponents in the final had a match in 1984 with a Score in the final of 7 6, 6 1?
| SELECT opponents_in_the_final FROM table_name_77 WHERE date = 1984 AND score_in_the_final = "7–6, 6–1" | sql_create_context |
CREATE TABLE Student_Course_Enrolment (
course_id VARCHAR
)
CREATE TABLE Courses (
course_name VARCHAR,
course_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of each course and the corresponding number of student enrollment?
| SELECT T1.course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name | sql_create_context |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '82293410' AND hz_info.YLJGDM = '6552603' AND zyjzjlb.JZKSMC LIKE '%免疫病%' | css |
CREATE TABLE table_73916 (
"Outcome" text,
"No." text,
"Date" text,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many championships are there on th... | SELECT COUNT("Championship") FROM table_73916 WHERE "Date" = 'January 9, 2005' | wikisql |
CREATE TABLE table_name_2 (
yards INTEGER,
long VARCHAR,
avg VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Yards have an avg of 11.8, and a Player of brent celek, and a Long larger than 44?
| SELECT AVG(yards) FROM table_name_2 WHERE avg = 11.8 AND player = "brent celek" AND long > 44 | sql_create_context |
CREATE TABLE table_62981 (
"Year" real,
"Category" text,
"Nominee(s)" text,
"Episode" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result when the nominee(s) of janine sherman?
| SELECT "Result" FROM table_62981 WHERE "Nominee(s)" = 'janine sherman' | wikisql |
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE Apartments (
apt_id INTEGER,
... | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex" | nvbench |
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Give me a histogram for ... | SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project WHERE T1.Hours > 300 GROUP BY T1.Name ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_name_40 (
b_score INTEGER,
position VARCHAR,
a_score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the score for the 5th position and a score less than 7
| SELECT MIN(b_score) FROM table_name_40 WHERE position = "5th" AND a_score < 7 | sql_create_context |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
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,
ReviewT... | SELECT Id AS "post_link", Title FROM Posts WHERE Title LIKE '%##text?he##%' ORDER BY Id DESC | sede |
CREATE TABLE technician (
technician_id real,
Name text,
Team text,
Starting_Year real,
Age int
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
value_points real,
quality_rank int
)
CREATE TABLE repair (
repair_I... | SELECT Name, COUNT(Name) FROM technician WHERE Team <> "NYY" GROUP BY Name | nvbench |
CREATE TABLE table_18095719_2 (
pole_position VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had pole position in round 7?
| SELECT pole_position FROM table_18095719_2 WHERE round = 7 | sql_create_context |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TI... | SELECT SALARY, COMMISSION_PCT FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 | nvbench |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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,
... | (SELECT * 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 = jyjgzbb.BGDH WHERE hz_info.RYBH = ... | css |
CREATE TABLE table_204_582 (
id number,
"model" text,
"launch" text,
"code name" text,
"fab (nm)" number,
"bus interface" text,
"memory (mib)" text,
"core clock (mhz)" number,
"memory clock (mhz)" number,
"config core1" text,
"fillrate\nmoperations/s" number,
"fillrate\nm... | SELECT "fillrate\nmpixels/s" FROM table_204_582 WHERE "model" = 'voodoo banshee' | squall |
CREATE TABLE table_name_91 (
nationality VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the nationality for milwaukee hawks?
| SELECT nationality FROM table_name_91 WHERE team = "milwaukee hawks" | sql_create_context |
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 number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT * 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 = jyjgzbb.BGDH WHERE hz_info.RYBH = '... | css |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNoticeTypes (
Id... | SELECT Reputation FROM "##Site##".Users WHERE AccountId = '##aUId##' | sede |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
... | SELECT * FROM Posts WHERE OwnerUserId = @UserId ORDER BY LastActivityDate DESC LIMIT 10 | sede |
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 demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Heart valve replaced by transplant" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE table_name_27 (
language VARCHAR,
content VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Language, when Content is Monoscopio?
| SELECT language FROM table_name_27 WHERE content = "monoscopio" | sql_create_context |
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 text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '6311978' AND t_kc21.IN_HOSP_DATE BETWEEN '2003-03-17' AND '2008-10-21' AND t_kc21.SERVANT_FLG = '公务员' | css |
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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "6" AND diagnoses.icd9_code = "60000" | mimicsql_data |
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 course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (semester.semester = ... | advising |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE STRFTIME('%y', admissions.admittime) >= '2104' | mimic_iii |
CREATE TABLE table_name_87 (
prominence__m_ INTEGER,
elevation__m_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest prominence for a peak with elevation of 3,615 meters?
| SELECT MIN(prominence__m_) FROM table_name_87 WHERE elevation__m_ = 3 OFFSET 615 | sql_create_context |
CREATE TABLE table_name_44 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date did the Cavaliers have a record of 9-14?
| SELECT date FROM table_name_44 WHERE record = "9-14" | 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 WHERE demographic.discharge_location = "SNF" AND demographic.diagnosis = "PNEUMONIA;HUMAN IMMUNODEFIENCY VIRUS;RULE OUT TUBERCULOSIS" | mimicsql_data |
CREATE TABLE table_name_59 (
goals VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the goals of Mile Sterjovski as a player?
| SELECT goals FROM table_name_59 WHERE player = "mile sterjovski" | sql_create_context |
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 mzjzjlb.MZZYZDZZBM, mzjzjlb.MZZYZDZZMC FROM mzjzjlb WHERE mzjzjlb.JZLSH = '35311934275' | css |
CREATE TABLE table_27756572_6 (
high_points VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who and what were the high points player for the game against Detroit?
| SELECT high_points FROM table_27756572_6 WHERE team = "Detroit" | sql_create_context |
CREATE TABLE table_name_85 (
loss VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On May 29 which team had the loss?
| SELECT loss FROM table_name_85 WHERE date = "may 29" | sql_create_context |
CREATE TABLE table_name_60 (
week INTEGER,
record VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most week for record of 1-2 and attendance more than 61,602
| SELECT MAX(week) FROM table_name_60 WHERE record = "1-2" AND attendance > 61 OFFSET 602 | sql_create_context |
CREATE TABLE table_name_55 (
high_points VARCHAR,
high_rebounds VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the High points of charles oakley , kevin willis (11)?
| SELECT high_points FROM table_name_55 WHERE high_rebounds = "charles oakley , kevin willis (11)" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | SELECT zyjzjlb.MZZYZDZZBM FROM zyjzjlb WHERE zyjzjlb.JZLSH = '18256092603' | css |
CREATE TABLE table_75649 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Points is the lowest one that has a Score of 1 4, and a January smaller than 18?
| SELECT MIN("Points") FROM table_75649 WHERE "Score" = '1–4' AND "January" < '18' | wikisql |
CREATE TABLE table_45822 (
"Name" text,
"Height" text,
"Weight" text,
"Spike" text,
"2008 club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the name of the player from Olympiacos in 2008?
| SELECT "Name" FROM table_45822 WHERE "2008 club" = 'olympiacos' | wikisql |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT ACC_Regular_Season, All_Games_Percent FROM basketball_match | nvbench |
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 employees (
EMPLOYEE_I... | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT FIRST_NAME LIKE '%M%' | nvbench |
CREATE TABLE table_78101 (
"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 highest rank a team with 1 silver and less than 5 bronze medals has?
| SELECT MAX("Rank") FROM table_78101 WHERE "Silver" = '1' AND "Bronze" < '5' | wikisql |
CREATE TABLE table_27589 (
"June 10-11" text,
"March 27-29" text,
"January 15-16" text,
"November 3" text,
"August 21-22" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is january 15-16 when november 3 is 153?
| SELECT "January 15-16" FROM table_27589 WHERE "November 3" = '153' | wikisql |
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 COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '陈玲玲' AND t_kc22.STA_DATE BETWEEN '2007-04-17' AND '2014-06-22' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_NM = '陈玲玲' A... | css |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CR... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE STRFTIME('%y', diagnoses_icd.charttime) = '2105' GROUP BY diagnoses_icd.icd9_code) AS t1 WHERE t... | mimic_iii |
CREATE TABLE table_27322 (
"Region" text,
"Prison inmates Men" real,
"Prison inmates Women" real,
"Prison inmates Total" real,
"Incarceration rate Male" real,
"Incarceration rate Female" real,
"Incarceration rate Total" real,
"Country comparison" text
)
-- Using valid SQLite, answer th... | SELECT MAX("Incarceration rate Male") FROM table_27322 WHERE "Region" = 'Maule' | wikisql |
CREATE TABLE table_name_43 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Date has a Record of 21 10?
| SELECT date FROM table_name_43 WHERE record = "21–10" | sql_create_context |
CREATE TABLE table_204_250 (
id number,
"date" text,
"opponent#" text,
"rank#" text,
"site" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what site at most is taken place ?
| SELECT "site" FROM table_204_250 GROUP BY "site" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_66344 (
"Rank" real,
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When rank is 33, what is the smallest lane?
| SELECT MIN("Lane") FROM table_66344 WHERE "Rank" = '33' | wikisql |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airli... | 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 = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DE... | atis |
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 procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Replacement of tube or enterostomy device of small intestine" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
CREATE TABLE table_22645714_5 (
tournament_venue__city_ VARCHAR,
conference VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many locations are listed for the Big 12 Conference?
| SELECT COUNT(tournament_venue__city_) FROM table_22645714_5 WHERE conference = "Big 12 conference" | sql_create_context |
CREATE TABLE table_name_73 (
att_cmp_int VARCHAR,
effic VARCHAR,
gp_gs VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the att-cmp-int with an effic smaller than 117.88 and a gp-gs of 10-0?
| SELECT att_cmp_int FROM table_name_73 WHERE effic < 117.88 AND gp_gs = "10-0" | sql_create_context |
CREATE TABLE table_name_44 (
issue INTEGER,
artist VARCHAR,
spoofed_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which issue was the Spoofed title Route 67 for which Mort Drucker was the artist?
| SELECT SUM(issue) FROM table_name_44 WHERE artist = "mort drucker" AND spoofed_title = "route 67" | sql_create_context |
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.
-- what song was in the first week ?
| SELECT "song choice" FROM table_204_889 WHERE "week (stage)" = 1 | squall |
CREATE TABLE table_19089486_1 (
clubs_involved INTEGER,
leagues_entering_this_round VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least clubs involved for leagues being none for semi finals
| SELECT MIN(clubs_involved) FROM table_19089486_1 WHERE leagues_entering_this_round = "none" AND round = "Semi finals" | sql_create_context |
CREATE TABLE table_name_66 (
player VARCHAR,
to_par VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player had a To par of +11?
| SELECT player FROM table_name_66 WHERE to_par = "+11" | sql_create_context |
CREATE TABLE table_name_76 (
scores_by_each_individual_judge VARCHAR,
total_score_week VARCHAR,
co_contestant__yaar_vs_pyaar_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Scores by each individual judge has a Total score/week of 51/60, and a Co-co... | SELECT scores_by_each_individual_judge FROM table_name_76 WHERE total_score_week = "51/60" AND co_contestant__yaar_vs_pyaar_ = "tina sachdev" | sql_create_context |
CREATE TABLE table_11390711_4 (
english_name VARCHAR,
abbreviation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which colleges have the english abbreviation MTC?
| SELECT english_name FROM table_11390711_4 WHERE abbreviation = "MTC" | sql_create_context |
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 text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '59512324' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 9835.59) | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.