instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_58 (
record VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the final record for the Philadelphia 76ers?
| SELECT record FROM table_name_58 WHERE opponent = "philadelphia 76ers" | sql_create_context |
CREATE TABLE table_56801 (
"Parties and voter communities" text,
"% 2006" real,
"Seats 2006" real,
"% 2001" real,
"Seats 2001" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number of Seats 2006 held by the Christian Democratic U... | SELECT MAX("Seats 2006") FROM table_56801 WHERE "Parties and voter communities" = 'christian democratic union of germany' AND "% 2006" > '24.6' | wikisql |
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_... | 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, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILWAUKEE' AND date_day.day_number = 23 AND date_day.month_number = 4 AN... | atis |
CREATE TABLE table_name_17 (
date VARCHAR,
week VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Date has a Week smaller than 11, and a Attendance of 54,094?
| SELECT date FROM table_name_17 WHERE week < 11 AND attendance = "54,094" | sql_create_context |
CREATE TABLE races (
raceid VARCHAR,
name VARCHAR
)
CREATE TABLE results (
driverid VARCHAR,
raceid VARCHAR
)
CREATE TABLE drivers (
forename VARCHAR,
driverid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the id and forenames of driv... | SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Australian Grand Prix" INTERSECT SELECT T2.driverid, T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = ... | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.icd9_code = "3972" | mimicsql_data |
CREATE TABLE table_43953 (
"Constellation" text,
"Largest component, fractional share" real,
"Other components, fractional shares" text,
"N, Laakso-Taagepera" real,
"N, Golosov" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of the v... | SELECT SUM("N, Laakso-Taagepera") FROM table_43953 WHERE "Largest component, fractional share" = '0.35000000000000003' AND "Constellation" = 'e' | wikisql |
CREATE TABLE Finances (
Finance_ID INTEGER,
Other_Details VARCHAR(255)
)
CREATE TABLE Parties_in_Events (
Party_ID INTEGER,
Event_ID INTEGER,
Role_Code CHAR(15)
)
CREATE TABLE Agreements (
Document_ID INTEGER,
Event_ID INTEGER
)
CREATE TABLE Parties (
Party_ID INTEGER,
Party_Detai... | SELECT Product_Name, COUNT(Product_Name) FROM Products WHERE NOT Product_ID IN (SELECT Product_ID FROM Products_in_Events) GROUP BY Product_Name ORDER BY COUNT(Product_Name) | nvbench |
CREATE TABLE table_name_75 (
location VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location of the match against Martinis Knyzelis?
| SELECT location FROM table_name_75 WHERE opponent = "martinis knyzelis" | sql_create_context |
CREATE TABLE table_25252080_3 (
january_15_16 VARCHAR,
november_3 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number is shown for january 15-16 when november 3 is 133?
| SELECT january_15_16 FROM table_25252080_3 WHERE november_3 = "133" | sql_create_context |
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Student... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment | nvbench |
CREATE TABLE table_name_47 (
rank VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What rank has jo angel (wa) as the player?
| SELECT rank FROM table_name_47 WHERE player = "jo angel (wa)" | sql_create_context |
CREATE TABLE table_37189 (
"Ship" text,
"Hull No." text,
"Builder" text,
"Home Port" text,
"Commissioned\u2013 Decommissioned" text,
"NVR page" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the commissioned-decommissioned for NVR page of a... | SELECT "Commissioned\u2013 Decommissioned" FROM table_37189 WHERE "NVR page" = 'aor-7' | wikisql |
CREATE TABLE table_13566548_1 (
autonomous_community VARCHAR,
wind_power VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the community with a wind power of 1042?
| SELECT autonomous_community FROM table_13566548_1 WHERE wind_power = 1042 | sql_create_context |
CREATE TABLE table_51920 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What home score has an Away team of fitzroy?
| SELECT "Home team score" FROM table_51920 WHERE "Away team" = 'fitzroy' | wikisql |
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_DIRE_CD text,
MED_DIRE_NM text,... | SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0660177' AND t_kc21.IN_HOSP_DATE BETWEEN '2016-05-01' AND '2016-12-18' AND t_kc21.CLINIC_TYPE = '门诊' | css |
CREATE TABLE table_name_95 (
date VARCHAR,
home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When were the boston bruins the home team?
| SELECT date FROM table_name_95 WHERE home = "boston bruins" | sql_create_context |
CREATE TABLE table_203_501 (
id number,
"title" text,
"genre" text,
"sub\u00addivisions" text,
"libretto" text,
"premiere date" text,
"place, theatre" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are the number of titles that premiere... | SELECT COUNT(DISTINCT "title") FROM table_203_501 WHERE "premiere date" = 9 | squall |
CREATE TABLE table_36628 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the loss when the record was 46-59?
| SELECT "Loss" FROM table_36628 WHERE "Record" = '46-59' | wikisql |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
Owne... | SELECT TIME_TO_STR(CreationDate, '%W'), COUNT(1) FROM Posts WHERE PostTypeId = 1 GROUP BY TIME_TO_STR(CreationDate, '%W') | sede |
CREATE TABLE table_28005100_1 (
arrangement VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the arrangement for bets3ab 3alia nafsy?
| SELECT arrangement FROM table_28005100_1 WHERE title = "Bets3ab 3alia Nafsy" | sql_create_context |
CREATE TABLE table_name_35 (
hometown VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the hometown of the player who attended Ohio State?
| SELECT hometown FROM table_name_35 WHERE college = "ohio state" | sql_create_context |
CREATE TABLE table_78253 (
"Race Title" text,
"Circuit" text,
"City / State" text,
"Date" text,
"Winner" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which driver won the Phillip Island Grand Prix Circuit?
| SELECT "Winner" FROM table_78253 WHERE "Circuit" = 'phillip island grand prix circuit' | wikisql |
CREATE TABLE table_63571 (
"Song" text,
"Performer" text,
"Original artist" text,
"Length" text,
"Recorded" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which song lasts 4:08?
| SELECT "Song" FROM table_63571 WHERE "Length" = '4:08' | wikisql |
CREATE TABLE table_name_68 (
against INTEGER,
draws VARCHAR,
losses VARCHAR,
wimmera_fl VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Against has Losses smaller than 5, and a Wimmera FL of warrack eagles, and Draws smaller than 0?
| SELECT AVG(against) FROM table_name_68 WHERE losses < 5 AND wimmera_fl = "warrack eagles" AND draws < 0 | sql_create_context |
CREATE TABLE table_name_8 (
catalog VARCHAR,
format VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Catalog released on June 29, 1999 has a Digipak Album Format?
| SELECT catalog FROM table_name_8 WHERE format = "digipak album" AND date = "june 29, 1999" | sql_create_context |
CREATE TABLE table_name_14 (
lyricist VARCHAR,
film VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wrote the lyrics for Mukti?
| SELECT lyricist FROM table_name_14 WHERE film = "mukti" | sql_create_context |
CREATE TABLE table_65805 (
"President" text,
"Date of birth" text,
"Date of inauguration" text,
"Age at inauguration" text,
"End of term" text,
"Length of retirement" text,
"Date of death" text,
"Lifespan" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT "Date of death" FROM table_65805 WHERE "Date of inauguration" = 'date of inauguration' | wikisql |
CREATE TABLE table_name_37 (
attendance VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the attendance when oadby town is away?
| SELECT attendance FROM table_name_37 WHERE away_team = "oadby town" | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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 t... | SELECT JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '3425088' AND BGRQ BETWEEN '2001-09-12' AND '2013-10-13' GROUP BY JCZBMC, JCZBJGDW ORDER BY AVG(JCZBJGDL) LIMIT 13 | css |
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking... | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code | nvbench |
CREATE TABLE table_3474 (
"District" real,
"Senator" text,
"Party" text,
"Residence" text,
"First elected" text,
"Term Limited" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the party affiliation for senator mark Wagoner?
| SELECT "Party" FROM table_3474 WHERE "Senator" = 'Mark Wagoner' | wikisql |
CREATE TABLE table_56087 (
"Class" text,
"Wheels" text,
"Date" text,
"No. built" real,
"Loco Nos." text,
"Comments" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Loco Nos of the e3 class?
| SELECT "Loco Nos." FROM table_56087 WHERE "Class" = 'e3' | wikisql |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)... | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 519 OR course.number = 537) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... | advising |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
... | SELECT chartevents.valuenum 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 = 17398)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht'... | mimic_iii |
CREATE TABLE table_54622 (
"Pitcher" text,
"Date" text,
"Team" text,
"Result" text,
"Site" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the pitcher on september 6, 2006
| SELECT "Pitcher" FROM table_54622 WHERE "Date" = 'september 6, 2006' | wikisql |
CREATE TABLE table_name_67 (
pos INTEGER,
matches INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Matches larger than 5 is the sum of what position?
| SELECT SUM(pos) FROM table_name_67 WHERE matches > 5 | sql_create_context |
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_Road, School_ID FROM basketball_match | nvbench |
CREATE TABLE table_name_50 (
erp_w INTEGER,
frequency_mhz VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Frequency MHz of 88.7 had what average erp w?
| SELECT AVG(erp_w) FROM table_name_50 WHERE frequency_mhz = 88.7 | sql_create_context |
CREATE TABLE table_51259 (
"Name" text,
"Years" text,
"Gender" text,
"Local board" text,
"Suburb" text,
"Authority" text,
"Decile" text,
"Roll" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was the name mount roskill grammar s... | SELECT "Years" FROM table_51259 WHERE "Name" = 'mount roskill grammar school' | wikisql |
CREATE TABLE fgwyjzb (
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_SER_ORG_NO = '3389620' AND gwyjzb.OUT_DIAG_DOC_NM LIKE '窦%' UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '戚清佳' AND fgwyjzb.MED_SER_ORG_NO = '3389620' AN... | css |
CREATE TABLE table_1341453_45 (
district VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What district is nick lampson from?
| SELECT district FROM table_1341453_45 WHERE incumbent = "Nick Lampson" | sql_create_context |
CREATE TABLE table_20444 (
"Party" text,
"Marplan" text,
"Gallup" text,
"National Opinion Polls (NOP)" text,
"Opinion Research Centre (OPC)" text,
"Harris" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On all other parties the National option p... | SELECT "Opinion Research Centre (OPC)" FROM table_20444 WHERE "National Opinion Polls (NOP)" = '1.3%' | wikisql |
CREATE TABLE table_35211 (
"Pos." real,
"Car #" real,
"Driver" text,
"Make" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest position for driver Kyle Busch?
| SELECT MIN("Pos.") FROM table_35211 WHERE "Driver" = 'kyle busch' | wikisql |
CREATE TABLE apartment_facilities (
apt_id number,
facility_code text
)
CREATE TABLE apartment_bookings (
apt_booking_id number,
apt_id number,
guest_id number,
booking_status_code text,
booking_start_date time,
booking_end_date time
)
CREATE TABLE guests (
guest_id number,
gen... | SELECT AVG(room_count) FROM apartments WHERE apt_type_code = "Studio" | spider |
CREATE TABLE table_54859 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Kickoff Time" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result of the game with 68,436 attending?
| SELECT "Result" FROM table_54859 WHERE "Attendance" = '68,436' | wikisql |
CREATE TABLE table_name_17 (
place VARCHAR,
country VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the Place which has a Score of 67-71=138, united states?
| SELECT place FROM table_name_17 WHERE country = "united states" AND score = 67 - 71 = 138 | sql_create_context |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate... | SELECT COUNT(*) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31854)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'br milk fs p... | mimic_iii |
CREATE TABLE table_57439 (
"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 did the team score while away in moorabbin ... | SELECT "Away team score" FROM table_57439 WHERE "Venue" = 'moorabbin oval' | wikisql |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE fare_basis (
fare_basis_code ... | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILAD... | atis |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | SELECT COUNT(*) FROM mzjzjlb WHERE JZKSMC = '脊柱外科' AND JZKSRQ BETWEEN '2000-06-22' AND '2013-12-25' | css |
CREATE TABLE table_55383 (
"Sport" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- With more than 1 Gold and Silver and Total Sport, what is the Total?
| SELECT AVG("Total") FROM table_55383 WHERE "Silver" > '1' AND "Sport" = 'total' AND "Gold" > '1' | wikisql |
CREATE TABLE table_66426 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the score 3-6 4-6?
| SELECT "Date" FROM table_66426 WHERE "Score" = '3-6 4-6' | wikisql |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewRejectionReasons (
Id ... | SELECT COUNT(Id), Tags, RIGHT(LEFT(CreationDate, 11), 4) AS year, LEFT(CreationDate, 3) AS month FROM Posts GROUP BY Tags, RIGHT(LEFT(CreationDate, 11), 4), LEFT(CreationDate, 3) HAVING COUNT(Id) > 5 ORDER BY COUNT(Id) DESC | sede |
CREATE TABLE table_34655 (
"Number of Decks" real,
"Non-Suited Match" text,
"Double Non-Suited Match" text,
"Suited Match" text,
"Suited + Non-Suited Match" text,
"Double Suited Match" text,
"House Edge" text
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT "Non-Suited Match" FROM table_34655 WHERE "Number of Decks" > '6' | wikisql |
CREATE TABLE table_204_4 (
id number,
"date" text,
"race" text,
"competition" text,
"rider" text,
"country" text,
"location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are the total number of wins for tom boonen overall ?
| SELECT COUNT(*) FROM table_204_4 WHERE "rider" = 'tom boonen' | squall |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABL... | SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 2700 AND admissions.admission_location = 'emergency room admit' AND STRFTIME('%y', admissions.admittime) <= '2104' | mimic_iii |
CREATE TABLE table_19308 (
"Shirt No" real,
"Nationality" text,
"Player" text,
"Birth Date" text,
"Height" real,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the birth date for shirt number 7
| SELECT "Birth Date" FROM table_19308 WHERE "Shirt No" = '7' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,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 locations (
LOCATION_ID decimal(4,0),... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(SALARY) DESC | nvbench |
CREATE TABLE table_name_36 (
week_5 VARCHAR,
week_2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When Audra Lynn was featured in Week 2, who was the cyber girl for Week 5?
| SELECT week_5 FROM table_name_36 WHERE week_2 = "audra lynn" | sql_create_context |
CREATE TABLE table_46291 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest grid with time of +0.499,when laps are larger than 21?
| SELECT MIN("Grid") FROM table_46291 WHERE "Time" = '+0.499' AND "Laps" > '21' | wikisql |
CREATE TABLE table_name_43 (
city VARCHAR,
team VARCHAR,
school VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What city has trojans as the team, and taylor as the school?
| SELECT city FROM table_name_43 WHERE team = "trojans" AND school = "taylor" | sql_create_context |
CREATE TABLE table_44410 (
"Region" text,
"Name" text,
"Reported birth date" text,
"Reported death date" text,
"Reported age" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the reported age when the reported birth date is 22 december 1878?
| SELECT "Reported age" FROM table_44410 WHERE "Reported birth date" = '22 december 1878' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD ... | SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.PERSON_NM = '秦鹏赋' AND t_kc21.IN_HOSP_DATE BETWEEN '2003-08-17' AND '2014-05-16' AND t_kc21.CLINIC_TYPE = '住院' | css |
CREATE TABLE products (
product_id number,
product_details text
)
CREATE TABLE customer_contact_channels (
customer_id number,
channel_code text,
active_from_date time,
active_to_date time,
contact_number text
)
CREATE TABLE customers (
customer_id number,
payment_method text,
... | SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20 | spider |
CREATE TABLE table_26622 (
"Reference" text,
"Author" text,
"Section Size" text,
"Violins" real,
"Violas" real,
"Celli" real,
"Basses" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What reference, written by Nelson Riddle, suggests 2 violas... | SELECT "Reference" FROM table_26622 WHERE "Violas" = '2' AND "Author" = 'Nelson Riddle' | wikisql |
CREATE TABLE table_name_18 (
points VARCHAR,
team_name VARCHAR,
losses VARCHAR,
games VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total number of points when the vancouver burrards have fewer than 9 losses and more than 24 games?
| SELECT COUNT(points) FROM table_name_18 WHERE losses < 9 AND games > 24 AND team_name = "vancouver burrards" | sql_create_context |
CREATE TABLE table_32315 (
"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.
-- Where did a home team score 9.9 (63)?
| SELECT "Venue" FROM table_32315 WHERE "Home team score" = '9.9 (63)' | wikisql |
CREATE TABLE table_1006 (
"Player" text,
"Position" text,
"Games started" text,
"Hometown" text,
"Height" text,
"Weight" real,
"Class" text,
"Prior experience" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many entries are there for... | SELECT COUNT("Class") FROM table_1006 WHERE "Player" = 'Everett Sweeley' | wikisql |
CREATE TABLE table_203_808 (
id number,
"rank" number,
"peak name" text,
"elevation" text,
"location" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what two peaks are taller than dumlong ?
| SELECT "peak name" FROM table_203_808 WHERE "elevation" > (SELECT "elevation" FROM table_203_808 WHERE "peak name" = 'dumlong') | squall |
CREATE TABLE table_52670 (
"Series no." real,
"Season no." 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.
-- Who wrote the series number 49 w... | SELECT "Written by" FROM table_52670 WHERE "Season no." > '4' AND "Series no." = '49' | wikisql |
CREATE TABLE table_27849 (
"Urban settlement" text,
"Cyrillic Name" text,
"City / municipality" text,
"District" text,
"Population (1991)" real,
"Population (2002)" real,
"Population (2011)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wha... | SELECT "Population (1991)" FROM table_27849 WHERE "Urban settlement" = 'Bački Jarak' | wikisql |
CREATE TABLE table_134987_3 (
frequency VARCHAR,
format VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the frequency of the Classic Country Krki-fm booster station?
| SELECT frequency FROM table_134987_3 WHERE format = "Classic Country KRKI-FM booster" | 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 SUM(PER_ACC_PAY) FROM t_kc24 WHERE PERSON_ID = '67640277' AND CLINIC_SLT_DATE BETWEEN '2003-02-06' AND '2014-06-18' | css |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimme... | SELECT Nationality, COUNT(Nationality) FROM swimmer GROUP BY Nationality ORDER BY COUNT(Nationality) | nvbench |
CREATE TABLE table_name_32 (
venue VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What venue had an away team of south melbourne?
| SELECT venue FROM table_name_32 WHERE away_team = "south melbourne" | sql_create_context |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "S/P FALL" AND demographic.dod_year <= "2164.0" | mimicsql_data |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT Posts.Id AS "post_link", COUNT(Upvotes.Id) AS UpvoteCount, COUNT(Downvotes.Id) AS DownvoteCount FROM Posts LEFT JOIN Votes AS Upvotes ON Upvotes.PostId = Posts.Id LEFT JOIN Votes AS Downvotes ON Downvotes.PostId = Posts.Id WHERE Upvotes.VoteTypeId = 2 AND Downvotes.VoteTypeId = 3 AND Posts.PostTypeId = 2 AND Pos... | sede |
CREATE TABLE Organizations (
organization_id INTEGER,
parent_organization_id INTEGER,
organization_details VARCHAR(255)
)
CREATE TABLE Residents (
resident_id INTEGER,
property_id INTEGER,
date_moved_in DATETIME,
date_moved_out DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Proper... | SELECT date_moved_in, COUNT(date_moved_in) FROM Customer_Events GROUP BY date_moved_in ORDER BY COUNT(date_moved_in) | nvbench |
CREATE TABLE table_name_70 (
novelty VARCHAR,
location VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What novelty has USA as the location, and coryloides as the name?
| SELECT novelty FROM table_name_70 WHERE location = "usa" AND name = "coryloides" | sql_create_context |
CREATE TABLE table_28763 (
"Dist." real,
"Democratic Coalition" text,
"Alliance" text,
"Together We Can Do More" text,
"Independent Regional Force" text,
"Independents" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the together we can do... | SELECT "Together We Can Do More" FROM table_28763 WHERE "Democratic Coalition" = 'René Alinco ( PPD )' | wikisql |
CREATE TABLE table_7704 (
"Name/ designation" text,
"Year of intro" real,
"Country of origin" text,
"Primary cartridge" text,
"Type" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Year of Intro(s), when Country of Origin ... | SELECT COUNT("Year of intro") FROM table_7704 WHERE "Country of origin" = 'soviet union' AND "Type" = 'reusable' AND "Primary cartridge" = '40mm' AND "Name/ designation" = 'rpg-29' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '金新翰' AND t_kc22.STA_DATE BETWEEN '2013-08-20' AND '2016-05-24' AND gwyjzb.MED_SER_ORG_NO = '3186559' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_... | css |
CREATE TABLE table_24039173_1 (
capacity INTEGER,
stadium VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the minimum capacity for Sangre Grande Ground?
| SELECT MIN(capacity) FROM table_24039173_1 WHERE stadium = "Sangre Grande Ground" | sql_create_context |
CREATE TABLE table_41758 (
"Driver" text,
"Wins" real,
"Starts" real,
"Sprint" real,
"Feature" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many features did Adam Carroll win 6 times when the start was larger than 32?
| SELECT COUNT("Feature") FROM table_41758 WHERE "Wins" = '6' AND "Driver" = 'adam carroll' AND "Starts" > '32' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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,... | (SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '18416093' AND NOT jybgb.BGDH IN (SELECT BGDH FROM jyjgzbb WHERE JCZ... | css |
CREATE TABLE table_13618584_1 (
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the 2007 result in the 28th district?
| SELECT 2007 AS _result FROM table_13618584_1 WHERE district = "28th" | sql_create_context |
CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE department (
dept_name varchar(20),
building varchar(15),
budget numeric(12,2)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8)... | SELECT dept_name, COUNT(*) FROM student GROUP BY dept_name ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_16175064_3 (
season__number VARCHAR,
director_s_ VARCHAR,
series__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the season number of the episode directed by Donald Crombie and the series number is 40?
| SELECT season__number FROM table_16175064_3 WHERE director_s_ = "Donald Crombie" AND series__number = 40 | sql_create_context |
CREATE TABLE table_76560 (
"Sambalpuri Cinema" text,
"Kosal" text,
"Western Odisha" text,
"Sitalsasthi Carnival" text,
"Sambalpuri Language" text,
"Sambalpuri Saree" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sitalsasthi carnival... | SELECT "Sitalsasthi Carnival" FROM table_76560 WHERE "Sambalpuri Saree" = 'hirakud' | wikisql |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate tim... | SELECT ts.SourceTagName AS "tags", t1.Count, ts.TargetTagName AS "tags", t2.Count, ts.CreationDate, ts.OwnerUserId AS "user_link", ts.ApprovalDate, ts.ApprovedByUserId AS "user_link" FROM TagSynonyms AS ts INNER JOIN Tags AS t1 ON ts.SourceTagName = t1.TagName INNER JOIN Tags AS t2 ON ts.TargetTagName = t2.TagName WHER... | sede |
CREATE TABLE table_name_67 (
winner VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the winner in the Indian Wells?
| SELECT winner FROM table_name_67 WHERE tournament = "indian wells" | sql_create_context |
CREATE TABLE table_204_320 (
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.
-- how many more total medals did china win over japan ?
| SELECT (SELECT "total" FROM table_204_320 WHERE "nation" = 'china') - (SELECT "total" FROM table_204_320 WHERE "nation" = 'japan') | squall |
CREATE TABLE table_64997 (
"Rank:" real,
"Premier:" text,
"Party:" text,
"Assumed Office:" text,
"Left Office:" text,
"TOTAL Time in Office:" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What rank was the premier Sir John See?
| SELECT COUNT("Rank:") FROM table_64997 WHERE "Premier:" = 'sir john see' | wikisql |
CREATE TABLE table_name_57 (
crowd INTEGER,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest crowd at princes park?
| SELECT MIN(crowd) FROM table_name_57 WHERE venue = "princes park" | sql_create_context |
CREATE TABLE table_8591 (
"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.
-- On Dece... | SELECT "Record" FROM table_8591 WHERE "Date" = 'december 25' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Vitamin B Complex" | mimicsql_data |
CREATE TABLE table_58364 (
"Mid Gippsland FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the lowest against for when wins are greater than 14, draws is 0 and losses ... | SELECT MIN("Against") FROM table_58364 WHERE "Losses" = '4' AND "Draws" = '0' AND "Wins" > '14' | wikisql |
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 * 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 = '92694445974' AND NOT t_kc22.MED_ORG_DEPT_NM LIKE '%肾内科%' | css |
CREATE TABLE table_name_20 (
nationality VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Anna Khlistunova's Nationality?
| SELECT nationality FROM table_name_20 WHERE name = "anna khlistunova" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.