instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_2850912_12 (
college_junior_club_team VARCHAR,
nhl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- To which organziation does the winnipeg jets belong to?
| SELECT college_junior_club_team FROM table_2850912_12 WHERE nhl_team = "Winnipeg Jets" | sql_create_context |
CREATE TABLE table_36868 (
"Name" text,
"Faith" text,
"Type" text,
"Intake" real,
"DCSF number" real,
"Ofsted number" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Ofsted number for a primary with a CE faith, intake of 30 and... | SELECT MIN("Ofsted number") FROM table_36868 WHERE "Type" = 'primary' AND "Faith" = 'ce' AND "Intake" = '30' AND "DCSF number" < '3349' | wikisql |
CREATE TABLE table_name_21 (
state VARCHAR,
royal_house VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What state had the name of wu for the royal house of ji?
| SELECT state FROM table_name_21 WHERE royal_house = "ji" AND name = "wu" | sql_create_context |
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 mzjzjlb (
HXPLC number,
HZXM ... | 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 = '7539997' AND zyjzjlb.JZKSMC LIKE '%耳鼻喉科%' | css |
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 lab (
subject_id text,
hadm_id text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "M" AND procedures.icd9_code = "5651" | mimicsql_data |
CREATE TABLE table_name_37 (
runner_s__up VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is Runner(s)-up that has a Date of may 24, 1999?
| SELECT runner_s__up FROM table_name_37 WHERE date = "may 24, 1999" | sql_create_context |
CREATE TABLE table_21884 (
"Season" text,
"Date" text,
"Driver" text,
"Team" text,
"Chassis" text,
"Engine" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tabl... | SELECT "Miles (km)" FROM table_21884 WHERE "Race Time" = '1:34:01' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
C... | SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_NM = '俞雅韶' AND t_kc22.STA_DATE BETWEEN '2002-11-03' AND '2013-11-20' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_204_54 (
id number,
"pondicherry assembly" text,
"duration" text,
"name of m.l.a." text,
"party affiliation" text,
"election year" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what party is represented the most ?
| SELECT "party affiliation" FROM table_204_54 GROUP BY "party affiliation" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_59220 (
"Physical property" text,
"Helium" text,
"Neon" text,
"Argon" text,
"Krypton" text,
"Xenon" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Krypton has a Physical property of critical pressure (atm)?
| SELECT "Krypton" FROM table_59220 WHERE "Physical property" = 'critical pressure (atm)' | wikisql |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 20 AND 29) AND STRFTIME('%y', medication.drugstarttime) >= '2100' GROUP BY medication.drugn... | eicu |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0... | SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(MANAGER_ID) DESC | nvbench |
CREATE TABLE table_15030 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the latest year with more than 0 points?
| SELECT MAX("Year") FROM table_15030 WHERE "Points" > '0' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime t... | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-8953')) AND DATETIME(treatment.treatmenttime, 'start of year'... | eicu |
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_id varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREA... | SELECT COUNT(DISTINCT course.course_id, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 200 AND 200 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = course_offering.se... | advising |
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 MAX(demographic.age) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.insurance = "Medicare" | mimicsql_data |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE c... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_i... | mimic_iii |
CREATE TABLE table_name_41 (
condition VARCHAR,
partial_thromboplastin_time VARCHAR,
bleeding_time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the condition that has a partial thromboplastin time of prolonged and unaffected bleeding time
| SELECT condition FROM table_name_41 WHERE partial_thromboplastin_time = "prolonged" AND bleeding_time = "unaffected" | sql_create_context |
CREATE TABLE table_3988 (
"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.
-- What number episode in the ... | SELECT MAX("No. in series") FROM table_3988 WHERE "Title" = 'Best Laid Plans' | wikisql |
CREATE TABLE table_72550 (
"PowerShell (Cmdlet)" text,
"PowerShell (Alias)" text,
"CMD.EXE / COMMAND.COM" text,
"Unix shell" text,
"Description" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many values of powershell (cmdlet) are valid when uni... | SELECT COUNT("PowerShell (Cmdlet)") FROM table_72550 WHERE "Unix shell" = 'env, export, set, setenv' | wikisql |
CREATE TABLE organizations (
organization_id number,
parent_organization_id number,
organization_details text
)
CREATE TABLE timed_locations_of_things (
thing_id number,
date_and_time time,
location_code text
)
CREATE TABLE customer_events (
customer_event_id number,
customer_id number... | SELECT other_details FROM residents WHERE other_details LIKE '%Miss%' | spider |
CREATE TABLE table_name_38 (
date VARCHAR,
fastest_lap VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date did Gunnar Nilsson make the fastest lap?
| SELECT date FROM table_name_38 WHERE fastest_lap = "gunnar nilsson" | sql_create_context |
CREATE TABLE table_72461 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wa... | SELECT "High rebounds" FROM table_72461 WHERE "Team" = 'Charlotte' | wikisql |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY All_Home DESC | nvbench |
CREATE TABLE table_65307 (
"World record" text,
"Snatch" text,
"Chen Yanqing ( CHN )" text,
"111kg" text,
"Doha , Qatar" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Doha, Qatar when the snatch is clean & jerk?
| SELECT "Doha , Qatar" FROM table_65307 WHERE "Snatch" = 'clean & jerk' | wikisql |
CREATE TABLE table_14720 (
"Game" real,
"Date" text,
"Location" text,
"Time" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If time is 2:13 and attendance is less than 56,335, what is the largest game number?
| SELECT MAX("Game") FROM table_14720 WHERE "Attendance" < '56,335' AND "Time" = '2:13' | wikisql |
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE... | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(EMPLOYEE_ID) DESC | nvbench |
CREATE TABLE table_name_96 (
name VARCHAR,
launched_by VARCHAR,
propulsion VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the anti-ship missile that had a turbojet propulsion that was launched by a surface, sub after... | SELECT name FROM table_name_96 WHERE propulsion = "turbojet" AND year > 1985 AND launched_by = "surface, sub" | sql_create_context |
CREATE TABLE table_47581 (
"Year (Ceremony)" text,
"Film title used in nomination" text,
"Original title" text,
"Primary Language(s)" text,
"Director" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Director, when Original ... | SELECT "Director" FROM table_47581 WHERE "Original title" = 'sahə' | wikisql |
CREATE TABLE table_66035 (
"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 game score when the tie no is 7?
| SELECT "Score" FROM table_66035 WHERE "Tie no" = '7' | wikisql |
CREATE TABLE table_23512864_4 (
winning_party_coalition VARCHAR,
election_year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the winning party/coalition name in election year 1980?
| SELECT winning_party_coalition FROM table_23512864_4 WHERE election_year = 1980 | sql_create_context |
CREATE TABLE table_name_68 (
player VARCHAR,
round VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- After Round 5, which player was drafted for Defensive Tackle?
| SELECT player FROM table_name_68 WHERE round > 5 AND position = "defensive tackle" | sql_create_context |
CREATE TABLE table_name_87 (
round INTEGER,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest round number for Dan Connor, the player?
| SELECT MAX(round) FROM table_name_87 WHERE player = "dan connor" | sql_create_context |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT Room, COUNT(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId GROUP BY T1.Room ORDER BY Room DESC | nvbench |
CREATE TABLE table_2436 (
"Conference" text,
"Regular Season Winner" text,
"Conference Player of the Year" text,
"Conference Tournament" text,
"Tournament Venue (City)" text,
"Tournament Winner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Whe... | SELECT "Tournament Venue (City)" FROM table_2436 WHERE "Regular Season Winner" = 'UCLA' | wikisql |
CREATE TABLE table_name_25 (
record VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record on june 29?
| SELECT record FROM table_name_25 WHERE date = "june 29" | sql_create_context |
CREATE TABLE table_65469 (
"Heat" real,
"Lane" real,
"Name" text,
"Nationality" text,
"Time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total heat number of sun yang, who has a lane less than 2?
| SELECT COUNT("Heat") FROM table_65469 WHERE "Name" = 'sun yang' AND "Lane" < '2' | wikisql |
CREATE TABLE table_22915134_2 (
ignition_timing VARCHAR,
graphical VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 1-1-0-0-1-1-0-0- is the graphical how many ignition timings are there?
| SELECT COUNT(ignition_timing) FROM table_22915134_2 WHERE graphical = "1-1-0-0-1-1-0-0-" | sql_create_context |
CREATE TABLE Finances (
Finance_ID INTEGER,
Other_Details VARCHAR(255)
)
CREATE TABLE Channels (
Channel_ID INTEGER,
Other_Details VARCHAR(255)
)
CREATE TABLE Assets_in_Events (
Asset_ID INTEGER,
Event_ID INTEGER
)
CREATE TABLE Parties_in_Events (
Party_ID INTEGER,
Event_ID INTEGER,
... | SELECT Product_Name, COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name ORDER BY Product_Name DESC | nvbench |
CREATE TABLE table_23821 (
"Barangay" text,
"District" text,
"Population (May 1, 2000)" real,
"Population (August 1, 2007)" real,
"Population (May 1, 2010)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name th epopulation may for general terrero
| SELECT "Population (May 1, 2000)" FROM table_23821 WHERE "Barangay" = 'General Terrero' | wikisql |
CREATE TABLE table_name_2 (
opponent VARCHAR,
game VARCHAR,
december VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent on December 1, before Game 28?
| SELECT opponent FROM table_name_2 WHERE game < 28 AND december = 1 | sql_create_context |
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Draw a pie chart for what i... | SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job | nvbench |
CREATE TABLE table_26708105_5 (
aa_length VARCHAR,
protein_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the aa length when the protein name is c11orf73?
| SELECT aa_length FROM table_26708105_5 WHERE protein_name = "C11orf73" | sql_create_context |
CREATE TABLE table_name_82 (
finish VARCHAR,
manager VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the finish when the manager is tom kotchman and record is 43-33?
| SELECT finish FROM table_name_82 WHERE manager = "tom kotchman" AND record = "43-33" | sql_create_context |
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 jybgb (
BBCJBW text,
BBDM tex... | SELECT * 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 hz_info.YLJGDM = '7783092' AND NOT wdmzjzjlb.CYKSMC LIKE '%胸外%' UNION SELECT * FROM person_info JO... | css |
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Dorm_amenity (
ameni... | SELECT city_code, AVG(Age) FROM Student WHERE Sex = 'M' GROUP BY city_code ORDER BY city_code | nvbench |
CREATE TABLE table_20088 (
"Locale" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT MAX("Ends Lost") FROM table_20088 WHERE "Ends Won" = '47' | wikisql |
CREATE TABLE voting_record (
stuid number,
registration_date text,
election_cycle text,
president_vote number,
vice_president_vote number,
secretary_vote number,
treasurer_vote number,
class_president_vote number,
class_senator_vote number
)
CREATE TABLE student (
stuid number,
... | SELECT DISTINCT T1.lname FROM student AS T1 JOIN voting_record AS T2 ON T1.stuid = president_vote INTERSECT SELECT DISTINCT lname FROM student WHERE advisor = "8741" | spider |
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address ... | SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id ORDER BY COUNT(booking_start_date) | nvbench |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT UserId AS "user_link", CommentCount, up.postCount, ROUND(CAST(CommentCount AS FLOAT) / up.postCount, 2) AS ratio FROM (SELECT COUNT(c.Id) AS commentCount, p.OwnerUserId AS userid FROM (SELECT Id, PostId FROM Comments WHERE UserId = '##userid##') AS c JOIN Posts AS p ON c.PostId = p.Id GROUP BY p.OwnerUserId) AS ... | sede |
CREATE TABLE table_15887683_10 (
content VARCHAR,
television_service VARCHAR,
dar VARCHAR,
package_option VARCHAR,
language VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the content for sky famiglia for italian and dar 16:9 for mtv hits
| SELECT content FROM table_15887683_10 WHERE package_option = "Sky Famiglia" AND language = "Italian" AND dar = "16:9" AND television_service = "MTV Hits" | sql_create_context |
CREATE TABLE table_name_24 (
laps INTEGER,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the high lap total for pedro diniz?
| SELECT MAX(laps) FROM table_name_24 WHERE driver = "pedro diniz" | sql_create_context |
CREATE TABLE table_14323347_1 (
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of 1992-93 for 115 points
| SELECT COUNT(1992 AS _93) FROM table_14323347_1 WHERE points = 115 | sql_create_context |
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
... | SELECT County_name, Population FROM county ORDER BY Population DESC | nvbench |
CREATE TABLE table_name_16 (
away_team VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the away team at the game held at Arden Street Oval?
| SELECT away_team FROM table_name_16 WHERE venue = "arden street oval" | sql_create_context |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
Deletio... | SELECT Name, COUNT(*) AS "number of badges" FROM Badges GROUP BY Name | sede |
CREATE TABLE table_16186152_1 (
percentage VARCHAR,
state_delegate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the percentage when the state delegate is 1662?
| SELECT percentage FROM table_16186152_1 WHERE state_delegate = 1662 | sql_create_context |
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 WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.age < "45" | mimicsql_data |
CREATE TABLE zyjybgb (
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '强迫性障碍' AND jyjgzbb.JCZBMC = '... | css |
CREATE TABLE table_17827271_1 (
roleplay VARCHAR,
actor_required VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many RolePlay actors played the role requiring a 'male, younger' actor?
| SELECT COUNT(roleplay) FROM table_17827271_1 WHERE actor_required = "Male, younger" | sql_create_context |
CREATE TABLE table_25358 (
"Order" real,
"Episode" text,
"Airdate" text,
"Rating" text,
"Share" real,
"Rating/Share (18\u201349)" text,
"Viewers (millions)" text,
"Rank (night)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the mos... | SELECT MAX("Share") FROM table_25358 WHERE "Viewers (millions)" = '2.76' | wikisql |
CREATE TABLE table_1639689_2 (
kickoff VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the kickoff time on monday, may 13?
| SELECT kickoff FROM table_1639689_2 WHERE date = "Monday, May 13" | sql_create_context |
CREATE TABLE table_67666 (
"Team" text,
"Games Played" real,
"Wins" real,
"Losses" real,
"Ties" real,
"Goals For" real,
"Goals Against" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team has the most wins with at least 18 goals and les... | SELECT MAX("Wins") FROM table_67666 WHERE "Goals For" = '18' AND "Losses" < '5' | wikisql |
CREATE TABLE table_30200 (
"No." real,
"Title" text,
"Lyricist" text,
"Composer" text,
"Arrangement" text,
"Sound Engineer" text,
"Length" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the arrangement for bets3ab 3alia nafsy?
| SELECT "Arrangement" FROM table_30200 WHERE "Title" = 'Bets3ab 3alia Nafsy' | wikisql |
CREATE TABLE table_203_790 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of wins ?
| SELECT COUNT(*) FROM table_203_790 WHERE "result" = 'w' | squall |
CREATE TABLE table_24116 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Black Knights points" real,
"Opponents" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games have Air Force as the opponent?
| SELECT MAX("Game") FROM table_24116 WHERE "Opponent" = 'Air Force' | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.long_title = "Closure of skin and subcutaneous tissue of other sites" | mimicsql_data |
CREATE TABLE table_204_713 (
id number,
"rank" number,
"bib" number,
"athlete" text,
"country" text,
"time" text,
"deficit" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- the first time on the list is ?
| SELECT "time" FROM table_204_713 WHERE id = 1 | squall |
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_kc21.PERSON_NM, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE, t_kc21.IDENTITY_CARD FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '67596445659' | css |
CREATE TABLE table_24192190_1 (
magnitude VARCHAR,
latitude VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 43.048 n is the latitude what is the magnitude?
| SELECT magnitude FROM table_24192190_1 WHERE latitude = "43.048° N" | sql_create_context |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE flight (
aircraft_code_sequence text,
air... | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.arrival_time = 1700 AND flight.to_airport = AIRPORT_SERVICE_1.a... | atis |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId num... | SELECT t.TagName, COUNT(*) AS NrOfQuestions, AVG(RepGain) AS AvgRepGain FROM Tags AS t JOIN PostTags AS pt ON pt.TagId = t.Id JOIN (SELECT pp.Id, SUM(CASE WHEN v.VoteTypeId = 2 THEN 10 WHEN v.VoteTypeId = 2 THEN -2 ELSE NULL END) AS RepGain FROM Posts AS pp JOIN Posts AS pa ON pa.ParentId = pp.Id JOIN Votes AS v ON v.P... | sede |
CREATE TABLE tracklists (
albumid number,
position number,
songid number
)
CREATE TABLE instruments (
songid number,
bandmateid number,
instrument text
)
CREATE TABLE songs (
songid number,
title text
)
CREATE TABLE band (
id number,
firstname text,
lastname text
)
CREATE... | SELECT T2.firstname, T2.lastname FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id JOIN songs AS T3 ON T3.songid = T1.songid WHERE T3.title = "Der Kapitan" AND T1.stageposition = "back" | spider |
CREATE TABLE table_name_74 (
points_won VARCHAR,
year VARCHAR,
total_matches VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In 2007, how many points were won when more than 5 matches were played?
| SELECT COUNT(points_won) FROM table_name_74 WHERE year = "2007" AND total_matches > 5 | sql_create_context |
CREATE TABLE table_name_24 (
split__50m_ INTEGER,
name VARCHAR,
lane VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total sum of 50m splits for josefin lillhage in lanes above 8?
| SELECT SUM(split__50m_) FROM table_name_24 WHERE name = "josefin lillhage" AND lane > 8 | sql_create_context |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
war... | SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 739)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [systol... | mimic_iii |
CREATE TABLE table_201_15 (
id number,
"year" number,
"single" text,
"chart positions\nspa" number,
"album" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- based on sales figures , what auryn album is the most popular ?
| SELECT "album" FROM table_201_15 ORDER BY "chart positions\nspa" LIMIT 1 | squall |
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 wdmzjzjlb.KH, wdmzjzjlb.KLX FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '84230501180' UNION SELECT bdmzjzjlb.KH, bdmzjzjlb.KLX FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '84230501180' | css |
CREATE TABLE table_11404452_1 (
director VARCHAR,
us_viewers__millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the director when there were 13.66 million u.s viewers?
| SELECT director FROM table_11404452_1 WHERE us_viewers__millions_ = "13.66" | sql_create_context |
CREATE TABLE table_28138035_4 (
womens_doubles VARCHAR,
mens_singles VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the womens doubles for werner schlager
| SELECT womens_doubles FROM table_28138035_4 WHERE mens_singles = "Werner Schlager" | sql_create_context |
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownV... | SELECT Rank = ROW_NUMBER() OVER (ORDER BY ROUND((CAST('Total Score' AS FLOAT) / CAST('Total Answers' AS FLOAT)), 2) DESC), ROUND((CAST('Total Score' AS FLOAT) / CAST('Total Answers' AS FLOAT)), 2) AS "Score Per Answer", u.Id AS "user_link", u.Reputation, 'Total Answers', ROUND((CAST(u.Reputation AS FLOAT) / CAST('Total... | sede |
CREATE TABLE table_4881 (
"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 away team's score at brunswick street... | SELECT "Away team score" FROM table_4881 WHERE "Venue" = 'brunswick street oval' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.icd9_code = "2864" | mimicsql_data |
CREATE TABLE table_name_66 (
constructor VARCHAR,
time_retired VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who built the car that has a Time/Retired of 1:36:38.887?
| SELECT constructor FROM table_name_66 WHERE time_retired = "1:36:38.887" | sql_create_context |
CREATE TABLE table_name_95 (
event VARCHAR,
class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the event when the class is time trial hc a?
| SELECT event FROM table_name_95 WHERE class = "time trial hc a" | sql_create_context |
CREATE TABLE table_6604 (
"Player" text,
"Rating" real,
"Cmp." real,
"Att." real,
"Cmp. %" real,
"Yards" real,
"Int." real,
"Long" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Cmp % has an Int smaller than 2 and a Cmpnsmaller tha... | SELECT MIN("Cmp. %") FROM table_6604 WHERE "Int." < '2' AND "Cmp." < '1' | wikisql |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
... | SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13528) AND STRFTIME('%y-%m', prescriptions.startdate) >= '2104-12' ORDER BY prescriptions.startdate DESC LIMIT 1 | mimic_iii |
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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'X67.195' AND jyjgzbb.JCZBDM = '691450' | 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.dischtime IS NULL AND admissions.age BETWEEN 20 AND 29 | mimic_iii |
CREATE TABLE table_name_30 (
competition VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Competition has a Year of 1993?
| SELECT competition FROM table_name_30 WHERE year = 1993 | sql_create_context |
CREATE TABLE table_64868 (
"Year" real,
"Game" text,
"Genre" text,
"Platform(s)" text,
"Developer(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which platforms can you play Portal 2 on?
| SELECT "Platform(s)" FROM table_64868 WHERE "Game" = 'portal 2' | wikisql |
CREATE TABLE table_203_171 (
id number,
"place\n(posicion)" number,
"team\n(equipo)" text,
"played\n(pj)" number,
"won\n(pg)" number,
"draw\n(pe)" number,
"lost\n(pp)" number,
"goals scored\n(gf)" number,
"goals conceded\n(gc)" number,
"+/-\n(dif.)" number,
"points\n(pts.)" n... | SELECT "team\n(equipo)" FROM table_203_171 WHERE "draw\n(pe)" = (SELECT MAX("draw\n(pe)") FROM table_203_171) | squall |
CREATE TABLE table_18123274_1 (
year__ceremony_ VARCHAR,
result VARCHAR,
director VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the year for not nominated for alberto aruelo
| SELECT year__ceremony_ FROM table_18123274_1 WHERE result = "Not Nominated" AND director = "Alberto Aruelo" | sql_create_context |
CREATE TABLE table_name_86 (
result VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result against Clemson?
| SELECT result FROM table_name_86 WHERE opponent = "clemson" | sql_create_context |
CREATE TABLE table_26224 (
"Year" real,
"Division" real,
"League" text,
"Regular Season" text,
"Playoffs" text,
"Open Cup" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of open cup for 1996
| SELECT COUNT("Open Cup") FROM table_26224 WHERE "Year" = '1996' | wikisql |
CREATE TABLE table_name_75 (
constructor VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the constructor for 10 august
| SELECT constructor FROM table_name_75 WHERE date = "10 august" | sql_create_context |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT DATE(CreationDate), COUNT(*) AS Actual, MAX(Id) - MIN(Id) AS Expected, MIN(Id), MAX(Id) FROM Users GROUP BY DATE(CreationDate) ORDER BY 1 DESC | sede |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE d... | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-74343')) AND DATETIME(treatment.treatmenttime, 'start of year... | eicu |
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Projects (
Project_ID INTEGER,
Project_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
... | SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types GROUP BY Document_Type_Description ORDER BY COUNT(Document_Type_Description) | nvbench |
CREATE TABLE table_62198 (
"Player" text,
"Height" real,
"Position" text,
"Year born (Age)" text,
"Current Club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the current club with a position of sg/sf and a height less than 1.96?
| SELECT "Current Club" FROM table_62198 WHERE "Position" = 'sg/sf' AND "Height" < '1.96' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.