instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_80449 (
"Race" text,
"Dist (f)" real,
"Course" text,
"Class" text,
"Prize (\u00a3K)" real,
"Odds" text,
"Runners" real,
"Placing" real,
"Margin" text,
"Time" text,
"Jockey" text,
"Trainer" text
)
-- Using valid SQLite, answer the following questions f... | SELECT "Runners" FROM table_80449 WHERE "Course" = 'longchamp' | wikisql |
CREATE TABLE table_37713 (
"Score" text,
"Opposition" text,
"Venue" text,
"City" text,
"Year" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score for 1911?
| SELECT "Score" FROM table_37713 WHERE "Year" = '1911' | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2148" AND diagnoses.long_title = "Pressure ulcer, buttock" | mimicsql_data |
CREATE TABLE table_70196 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which city has frequency under 106.5MHz and a callsign of w218ck?
| SELECT "City of license" FROM table_70196 WHERE "Frequency MHz" < '106.5' AND "Call sign" = 'w218ck' | 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 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "LONG TERM CARE HOSPITAL" AND procedures.icd9_code = "9229" | mimicsql_data |
CREATE TABLE table_73444 (
"County" text,
"Population" real,
"Unemployment Rate" text,
"Market Income Per Capita" text,
"Poverty Rate" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the status of the county that has a 17.3... | SELECT "Status" FROM table_73444 WHERE "Poverty Rate" = '17.3%' | wikisql |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE T... | 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 = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON... | atis |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(EMPLOYEE_ID) | nvbench |
CREATE TABLE table_79660 (
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in final" text,
"Score" text,
"Prize Money" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score of the hard court Ramat Hasharon tournament?
| SELECT "Score" FROM table_79660 WHERE "Surface" = 'hard' AND "Tournament" = 'ramat hasharon' | wikisql |
CREATE TABLE table_23182 (
"Institution" text,
"Location" text,
"Nickname" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the school whose students are nicknamed Panther... | SELECT "Location" FROM table_23182 WHERE "Nickname" = 'Panthers' | wikisql |
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
)
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real... | SELECT Year, COUNT(Year) FROM exhibition WHERE Ticket_Price < 15 GROUP BY Theme ORDER BY COUNT(Year) | nvbench |
CREATE TABLE table_name_80 (
lane VARCHAR,
heat VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What lane is David Carry in heat 1?
| SELECT COUNT(lane) FROM table_name_80 WHERE heat = 1 AND name = "david carry" | sql_create_context |
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varch... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%human computer interaction%' AND program_course.workload < (SELECT MIN(P... | advising |
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 swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_40... | SELECT name, ID FROM swimmer | nvbench |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT MED_SER_ORG_NO FROM t_kc21 WHERE PERSON_NM = '吕宏达' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE SOC_SRT_DIRE_NM = '盐酸阿米替林片(薄膜)') | css |
CREATE TABLE table_49829 (
"Rider" text,
"Manufacturer" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Manufacturer has a Laps of 21, a Grid larger than 16, and a Rider of akira ry ?
| SELECT "Manufacturer" FROM table_49829 WHERE "Laps" = '21' AND "Grid" > '16' AND "Rider" = 'akira ryō' | wikisql |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGD... | SELECT * FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '马幼安' AND hz_info.YLJGDM = '5841169' AND mzjzjlb.JZZDSM LIKE '%后%' | css |
CREATE TABLE table_36261 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Venue" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Date of october 10, 1965 had what lowest attendance?
| SELECT MIN("Attendance") FROM table_36261 WHERE "Date" = 'october 10, 1965' | wikisql |
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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE diagn... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FR... | mimic_iii |
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.CYKSDM, wdmzjzjlb.CYKSMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '44315858644' UNION SELECT bdmzjzjlb.CYKSDM, bdmzjzjlb.CYKSMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '44315858644' | css |
CREATE TABLE table_203_459 (
id number,
"township" text,
"fips" number,
"population\ncenter" text,
"population" number,
"population\ndensity\n/km2 (/sq mi)" text,
"land area\nkm2 (sq mi)" text,
"water area\nkm2 (sq mi)" text,
"water %" text,
"geographic coordinates" text
)
-- U... | SELECT COUNT("township") FROM table_203_459 WHERE "water area\nkm2 (sq mi)" = 0 | squall |
CREATE TABLE table_76763 (
"Name" text,
"Years" text,
"Regular season" real,
"Playoffs" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the years when playoffs is 115?
| SELECT "Years" FROM table_76763 WHERE "Playoffs" = '115' | 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 qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_NM = '何明煦' AND qtb.MED_SER_ORG_NO = '6644206' AND qtb.OUT_DIAG_DIS_NM LIKE '%迟滞%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_NM = '何明煦' AND gyb.MED_SER_ORG_NO = '6644206' AND gyb.OUT_DIAG_DIS_NM LIKE '%迟滞%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zy... | css |
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 jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE regions (
REGION_... | SELECT FIRST_NAME, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_NAME | nvbench |
CREATE TABLE table_name_26 (
pick VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What pick was roger holdinsky?
| SELECT pick FROM table_name_26 WHERE player = "roger holdinsky" | sql_create_context |
CREATE TABLE table_name_27 (
opponent VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the result was l 13-7 ot, who was the opponent?
| SELECT opponent FROM table_name_27 WHERE result = "l 13-7 ot" | sql_create_context |
CREATE TABLE table_65524 (
"Country" text,
"Builder" text,
"Location" text,
"Ship" text,
"Class / type" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country was the Pegasus, build by Royal Dockyard, from?
| SELECT "Country" FROM table_65524 WHERE "Builder" = 'royal dockyard' AND "Ship" = 'pegasus' | wikisql |
CREATE TABLE aircraft (
Aircraft_ID int,
Order_Year int,
Manufacturer text,
Model text,
Fleet_Series text,
Powertrain text,
Fuel_Propulsion text
)
CREATE TABLE pilot (
Pilot_ID int,
Pilot_name text,
Rank int,
Age int,
Nationality text,
Position text,
Join_Year in... | SELECT Position, COUNT(Position) FROM pilot GROUP BY Position | nvbench |
CREATE TABLE dorm_amenity (
amenid number,
amenity_name text
)
CREATE TABLE has_amenity (
dormid number,
amenid number
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE lives... | SELECT dorm_name FROM dorm WHERE gender = 'F' | spider |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
CO... | SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(DEPARTMENT_ID) DESC | nvbench |
CREATE TABLE review (
a_id integer,
u_id integer,
i_id integer,
rating integer,
rank integer
)
CREATE TABLE item (
i_id integer,
title varchar(20)
)
CREATE TABLE useracct (
u_id integer,
name varchar(128)
)
CREATE TABLE trust (
source_u_id integer,
target_u_id integer,
... | SELECT name, AVG(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id | nvbench |
CREATE TABLE table_name_28 (
college VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What college did john sullivan attend?
| SELECT college FROM table_name_28 WHERE player = "john sullivan" | sql_create_context |
CREATE TABLE table_2897457_2 (
nhl_team VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What NHL team picked richard borgo?
| SELECT nhl_team FROM table_2897457_2 WHERE player = "Richard Borgo" | sql_create_context |
CREATE TABLE table_name_6 (
erp_w INTEGER,
call_sign VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest ERP W of w223bp?
| SELECT MIN(erp_w) FROM table_name_6 WHERE call_sign = "w223bp" | sql_create_context |
CREATE TABLE table_name_79 (
position VARCHAR,
overall VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which position did David Nugent play with an overall small than 187?
| SELECT position FROM table_name_79 WHERE overall > 187 AND player = "david nugent" | sql_create_context |
CREATE TABLE table_name_57 (
year INTEGER,
category VARCHAR,
nominated_for VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the year that Birds of a feather category for most popular actress was nominated
| SELECT AVG(year) FROM table_name_57 WHERE category = "most popular actress" AND nominated_for = "birds of a feather" | sql_create_context |
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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "BLADDER CANCER/SDA" | mimicsql_data |
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 t_kc22.SOC_SRT_DIRE_NM, t_kc22.AMOUNT, t_kc21.MED_CLINIC_ID 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 = '71680261632' OR t_kc21_t_kc22.MED_CLINIC_ID = '54695034661' AND t_kc2... | css |
CREATE TABLE table_name_5 (
satellite VARCHAR,
launch_site VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which satellite was launched from Vandenberg?
| SELECT satellite FROM table_name_5 WHERE launch_site = "vandenberg" | sql_create_context |
CREATE TABLE table_3058 (
"Name of Award" text,
"Name of Film" text,
"Language" text,
"Awardee(s)" text,
"Cash Prize" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the awardees for best special effects
| SELECT "Awardee(s)" FROM table_3058 WHERE "Name of Award" = 'Best Special Effects' | wikisql |
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 x.total, COUNT(x.Id), CAST(COUNT(x.Id) AS FLOAT) / (SELECT COUNT(Q.Id) FROM Posts AS Q WHERE Q.AnswerCount = 0 AND Q.PostTypeId = 1) FROM (SELECT Q.Id, COUNT(PT.TagId) AS total FROM Posts AS Q INNER JOIN PostTags AS PT ON Q.Id = PT.PostId WHERE Q.AnswerCount = 0 AND Q.PostTypeId = 1 GROUP BY Q.Id) AS x GROUP BY ... | sede |
CREATE TABLE table_78975 (
"Lexton Plains" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the most wins with 0 byes?
| SELECT MAX("Wins") FROM table_78975 WHERE "Byes" > '0' | wikisql |
CREATE TABLE table_name_92 (
to_par VARCHAR,
score VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Tom Kite with a Score of 68's To Par?
| SELECT to_par FROM table_name_92 WHERE score = 68 AND player = "tom kite" | sql_create_context |
CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
)
CREATE TABLE status (
station_i... | SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 ORDER BY COUNT(date) DESC | nvbench |
CREATE TABLE table_203_611 (
id number,
"player" text,
"hr" number,
"date reached 500 hr" text,
"team" text,
"seasons played" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which boston red sox player got the most career home runs ?
| SELECT "player" FROM table_203_611 WHERE "team" = 'boston red sox' ORDER BY "hr" DESC LIMIT 1 | squall |
CREATE TABLE table_24033 (
"Ep." real,
"Season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. Code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 'jobless' is the title who are the writers?... | SELECT "Written by" FROM table_24033 WHERE "Title" = 'Jobless' | wikisql |
CREATE TABLE table_40448 (
"Draw" real,
"Artist" text,
"Song" text,
"Result" text,
"Place" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of Aleko Berdzenishvili's song?
| SELECT "Song" FROM table_40448 WHERE "Artist" = 'aleko berdzenishvili' | wikisql |
CREATE TABLE table_12422 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the District which has a Reserved for ( SC ... | SELECT "District" FROM table_12422 WHERE "Reserved for ( SC / ST /None)" = 'sc' | wikisql |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | 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 = 728)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht' A... | mimic_iii |
CREATE TABLE table_45302 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country is Jack Nicklaus from?
| SELECT "Country" FROM table_45302 WHERE "Player" = 'jack nicklaus' | wikisql |
CREATE TABLE table_train_180 (
"id" int,
"gender" string,
"pregnancy_or_lactation" bool,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"diabetic" string,
"post_load_glucose" int,
"diastolic_blood_pressure_dbp" int,
"impaired_glucose_tolerance" bool,
"fasting_gl... | SELECT * FROM table_train_180 WHERE fasting_glucose >= 100 AND fasting_glucose <= 125 OR impaired_glucose_tolerance = 1 OR (post_load_glucose >= 140 AND post_load_glucose <= 199) OR impaired_glucose_tolerance = 1 | criteria2sql |
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paper (
paperid int,
title varchar,
venueid int,
year int,
numciting int,
numcitedby int,
journalid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TAB... | SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'ras bodik' AND writes.authorid = author.authorid | scholar |
CREATE TABLE table_train_268 (
"id" int,
"basal_rate" float,
"systolic_blood_pressure_sbp" int,
"renal_disease" bool,
"major_illness" bool,
"creatinine_clearance_cl" float,
"injury_to_body" bool,
"diastolic_blood_pressure_dbp" int,
"injury_to_limb" bool,
"hypertension" bool,
... | SELECT * FROM table_train_268 WHERE injury_to_body = 1 OR injury_to_limb = 1 | criteria2sql |
CREATE TABLE table_203_228 (
id number,
"#" number,
"title" text,
"songwriters" text,
"producer(s)" text,
"performer (s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who produced the track no main topic ?
| SELECT "producer(s)" FROM table_203_228 WHERE "title" = '"no main topic"' | squall |
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 countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE T... | SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | nvbench |
CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Student_Tests_Taken (
registration_id INTEGER,
date_test... | SELECT date_of_latest_logon, COUNT(date_of_latest_logon) FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" | nvbench |
CREATE TABLE table_name_32 (
february VARCHAR,
game VARCHAR,
opponent VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Februarys have montreal canadiens as the opponent, and 18-25-10 as the record, with a game greater than 53?
| SELECT COUNT(february) FROM table_name_32 WHERE opponent = "montreal canadiens" AND record = "18-25-10" AND game > 53 | sql_create_context |
CREATE TABLE table_name_86 (
location VARCHAR,
size VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What location was the campus that has a size of 245 acres?
| SELECT location FROM table_name_86 WHERE size = "245 acres" | sql_create_context |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT CYKSDM, CYKSMC FROM zyjzjlb WHERE JZLSH = '19545678298' | css |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | (SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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... | css |
CREATE TABLE table_32973 (
"Year" real,
"Sportsperson" text,
"Nation of birth" text,
"Team" text,
"Competition , federation , or league" text,
"Sport" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team has a year listed of 2008?
| SELECT "Team" FROM table_32973 WHERE "Year" = '2008' | wikisql |
CREATE TABLE table_23851574_2 (
name VARCHAR,
nationality_sponsors VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which telescopes were sponsored by or originated in Belgium?
| SELECT name FROM table_23851574_2 WHERE nationality_sponsors = "Belgium" | sql_create_context |
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "M" AND procedures.long_title = "Endoscopic sphincterotomy and papillotomy" | mimicsql_data |
CREATE TABLE table_44923 (
"Technology" text,
"Moving Parts" text,
"Room Temperature" text,
"Flammable" text,
"Toxic Materials" text,
"In production" text,
"Rare metals" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the moving part... | SELECT "Moving Parts" FROM table_44923 WHERE "Technology" = 'lead-acid' | 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 (SELECT gwyjzb.MED_ORG_DEPT_CD FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '4213631' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-04-05' AND '2006-10-29' GROUP BY gwyjzb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) <= 690.96 UNION SELECT fgwyjzb.... | css |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT patient.age FROM patient WHERE patient.uniquepid = '022-158213' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
... | SELECT p1.Id AS "AnsID", p1.ParentId AS "QuestionId", p1.CreationDate AS "AnsCreationdate", p2.CreationDate AS "QuestionCreationdate", CAST((JULIANDAY(CreationDate) - JULIANDAY(p2.CreationDate)) * 1440.0 AS INT) AS Time_Difference FROM Posts AS p1 JOIN Posts AS p2 ON p1.ParentId = p2.Id WHERE p1.PostTypeId = 2 AND p1.P... | sede |
CREATE TABLE table_14556 (
"Opponent" text,
"OVERALL" text,
"HOME" text,
"AWAY" text,
"PLYFF" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which home team has a playoff record of (0-0) and played La Crosse Spartans?
| SELECT "HOME" FROM table_14556 WHERE "PLYFF" = '(0-0)' AND "Opponent" = 'la crosse spartans' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND diagnoses.long_title = "Unspecified septicemia" | mimicsql_data |
CREATE TABLE table_name_83 (
film_title_used_in_nomination VARCHAR,
primary_language_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Film Title Used In Nomination, when Primary Language(s) is 'Azerbaijani, Russian'?
| SELECT film_title_used_in_nomination FROM table_name_83 WHERE primary_language_s_ = "azerbaijani, russian" | sql_create_context |
CREATE TABLE mzb (
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 SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '3061264' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-05-05' AND '2012-09-12' UNION SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_k... | css |
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 mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '40108491' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2011-09-11') | css |
CREATE TABLE table_44104 (
"Date" text,
"Name" text,
"Nationality" text,
"Tonnage (GRT)" real,
"Fate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of attack of the Circe Shell Ship?
| SELECT "Date" FROM table_44104 WHERE "Name" = 'circe shell' | wikisql |
CREATE TABLE table_train_278 (
"id" int,
"gender" string,
"supine" bool,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"estimated_glomerular_filtration_rate_egfr" int,
"diastolic_blood_pressure_dbp" int,
"serum_creatinine" float,
"bilirubin" float,
"NOUSE" floa... | SELECT * FROM table_train_278 WHERE estimated_glomerular_filtration_rate_egfr < 45 | criteria2sql |
CREATE TABLE table_2112766_1 (
episode VARCHAR,
viewers__in_millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many episode have 8.4 millions viewer.
| SELECT COUNT(episode) FROM table_2112766_1 WHERE viewers__in_millions_ = "8.4" | sql_create_context |
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE venue (
venueid int,
venuename var... | SELECT DISTINCT paper.venueid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'sensor fusion' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid | scholar |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city var... | 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 WHERE course.department = 'PATH' AND semester.semester = 'Fall' | advising |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
a... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'acetaminophen (tylenol) tab 650 mg' AND DATETIME(me... | eicu |
CREATE TABLE table_name_55 (
location_attendance VARCHAR,
high_assists VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did Ben Gordon (8) have the high assists?
| SELECT location_attendance FROM table_name_55 WHERE high_assists = "ben gordon (8)" | sql_create_context |
CREATE TABLE table_6713 (
"Season" text,
"Competition" text,
"Round" text,
"Opponent" text,
"Home" text,
"Away" text,
"Agg." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Away has an Opponent of slavia prague?
| SELECT "Away" FROM table_6713 WHERE "Opponent" = 'slavia prague' | 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 (SELECT COUNT(*) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '27285110' AND mzjzjlb.JZKSRQ BETWEEN '2013-01-08' AND '2021-04-27') + (SELECT COUNT(*) FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND... | css |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '蒋丹彤' AND gwyjzb.MED_SER_ORG_NO = '6374436' AND gwyjzb.IN_DIAG_DIS_NM LIKE '%粥样%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '蒋丹彤' AND fgwyjzb.MED_SER_ORG_NO = '6374436' AND fgwyjzb.IN_DIAG_DIS_NM LIKE '%粥样%' | css |
CREATE TABLE table_name_84 (
capacity VARCHAR,
model_engine VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the capacity for the engine of 2.0 duratorq
| SELECT capacity FROM table_name_84 WHERE model_engine = "2.0 duratorq" | sql_create_context |
CREATE TABLE table_5168 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent had a round of more than 1 and an even of PFP: ring of... | SELECT "Opponent" FROM table_5168 WHERE "Round" > '1' AND "Event" = 'pfp: ring of fire' | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.dod_year <= "2154.0" | mimicsql_data |
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,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_inf... | css |
CREATE TABLE table_name_30 (
extra VARCHAR,
result VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which extra resulted in 2nd before 2005?
| SELECT extra FROM table_name_30 WHERE result = "2nd" AND year < 2005 | sql_create_context |
CREATE TABLE table_78497 (
"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.
-- How many people witnessed their home team score ... | SELECT MAX("Crowd") FROM table_78497 WHERE "Home team score" = '13.15 (93)' | wikisql |
CREATE TABLE table_name_43 (
name VARCHAR,
entered_service VARCHAR,
location VARCHAR,
type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the location and ship type in the Gulf of Mexico that entered service in 1999?
| SELECT name FROM table_name_43 WHERE location = "gulf of mexico" AND type = "ship" AND entered_service = "1999" | sql_create_context |
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 WHERE demographic.admission_type = "URGENT" AND procedures.long_title = "Cardiac mapping" | mimicsql_data |
CREATE TABLE table_name_87 (
grid INTEGER,
laps VARCHAR,
time_retired VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total amount of grid when the laps amount was smaller than 68 and the time/retired was injection?
| SELECT SUM(grid) FROM table_name_87 WHERE laps < 68 AND time_retired = "injection" | sql_create_context |
CREATE TABLE table_8546 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
)
-- Using valid SQLite, answer the following questions fo... | SELECT "Points for" FROM table_8546 WHERE "Losing bonus" = '2' AND "Club" = 'bridgend sports rfc' | wikisql |
CREATE TABLE table_name_98 (
team VARCHAR,
position_in_table VARCHAR,
replaced_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT TEAM HAS 12TH TABLE POSITION AND REPLACED BY OVE PEDERSEN?
| SELECT team FROM table_name_98 WHERE position_in_table = "12th" AND replaced_by = "ove pedersen" | sql_create_context |
CREATE TABLE table_57004 (
"Episode #" text,
"Title" text,
"Directed by" text,
"Written by" text,
"Original airdate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the episode # of the episode that originally aired on January 21, 2001?
| SELECT "Episode #" FROM table_57004 WHERE "Original airdate" = 'january 21, 2001' | wikisql |
CREATE TABLE gymnast (
Gymnast_ID int,
Floor_Exercise_Points real,
Pommel_Horse_Points real,
Rings_Points real,
Vault_Points real,
Parallel_Bars_Points real,
Horizontal_Bar_Points real,
Total_Points real
)
CREATE TABLE people (
People_ID int,
Name text,
Age real,
Height ... | SELECT Hometown, COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID = T2.People_ID GROUP BY T2.Hometown | nvbench |
CREATE TABLE table_204_321 (
id number,
"community" text,
"currency" text,
"region" text,
"target date" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the first region on the chart
| SELECT "region" FROM table_204_321 WHERE id = 1 | squall |
CREATE TABLE table_name_5 (
tries INTEGER,
goals INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Tries has a Goal smaller than 0?
| SELECT MIN(tries) FROM table_name_5 WHERE goals < 0 | sql_create_context |
CREATE TABLE table_25244412_2 (
total_electricity__gw VARCHAR,
renewable_electricity_w_o_hydro__gw·h_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many data was given the total electricity in GW-h if the renewable electricity w/o hydro (GW-h) is 3601?
| SELECT COUNT(total_electricity__gw) AS ·h_ FROM table_25244412_2 WHERE renewable_electricity_w_o_hydro__gw·h_ = 3601 | sql_create_context |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code | nvbench |
CREATE TABLE table_17183 (
"Unit" text,
"Commander" text,
"Complement" text,
"Killed" text,
"Wounded" text,
"Missing" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the complements when the commander is Major William Lloyd?
| SELECT "Complement" FROM table_17183 WHERE "Commander" = 'Major William Lloyd' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.