instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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 qtb.MED_SER_ORG_NO FROM qtb WHERE qtb.PERSON_ID = '24294276' AND qtb.IN_HOSP_DATE BETWEEN '2010-01-31' AND '2015-05-02' GROUP BY qtb.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT gyb.MED_SER_ORG_NO FROM gyb WHERE gyb.PERSON_ID = '24294276' AND gyb.IN_HOSP_DATE BETWEEN '2010-01-31' AND '2015-05-02' G... | css |
CREATE TABLE table_26293 (
"Bowl Game" text,
"Date" text,
"Stadium" text,
"City" text,
"Television" text,
"Matchup/Results" text,
"Attendance" real,
"Payout (US$)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many different items a... | SELECT COUNT("Attendance") FROM table_26293 WHERE "Stadium" = 'Sun Devil Stadium' | wikisql |
CREATE TABLE table_72083 (
"Country ( exonym )" text,
"Capital ( exonym )" text,
"Country ( endonym )" text,
"Capital ( endonym )" text,
"Official or native language(s) (alphabet/script)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lo... | SELECT "Capital ( endonym )" FROM table_72083 WHERE "Country ( endonym )" = 'Anguilla' | wikisql |
CREATE TABLE table_27713583_11 (
location_attendance VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the location attendance april 5
| SELECT location_attendance FROM table_27713583_11 WHERE date = "April 5" | sql_create_context |
CREATE TABLE entrepreneur (
Entrepreneur_ID int,
People_ID int,
Company text,
Money_Requested real,
Investor text
)
CREATE TABLE people (
People_ID int,
Name text,
Height real,
Weight real,
Date_of_Birth text
)
-- Using valid SQLite, answer the following questions for the tabl... | SELECT Date_of_Birth, COUNT(Date_of_Birth) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Investor = "Simon Woodroffe" OR T1.Investor = "Peter Jones" | nvbench |
CREATE TABLE table_2626495_1 (
originalairdate VARCHAR,
directed_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times was the episode directed by maury geraghty originally aired?
| SELECT COUNT(originalairdate) FROM table_2626495_1 WHERE directed_by = "Maury Geraghty" | sql_create_context |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE chartevents ... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'dx ultrasound-heart') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 92721) AND STRF... | mimic_iii |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "31" AND prescriptions.route = "IVPCA" | mimicsql_data |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH =... | css |
CREATE TABLE table_name_60 (
other VARCHAR,
player VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number for other when Adam Pepper is the player with a total more than 7?
| SELECT COUNT(other) FROM table_name_60 WHERE player = "adam pepper" AND total > 7 | sql_create_context |
CREATE TABLE table_17434 (
"#" real,
"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 t... | SELECT "Date of birth" FROM table_17434 WHERE "End of term" = '2April1969' | wikisql |
CREATE TABLE zyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '潘若云' AND t_kc22.STA_DATE BETWEEN '2004-02-29' AND '2019-02-16' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHE... | css |
CREATE TABLE table_14260687_3 (
blackberry_os VARCHAR,
other VARCHAR,
quarter VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- During the quarter of 2012 Q2, how many millions of Blackberry OS phones where shipped when 0.1 million others were shipped?
| SELECT COUNT(blackberry_os) FROM table_14260687_3 WHERE other = "0.1" AND quarter = "2012 Q2" | sql_create_context |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PHOENIX' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city... | atis |
CREATE TABLE table_204_699 (
id number,
"district" text,
"name" text,
"party" text,
"residence" text,
"first served" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- angel fuentes and gilbert wilson were both from which residence ?
| SELECT "residence" FROM table_204_699 WHERE "name" = 'angel fuentes' | squall |
CREATE TABLE station_company (
Station_ID int,
Company_ID int,
Rank_of_the_Year int
)
CREATE TABLE company (
Company_ID int,
Rank int,
Company text,
Headquarters text,
Main_Industry text,
Sales_billion real,
Profits_billion real,
Assets_billion real,
Market_Value real
)
... | SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE Headquarters <> 'USA' GROUP BY Main_Industry ORDER BY COUNT(Main_Industry) | nvbench |
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 demographic.dob, demographic.admittime FROM demographic WHERE demographic.name = "Lue White" | mimicsql_data |
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.admission_type = "NEWBORN" AND diagnoses.long_title = "Hyperpotassemia" | mimicsql_data |
CREATE TABLE table_51935 (
"Club" text,
"Sport" text,
"League" text,
"Venue" text,
"Established" real,
"Championships" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many championships did the team or teams established in 1976 win?
| SELECT SUM("Championships") FROM table_51935 WHERE "Established" = '1976' | wikisql |
CREATE TABLE table_38233 (
"Nation" text,
"T Score" real,
"A Score" real,
"E Score" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the average T score when the E score was larger than 9.6 and the team was from Spain?
| SELECT AVG("T Score") FROM table_38233 WHERE "Nation" = 'spain' AND "E Score" > '9.6' | 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 WHERE demographic.marital_status = "SINGLE" AND demographic.admityear < "2179" | mimicsql_data |
CREATE TABLE table_name_32 (
date VARCHAR,
livery VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the livery of Kinneil Sandy Red?
| SELECT date FROM table_name_32 WHERE livery = "kinneil sandy red" | sql_create_context |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info 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.YLJ... | css |
CREATE TABLE table_25831 (
"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.
-- Name t... | SELECT COUNT("Date") FROM table_25831 WHERE "Score" = 'W 107–97 (OT)' | wikisql |
CREATE TABLE table_14006_1 (
condition VARCHAR,
bleeding_time VARCHAR,
prothrombin_time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the condition with bleeding time being unaffected and prothrombin time being prolonged
| SELECT condition FROM table_14006_1 WHERE bleeding_time = "Unaffected" AND prothrombin_time = "Prolonged" | sql_create_context |
CREATE TABLE Students (
student_id INTEGER,
date_of_registration DATETIME,
date_of_latest_logon DATETIME,
login_name VARCHAR(40),
password VARCHAR(10),
personal_name VARCHAR(40),
middle_name VARCHAR(40),
family_name VARCHAR(40)
)
CREATE TABLE Student_Course_Enrolment (
registration_... | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish" ORDER BY COUNT(date_of_enrolment) DESC | nvbench |
CREATE TABLE table_22329 (
"Serial No." real,
"District" text,
"Headquartered City" text,
"City Population (2009)" real,
"City Area(km 2 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the area of the city in the Sargodha district?
| SELECT COUNT("City Area(km 2 )") FROM table_22329 WHERE "District" = 'Sargodha District' | wikisql |
CREATE TABLE gradeconversion (
lettergrade text,
gradepoint number
)
CREATE TABLE enrolled_in (
stuid number,
cid text,
grade text
)
CREATE TABLE member_of (
facid number,
dno number,
appt_type text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age num... | SELECT T1.dname FROM department AS T1 JOIN minor_in AS T2 ON T1.dno = T2.dno GROUP BY T2.dno ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id num... | SELECT b.Name, SUM(CASE WHEN b.Class = 1 THEN 1 ELSE 0 END) AS Gold, SUM(CASE WHEN b.Class = 2 AND u.Reputation > 5000 THEN 1 ELSE 0 END) AS "Silver + 5k", SUM(CASE WHEN b.Class = 3 AND u.Reputation > 10000 THEN 1 ELSE 0 END) AS "Bronze + 10k", 1 AS "Jon Skeet" FROM (SELECT UserId, Name, MIN(Class) AS class FROM Badges... | sede |
CREATE TABLE table_20023 (
"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." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT COUNT("Ends Won") FROM table_20023 WHERE "L" = '4' AND "Stolen Ends" = '17' | wikisql |
CREATE TABLE table_name_99 (
score VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the score when the away team is rivercity rage?
| SELECT score FROM table_name_99 WHERE away_team = "rivercity rage" | sql_create_context |
CREATE TABLE table_63270 (
"Name" text,
"Games" text,
"A-League" text,
"Finals" text,
"Goals" real,
"Assists" real,
"Years" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest number of goals joe keenan, who has more than 1 ass... | SELECT MIN("Goals") FROM table_63270 WHERE "Years" = '2007/08' AND "Name" = 'joe keenan' AND "Assists" > '1' | wikisql |
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 mzjzjlb WHERE mzjzjlb.ZZYSGH = '21408957' AND mzjzjlb.JZKSRQ BETWEEN '2004-07-08' AND '2004-11-20' | css |
CREATE TABLE table_15637071_1 (
commenced_operations INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did the oldest airline start operations?
| SELECT MIN(commenced_operations) FROM table_15637071_1 | sql_create_context |
CREATE TABLE pilot_record (
Record_ID int,
Pilot_ID int,
Aircraft_ID int,
Date text
)
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,
... | SELECT Position, COUNT(Position) FROM pilot GROUP BY Position ORDER BY COUNT(Position) | nvbench |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE cours... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Sociocultural Planning and Architecture%' OR course.description LIKE '%Sociocultural Planning and Architecture%' OR course.name LIKE '%Sociocultural Planning and Archite... | advising |
CREATE TABLE table_32573 (
"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.
-- On what date was the venue of Glenferrie Oval?
| SELECT "Date" FROM table_32573 WHERE "Venue" = 'glenferrie oval' | wikisql |
CREATE TABLE table_47058 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the golfer from the united states who had a To par of e?
| SELECT SUM("Score") FROM table_47058 WHERE "To par" = 'e' AND "Country" = 'united states' | wikisql |
CREATE TABLE table_name_58 (
teams VARCHAR,
home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What teams has a home of 5-0?
| SELECT teams FROM table_name_58 WHERE home = "5-0" | sql_create_context |
CREATE TABLE table_75654 (
"Outcome" text,
"Event" text,
"Year" text,
"Venue" text,
"Partner" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Outcome in 1983 of the WD Event?
| SELECT "Outcome" FROM table_75654 WHERE "Event" = 'wd' AND "Year" = '1983' | wikisql |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | SELECT All_Games, ACC_Percent FROM basketball_match | nvbench |
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 AVG(demographic.age) FROM demographic WHERE demographic.insurance = "Medicare" AND demographic.dod_year < "2111.0" | mimicsql_data |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_typ... | 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 = 20898 AND admissions.dischtime IS NULL)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d... | mimic_iii |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Hemochromatosis due to repeated red blood cell transfusions" AND prescriptions.drug_type = ... | mimicsql_data |
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,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "31" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
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.dod_year <= "2164.0" AND procedures.icd9_code = "9465" | mimicsql_data |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,... | SELECT jybgb.JYJSGH, jybgb.JYJSQM FROM jybgb WHERE jybgb.BGDH = '26318854266' | css |
CREATE TABLE table_dev_41 (
"id" int,
"gender" string,
"serum_potassium" float,
"systolic_blood_pressure_sbp" int,
"serum_bicarbonate" int,
"renal_disease" bool,
"temperature" float,
"diastolic_blood_pressure_dbp" int,
"liver_disease" bool,
"hdl" int,
"serum_sodium_concentrat... | SELECT * FROM table_dev_41 WHERE kidney_disease = 1 OR serum_creatinine > 2 OR liver_disease = 1 OR hypertension = 1 | criteria2sql |
CREATE TABLE table_name_44 (
share_of_votes VARCHAR,
election VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the share of votes in the 2008 election?
| SELECT share_of_votes FROM table_name_44 WHERE election = 2008 | sql_create_context |
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 Id AS "post_link", OwnerUserId AS "user_link", Score, Body FROM Posts WHERE Body LIKE '%http%.##ext?jpg##%' AND CreationDate >= '##Date1?2019-01-01##' AND CreationDate <= '##Date2?2020-01-01##' ORDER BY Id | sede |
CREATE TABLE table_68447 (
"Need" text,
"Being (qualities)" text,
"Having (things)" text,
"Doing (actions)" text,
"Interacting (settings)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the interacting for need of protection
| SELECT "Interacting (settings)" FROM table_68447 WHERE "Need" = 'protection' | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2150" AND prescriptions.route = "TP" | mimicsql_data |
CREATE TABLE table_10306 (
"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 name of the away team who played Foo... | SELECT "Away team" FROM table_10306 WHERE "Home team" = 'footscray' | wikisql |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost numb... | SELECT admissions.age FROM admissions WHERE admissions.subject_id = 77676 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1 | mimic_iii |
CREATE TABLE table_1140103_6 (
date VARCHAR,
circuit VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date has a solitudering circuit
| SELECT date FROM table_1140103_6 WHERE circuit = "Solitudering" | sql_create_context |
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 jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.J... | css |
CREATE TABLE table_5410 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of the 2007 gulf cup of nations?
| SELECT "Result" FROM table_5410 WHERE "Competition" = '2007 gulf cup of nations' | wikisql |
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER,
product_quantity VARCHAR(50),
other_order_item_details VARCHAR(255)
)
CREATE TABLE Financial_Transactions (
transaction_id INTEGER,
account_id INTEGER,
invoice_number INTEGER,
transaction_type VA... | SELECT date_account_opened, COUNT(date_account_opened) FROM Accounts GROUP BY other_account_details | nvbench |
CREATE TABLE volume (
volume_id number,
volume_issue text,
issue_date text,
weeks_on_top number,
song text,
artist_id number
)
CREATE TABLE music_festival (
id number,
music_festival text,
date_of_ceremony text,
category text,
volume number,
result text
)
CREATE TABLE a... | SELECT date_of_ceremony, result FROM music_festival | spider |
CREATE TABLE table_203_562 (
id number,
"state" text,
"no. of candidates" number,
"no. of elected" number,
"total no. of seats in assembly" number,
"year of election" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what state comes after kerala... | SELECT "state" FROM table_203_562 WHERE id = (SELECT id FROM table_203_562 WHERE "state" = 'kerala') + 1 | squall |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TAB... | SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id | advising |
CREATE TABLE Roles (
Role_Code CHAR(15),
Role_Name VARCHAR(255),
Role_Description VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE All_Documents (
Document_ID INTEGER,
Da... | SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations GROUP BY Date_in_Location_From ORDER BY Date_in_Location_From | nvbench |
CREATE TABLE table_13769 (
"School" text,
"Location" text,
"Mascot" text,
"County" text,
"Year joined" real,
"Previous Conference" text,
"Year Left" real,
"Conference joined" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the masc... | SELECT "Mascot" FROM table_13769 WHERE "Previous Conference" = 'independent' AND "Location" = 'anderson' | wikisql |
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TAB... | SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'PATH' AND course.number = 643 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.o... | advising |
CREATE TABLE table_53214 (
"Election" text,
"1st Member" text,
"1st Party" text,
"2nd Member" text,
"2nd Party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date of the election where Sir Christopher William Codrington was elected as F... | SELECT "Election" FROM table_53214 WHERE "1st Member" = 'sir christopher william codrington' AND "2nd Member" = 'robert stayner holford' | wikisql |
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 zyjzjlb.CYKSDM, zyjzjlb.CYKSMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '51106126836' | css |
CREATE TABLE table_204_115 (
id number,
"year" number,
"track" text,
"number" number,
"team" text,
"car" text,
"round result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which year had a higher round placement , 2006 or 2010 ?
| SELECT "year" FROM table_204_115 WHERE "year" IN (2006, 2010) ORDER BY "round result" LIMIT 1 | squall |
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE ... | SELECT DISTINCT COUNT(paper.paperid), writes.authorid FROM author, paper, writes WHERE author.authorname = 'mirella lapata' AND paper.year = 2016 AND writes.authorid = author.authorid AND writes.paperid = paper.paperid GROUP BY writes.authorid | scholar |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD... | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '卫博裕' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 8489.49) | css |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
... | 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 = 'CHICAGO' AND date_day.day_number = 16 AND date_day.month_number = 6 AND d... | atis |
CREATE TABLE table_1342359_15 (
party VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are all the party with district being kansas 1
| SELECT party FROM table_1342359_15 WHERE district = "Kansas 1" | sql_create_context |
CREATE TABLE table_name_35 (
points VARCHAR,
try_bonus VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points were there when the try bonus was 2?
| SELECT points FROM table_name_35 WHERE try_bonus = "2" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT demographic.dob FROM demographic WHERE demographic.subject_id = "3343" | mimicsql_data |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_ID number
)
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,
... | SELECT t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1586610' GROUP BY t_kc21.OUT_DIAG_DIS_NM | css |
CREATE TABLE table_25597136_1 (
date_first_lit VARCHAR,
focal_plane_in_ft__m_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Focal plane in ft (m) is 43ft (13.1m) is the first date lit.
| SELECT date_first_lit FROM table_25597136_1 WHERE focal_plane_in_ft__m_ = "43ft (13.1m)" | sql_create_context |
CREATE TABLE table_19643196_1 (
fleet__number VARCHAR,
transmission VARCHAR,
engine VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fleet number when the transmission is Voith D863.4 and the engine is Cummins ISL?
| SELECT fleet__number FROM table_19643196_1 WHERE transmission = "Voith D863.4" AND engine = "Cummins ISL" | sql_create_context |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,... | SELECT YEAR(p.CreationDate) AS "jonsanswerwrittenyear", YEAR(v.CreationDate) AS "votecastyear", COUNT(v.Id) AS "numberofanswers" FROM Votes AS v LEFT OUTER JOIN Posts AS p ON p.Id = v.PostId WHERE VoteTypeId = 2 AND OwnerUserId = 22656 AND YEAR(v.CreationDate) = YEAR(CURRENT_TIMESTAMP()) GROUP BY YEAR(p.CreationDate), ... | sede |
CREATE TABLE table_name_77 (
player VARCHAR,
position VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player is a wide receiver picked in round 7?
| SELECT player FROM table_name_77 WHERE position = "wide receiver" AND round = 7 | sql_create_context |
CREATE TABLE table_18975 (
"Institution" text,
"Location" text,
"Founded" real,
"Affiliation" text,
"Enrollment" real,
"Nickname" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which institution was founded in 1923?
| SELECT "Institution" FROM table_18975 WHERE "Founded" = '1923' | wikisql |
CREATE TABLE table_16278602_1 (
pop_density__per_km²_ VARCHAR,
english_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the population density of the Capital Region of Denmark?
| SELECT pop_density__per_km²_ FROM table_16278602_1 WHERE english_name = "Capital Region of Denmark" | sql_create_context |
CREATE TABLE table_3103 (
"Year" real,
"Location" text,
"Entries" real,
"Winning Boat" text,
"Country" text,
"Skipper" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When 2012 is the year what is the winning boat?
| SELECT "Winning Boat" FROM table_3103 WHERE "Year" = '2012' | 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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND diagnoses.short_title = "Neonatal hypoglycemia" | mimicsql_data |
CREATE TABLE table_name_82 (
venue VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Venue, when Date is 23,24,26,27,28,29 Feb, 1 Mar 1912?
| SELECT venue FROM table_name_82 WHERE date = "23,24,26,27,28,29 feb, 1 mar 1912" | sql_create_context |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT gwyjzb.OUT_DIAG_DIS_CD, gwyjzb.OUT_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '89569884' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6947.2) UNION SELECT fgwyjzb.OUT_DIAG_DIS_CD, fgwyjzb.OUT_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '89569884' AND... | css |
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 COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.MED_SER_ORG_NO = '3173533' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2001-05-20' AND '2016-10-13' GROUP B... | css |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic ... | SELECT prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Calcium Acetate" | mimicsql_data |
CREATE TABLE table_47341 (
"Party" text,
"Previous council" real,
"Staying councillors" real,
"Seats up for election" real,
"Election result" real,
"New council" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Staying councillors have a New... | SELECT AVG("Staying councillors") FROM table_47341 WHERE "New council" = '7' AND "Previous council" > '8' | wikisql |
CREATE TABLE MINOR_IN (
DNO VARCHAR
)
CREATE TABLE DEPARTMENT (
DName VARCHAR,
DNO VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the name of the department that has no students minored in?
| SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO = T2.DNO | sql_create_context |
CREATE TABLE t_kc24 (
MED_SAFE_PAY_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
REF_SLT_FLG number,
CLINIC_SLT_DATE time,
COMP_ID text,
PERSON_ID text,
FLX_MED_ORG_ID text,
INSU_TYPE text,
MED_AMOUT number,
PER_ACC_PAY number,
OVE_PAY numb... | SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '4812361' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2001-09-22' AND '2008-02-23' | css |
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TAB... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.airline_code = 'DL') AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND flight.to_airport = AIRPORT... | atis |
CREATE TABLE table_17324 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What w... | SELECT "Score" FROM table_17324 WHERE "Date" = 'May 11' | wikisql |
CREATE TABLE table_60717 (
"Greek Designation" text,
"Collegiate Institution" text,
"Charter Date" text,
"Status" text,
"City" text,
"U.S. State/District" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What California city has an active status a... | SELECT "City" FROM table_60717 WHERE "Status" = 'active' AND "U.S. State/District" = 'california' AND "Greek Designation" = 'established colony' | wikisql |
CREATE TABLE table_23408094_14 (
total_career_titles VARCHAR,
span_of_years_led VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the total career titles of the player who led for 5 years?
| SELECT COUNT(total_career_titles) FROM table_23408094_14 WHERE span_of_years_led = 5 | sql_create_context |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT COUNT(*) FROM zyjzjlb WHERE zyjzjlb.JZKSMC = '化疗科' AND zyjzjlb.RYDJSJ BETWEEN '2007-11-14' AND '2020-09-19' | css |
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT Class, COUNT(Class) FROM captain GROUP BY Rank, Class ORDER BY Class | nvbench |
CREATE TABLE table_name_50 (
tournament VARCHAR,
margin_of_victory VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For which tournament was the margin of victory 7 strokes?
| SELECT tournament FROM table_name_50 WHERE margin_of_victory = "7 strokes" | sql_create_context |
CREATE TABLE table_name_95 (
state VARCHAR,
percent__2009_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which state has a Percent (2009) of 6.2%?
| SELECT state FROM table_name_95 WHERE percent__2009_ = "6.2%" | sql_create_context |
CREATE TABLE table_73375 (
"Season" text,
"League" text,
"Division" text,
"GP" real,
"W" real,
"L" real,
"T" real,
"OTL" real,
"SOL" real,
"Pts" real,
"PCT" text,
"GF" real,
"GA" real,
"PIM" real,
"Coach(es)" text,
"Result" text
)
-- Using valid SQLite, ... | SELECT MAX("OTL") FROM table_73375 WHERE "L" = '28' | wikisql |
CREATE TABLE table_17719 (
"Year" real,
"Total Region" real,
"Rockhampton" real,
"Livingstone" real,
"Fitzroy" real,
"Mt Morgan" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the maximum total region with fitzroy being 8047
| SELECT MAX("Total Region") FROM table_17719 WHERE "Fitzroy" = '8047' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.