instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_32162 (
"Region" text,
"Date" real,
"Label" text,
"Format" text,
"Catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the catalog for date larger than 2004
| SELECT "Catalog" FROM table_32162 WHERE "Date" > '2004' | wikisql |
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 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 = '63547220' AND hz_info.YLJGDM = '9574052' AND NOT mzjzjlb.JZKSMC LIKE '%ICU%' | css |
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID ... | SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types GROUP BY Document_Type_Description | nvbench |
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
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi... | mimic_iii |
CREATE TABLE table_44430 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Kickoff Time" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Kickoff Time on January 7, 2002?
| SELECT "Kickoff Time" FROM table_44430 WHERE "Date" = 'january 7, 2002' | wikisql |
CREATE TABLE table_6901 (
"Year" text,
"Playoff round" text,
"Venue" text,
"Winner" text,
"Result" text,
"Loser" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What team was the loser when the result was 119 113?
| SELECT "Loser" FROM table_6901 WHERE "Result" = '119–113' | wikisql |
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 jyjgzbb.JCFF FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_in... | css |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergy... | SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-5001')) AND medication.drugname = 'dextrose 50%-water' AND DATETIME(medica... | eicu |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
... | SELECT COUNT(*) FROM jybgb WHERE jybgb.JZLSH = '10755698211' | css |
CREATE TABLE table_name_29 (
assists VARCHAR,
team VARCHAR,
total_points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the assists for the Team of Florida and the total points of 75?
| SELECT assists FROM table_name_29 WHERE team = "florida" AND total_points = "75" | sql_create_context |
CREATE TABLE organisation_types (
organisation_type text,
organisation_type_description text
)
CREATE TABLE research_staff (
staff_id number,
employer_organisation_id number,
staff_details text
)
CREATE TABLE project_outcomes (
project_id number,
outcome_code text,
outcome_details text... | SELECT date_to FROM project_staff ORDER BY date_to DESC LIMIT 1 | spider |
CREATE TABLE table_27339 (
"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 taavi sadam
| SELECT "Birth Date" FROM table_27339 WHERE "Player" = 'Taavi Sadam' | wikisql |
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 MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '75572641' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc22 WHERE AMOUNT > 5155.81) | css |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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,
... | SELECT JCZBMC, JCZBJGDW, AVG(JCZBJGDL) FROM jyjgzbb WHERE YLJGDM = '7357865' AND BGRQ BETWEEN '2020-08-17' AND '2020-08-29' GROUP BY JCZBMC, JCZBJGDW ORDER BY AVG(JCZBJGDL) DESC LIMIT 30 | css |
CREATE TABLE fzzmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZD... | SELECT jybgb.BGDH FROM hz_info JOIN zzmzjzjlb JOIN jybgb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '00922703' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FRO... | 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 * FROM t_kc21 WHERE t_kc21.PERSON_ID = '97484967' AND t_kc21.MED_SER_ORG_NO = '0560668' AND t_kc21.MED_ORG_DEPT_NM LIKE '%急诊%' | css |
CREATE TABLE Dorm_amenity (
amenid INTEGER,
amenity_name VARCHAR(25)
)
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Lives_in (
stuid INTEGER,
dormid INTEGER,
room_number INTEGER
)
CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARCHAR(20),
student_ca... | SELECT dorm_name, COUNT(*) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.Age > 20 GROUP BY T3.dorm_name ORDER BY dorm_name | nvbench |
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_re... | 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 = 'CHARLOTTE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MIN... | atis |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.IN_DIAG_DIS_NM = '精神发育迟滞' | css |
CREATE TABLE table_name_56 (
elected VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the year elected in District 15?
| SELECT elected FROM table_name_56 WHERE district = 15 | sql_create_context |
CREATE TABLE table_2828803_1 (
us_viewers__millions_ VARCHAR,
production_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many million u.s. viewers watched the episode with a production code of 2t7004?
| SELECT us_viewers__millions_ FROM table_2828803_1 WHERE production_code = "2T7004" | sql_create_context |
CREATE TABLE table_204_401 (
id number,
"rank" number,
"lane" number,
"name" text,
"nationality" text,
"react" number,
"time" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- whose time is more than . 24.00 ?
| SELECT "name" FROM table_204_401 WHERE "time" > 24.00 | squall |
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
... | SELECT DEPT_CODE, SUM(T1.CRS_CREDIT) FROM COURSE AS T1 JOIN CLASS AS T2 ON T1.CRS_CODE = T2.CRS_CODE GROUP BY T1.DEPT_CODE ORDER BY DEPT_CODE | nvbench |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event... | SELECT microbiologyevents.org_name FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 92788) AND microbiologyevents.spec_type_desc = 'foot culture' AND NOT microbiologyevents.org_name IS NULL AND STRFTIME('%y-%m', microbiologyevents.chart... | mimic_iii |
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 qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '陈古兰' AND t_kc22.STA_DATE BETWEEN '2020-09-18' AND '2021-03-30' 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_name_78 (
quantity_made VARCHAR,
wheel_arrangement VARCHAR,
class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the quantity made when the wheel arrangement is 2-6-0 and the class is k?
| SELECT quantity_made FROM table_name_78 WHERE wheel_arrangement = "2-6-0" AND class = "k" | sql_create_context |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id numbe... | SELECT patients.gender FROM patients WHERE patients.subject_id = 26549 | mimic_iii |
CREATE TABLE teachers (
lastname text,
firstname text,
classroom number
)
CREATE TABLE list (
lastname text,
firstname text,
grade number,
classroom number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the grade taught in classroom 103.
| SELECT DISTINCT grade FROM list WHERE classroom = 103 | spider |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.IN_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '3385540' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.IN_DIAG_DIS_NM HAVING AVG(t_kc21.PERSON_AGE) < 14 | css |
CREATE TABLE table_204_981 (
id number,
"ep#" number,
"title" text,
"broadcast date" text,
"written by" text,
"directed by" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which episode aired first -- birth of a legend or skeletons in the closest... | SELECT "title" FROM table_204_981 WHERE "title" IN ('"birth of a legend"', '"skeletons in the closet"') ORDER BY "broadcast date" LIMIT 1 | squall |
CREATE TABLE bdmzjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH number,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZD... | SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz... | css |
CREATE TABLE table_name_84 (
games INTEGER,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the smallest number of games for the fenerbah e team?
| SELECT MIN(games) FROM table_name_84 WHERE team = "fenerbahçe" | sql_create_context |
CREATE TABLE zyjzjlb_jybgb (
YLJGDM_ZYJZJLB text,
BGDH number,
YLJGDM number
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC te... | SELECT jybgb.BGRGH, jybgb.BGRXM FROM jybgb WHERE jybgb.BGDH = '26946687277' | css |
CREATE TABLE diagnoses (
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
)
C... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.diagnosis = "SQUAMOUS CELL CARCINOMA ORAL TONGUE/SDA" | mimicsql_data |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND prescriptions.drug = "5% Dextrose (EXCEL BAG)" | mimicsql_data |
CREATE TABLE table_38109 (
"Rank" real,
"Player" text,
"Team" text,
"Year" real,
"BB/SO" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average rank for team cle when the BB/SO is 10.89?
| SELECT AVG("Rank") FROM table_38109 WHERE "Team" = 'cle' AND "BB/SO" = '10.89' | wikisql |
CREATE TABLE table_10438 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text,
"Tyre" text,
"Driver" text,
"Rounds" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who constructed Mike Sparken's car with a tyre of E?
| SELECT "Constructor" FROM table_10438 WHERE "Tyre" = 'e' AND "Driver" = 'mike sparken' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id... | SELECT lab.fluid, lab."CATEGORY" FROM lab WHERE lab.subject_id = "2110" | mimicsql_data |
CREATE TABLE table_21249915_1 (
total VARCHAR,
department VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total for Chuquisaca?
| SELECT total FROM table_21249915_1 WHERE department = "Chuquisaca" | sql_create_context |
CREATE TABLE table_48890 (
"Season" text,
"Duration" text,
"Gagarin Cup Winner" text,
"Gagarin Cup finalist" text,
"Continental Cup Winner" text,
"Top scorer" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the gagarin cup winner when avan... | SELECT "Gagarin Cup Winner" FROM table_48890 WHERE "Gagarin Cup finalist" = 'avangard omsk' | wikisql |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId n... | SELECT P.CreationDate, P.Id AS "post_link", P.Body FROM Comments AS C, Posts AS P WHERE (P.PostTypeId = 1 AND C.Text LIKE '%##Keyword##%' AND C.PostId = P.Id AND COALESCE(P.AnswerCount, 0) = 0 AND P.ClosedDate IS NULL AND P.Score < 3) ORDER BY P.CreationDate | sede |
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 demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "NEWBORN" AND demographic.days_stay > "17" | mimicsql_data |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T2.Revenue DESC | nvbench |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Sex, AVG(Weight) FROM people GROUP BY Sex ORDER BY Sex DESC | nvbench |
CREATE TABLE table_41789 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" real,
"Goals" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Rank has a Goals smaller than 76, and a Matches larger than 270?
| SELECT SUM("Rank") FROM table_41789 WHERE "Goals" < '76' AND "Matches" > '270' | wikisql |
CREATE TABLE table_20691 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT "Position" FROM table_20691 WHERE "Avg. Start" = '9.2' | wikisql |
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
... | SELECT city, COUNT(*) FROM station GROUP BY city ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_name_42 (
constructor VARCHAR,
laps VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What company constructed the car with more than 0 laps and shows 5 for grid?
| SELECT constructor FROM table_name_42 WHERE laps > 0 AND grid = 5 | sql_create_context |
CREATE TABLE table_22654139_3 (
year INTEGER,
reporters VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the latest year with reporters Lesley Visser and Robin Roberts?
| SELECT MAX(year) FROM table_22654139_3 WHERE reporters = "Lesley Visser and Robin Roberts" | sql_create_context |
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
... | SELECT COUNT(*) FROM (SELECT zyjybgb.KSBM FROM mzjzjlb JOIN zyjybgb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '3364170' AND zyjybgb.BGRQ BETWEEN '2010-04-09' AND '2016-11-21' GROUP BY zyjybgb.KSBM HAVING COUNT(*) <= 7 UNION SELECT mzjybgb.KSBM FROM mzjzj... | 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.OUT_DIAG_DOC_CD, gwyjzb.OUT_DIAG_DOC_NM FROM gwyjzb WHERE gwyjzb.PERSON_NM = '郎博延' AND gwyjzb.IN_HOSP_DATE BETWEEN '2010-04-15' AND '2011-01-27' GROUP BY gwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT fgwyjzb.OUT_DIAG_DOC_CD, fgwyjzb.OUT_DIAG_DOC_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_NM... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT lab.itemid, lab.flag FROM lab WHERE lab.subject_id = "22377" | mimicsql_data |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days 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, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.arrival_time > 2100 AND flight.to_airport = AIRPORT_SERVICE_1.ai... | atis |
CREATE TABLE ref_product_categories (
product_category_description VARCHAR,
unit_of_measure VARCHAR,
product_category_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the product category description and unit of measurement of category 'Herbs'... | SELECT product_category_description, unit_of_measure FROM ref_product_categories WHERE product_category_code = "Herbs" | sql_create_context |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
... | SELECT SUM(cost.cost) FROM cost WHERE cost.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 86786) AND STRFTIME('%y', cost.chargetime) >= '2101' | mimic_iii |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... | SELECT AVG(CAST(ROUND(Reputation, -1) AS INT)) AS UserReputation, AVG(CAST(Posts.Score AS FLOAT)) AS AverageAnswerScore FROM Posts INNER JOIN Users ON (Users.Id = Posts.OwnerUserId) WHERE PostTypeId = 2 AND Reputation < 1000 GROUP BY ROUND(Reputation, -1) ORDER BY UserReputation | sede |
CREATE TABLE table_43546 (
"Game" real,
"December" real,
"Opponent" text,
"Score" text,
"Decision" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Decembers have calgary flames as the opponent?
| SELECT COUNT("December") FROM table_43546 WHERE "Opponent" = 'calgary flames' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT demographic.admission_location, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "17787" | mimicsql_data |
CREATE TABLE table_42640 (
"Date" text,
"Tournament" text,
"Location" text,
"Home team" text,
"Score" text,
"Away team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the location of the home game for Slovakia?
| SELECT "Location" FROM table_42640 WHERE "Home team" = 'slovakia' | wikisql |
CREATE TABLE table_29845 (
"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.
-- What w... | SELECT "Record" FROM table_29845 WHERE "High points" = 'Chris Paul (16)' | wikisql |
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE va... | SELECT PROF_OFFICE, COUNT(PROF_OFFICE) FROM PROFESSOR AS T1 JOIN EMPLOYEE AS T2 ON T1.EMP_NUM = T2.EMP_NUM GROUP BY PROF_OFFICE ORDER BY COUNT(PROF_OFFICE) | nvbench |
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 t_kc21.MED_CLINIC_ID, t_kc21.PERSON_ID, t_kc21.PERSON_NM, t_kc21.IDENTITY_CARD, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc24.MED_AMOUT = (SELECT MED_AMOUT FROM t_kc24 WHERE MED_CLINIC_ID = '11812286713') | css |
CREATE TABLE table_name_19 (
position VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which position does bert coan play?
| SELECT position FROM table_name_19 WHERE player = "bert coan" | sql_create_context |
CREATE TABLE table_60759 (
"Date" text,
"Unit" real,
"Aircraft" text,
"Opponent" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What aircraft is located at S of Avion?
| SELECT "Aircraft" FROM table_60759 WHERE "Location" = 's of avion' | wikisql |
CREATE TABLE table_204_712 (
id number,
"rank" number,
"athlete" text,
"nationality" text,
"time" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total count of athletes included in the rankings chart , including those c... | SELECT COUNT("athlete") FROM table_204_712 | squall |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
g... | SELECT DISTINCT course.department, course.name, course.number 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 '%Settlement Pre-Industrial Societies%' OR course.description LIKE '%Settlement Pre-Industrial Soc... | advising |
CREATE TABLE table_70359 (
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fewest number of points for clubs with less than 2 draws and more than 8 matches played?
| SELECT MIN("Points") FROM table_70359 WHERE "Drawn" < '2' AND "Played" > '8' | wikisql |
CREATE TABLE ref_locations (
location_code text,
location_name text,
location_description text
)
CREATE TABLE all_documents (
document_id number,
date_stored time,
document_type_code text,
document_name text,
document_description text,
other_details text
)
CREATE TABLE documents_to... | SELECT T1.date_in_location_from, T1.date_in_locaton_to FROM document_locations AS T1 JOIN all_documents AS T2 ON T1.document_id = T2.document_id WHERE T2.document_name = "Robin CV" | spider |
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 qtb.MED_ORG_DEPT_CD, qtb.IN_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '9146406' GROUP BY qtb.MED_ORG_DEPT_CD, qtb.IN_DIAG_DIS_NM UNION SELECT gyb.MED_ORG_DEPT_CD, gyb.IN_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '9146406' GROUP BY gyb.MED_ORG_DEPT_CD, gyb.IN_... | css |
CREATE TABLE table_1819 (
"Club" text,
"First season in top division" text,
"Number of seasons in top division" real,
"First season of current spell in top division" text,
"Number of seasons in Liga MX" real,
"Top division titles" real
)
-- Using valid SQLite, answer the following questions fo... | SELECT "Top division titles" FROM table_1819 WHERE "First season of current spell in top division" = '1979-80' | wikisql |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE fzzmzjzjlb (
HXPLC number,
HZ... | SELECT * FROM hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i... | 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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE... | SELECT EMPLOYEE_ID, MANAGER_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' | nvbench |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE microlab (
microl... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-849' AND patient.hospitaldischargetime IS NULL)) AND medication.drugna... | eicu |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "0" AND lab.label = "Potassium, Urine" | mimicsql_data |
CREATE TABLE table_49980 (
"Name" text,
"Built" text,
"Listed" text,
"Location" text,
"County" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the County of Howard Street Tunnel?
| SELECT "County" FROM table_49980 WHERE "Name" = 'howard street tunnel' | wikisql |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE patient (
... | SELECT STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', patient.hospitaladmittime) FROM patient WHERE patient.uniquepid = '022-164523' AND NOT patient.hospitaladmittime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1 | eicu |
CREATE TABLE table_name_32 (
score INTEGER,
place VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Score, when Place is '1'?
| SELECT MIN(score) FROM table_name_32 WHERE place = "1" | sql_create_context |
CREATE TABLE table_78761 (
"Tie no" real,
"Home team" text,
"Score" text,
"Away team" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score for home team AFC Hornchurch?
| SELECT "Score" FROM table_78761 WHERE "Home team" = 'afc hornchurch' | wikisql |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH 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 = '50498130' AND mzjzjlb.JZKSRQ BETWEEN '2015-01-08' AND '2021-03-20') + (SELECT COUNT(*) FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_... | css |
CREATE TABLE table_1489 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What teak was Brady Browne drafted onto?
| SELECT "CFL Team" FROM table_1489 WHERE "Player" = 'Brady Browne' | wikisql |
CREATE TABLE Ref_Document_Status (
document_status_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What document status codes do we have?
| SELECT document_status_code FROM Ref_Document_Status | sql_create_context |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
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 in... | 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 (((flight.airline_code = 'EA') AND flight.flight_number = 212) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGT... | atis |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT decor, COUNT(*) FROM Rooms WHERE basePrice > 120 GROUP BY decor ORDER BY decor | nvbench |
CREATE TABLE table_23275 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were candidates in Florida 10 district?
| SELECT "Candidates" FROM table_23275 WHERE "District" = 'Florida 10' | wikisql |
CREATE TABLE table_204_196 (
id number,
"outcome" text,
"no." number,
"date" number,
"championship" text,
"surface" text,
"partner" text,
"opponents in the final" text,
"score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
... | SELECT "partner" FROM table_204_196 WHERE "partner" <> 'john newcombe' | squall |
CREATE TABLE table_63056 (
"Rank" real,
"Lane" real,
"Athlete" text,
"Country" text,
"Time" real,
"React" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average react of the athlete with a time less than 22.29 and a rank greater than... | SELECT AVG("React") FROM table_63056 WHERE "Time" < '22.29' AND "Rank" > '1' | wikisql |
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 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 '2006-12-19' AND '2012-05-09' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_NM = '柏凌波' A... | css |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT mzjzjlb.YLJGDM 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 = '65424109' UNION SELECT hz_info_zyjzjlb.YLJGDM FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjz... | css |
CREATE TABLE table_25835 (
"Model" text,
"Engine" text,
"Displacement" text,
"Max. power output" text,
"Peak torque" text,
"0\u2013100km/h,s 0-62mph,s" text,
"Top speed" text,
"CO 2 emissions" text,
"Years" text,
"Note" text,
"Engine code" text
)
-- Using valid SQLite, answ... | SELECT COUNT("Model") FROM table_25835 WHERE "Max. power output" = '162kW (220 PS) at 6,300 rpm' | wikisql |
CREATE TABLE table_39201 (
"Week" text,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date with resultof w 35-7
| SELECT "Date" FROM table_39201 WHERE "Result" = 'w 35-7' | wikisql |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskStates (
Id number,
Na... | SELECT LENGTH(Body) AS "Bytes", 100.0 * SUM(Score) / (LENGTH(Body) * COUNT(*)) AS "Score per 100 Bytes" FROM Posts WHERE OwnerUserId = @UserId AND PostTypeId = 2 AND Score > 0 GROUP BY LENGTH(Body) | sede |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description... | SELECT A.Id AS "post_link", A.Score, U.DisplayName FROM Posts AS A JOIN Users AS U ON A.OwnerUserId = U.Id WHERE YEAR(A.CreationDate) = 2018 AND A.PostTypeId = 1 AND NOT EXISTS(SELECT * FROM Posts AS A2 WHERE A2.OwnerUserId = U.Id AND YEAR(A2.CreationDate) < 2018 AND A2.PostTypeId = 1) ORDER BY A.Score DESC | sede |
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 * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN 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.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM... | css |
CREATE TABLE table_48006 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the... | SELECT "Points 1" FROM table_48006 WHERE "Position" < '13' AND "Goal Difference" = '+16' | wikisql |
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 Headquarter, SUM(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter | nvbench |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 job_history (
EMPLOYEE... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(MANAGER_ID) | nvbench |
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 '2003-04-03' AND '2008-05-21' | css |
CREATE TABLE table_70606 (
"Election" real,
"# of candidates nominated" real,
"# of seats won" real,
"# of total votes" real,
"% of popular vote" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most # of total votes with % of popular vote of... | SELECT MAX("# of total votes") FROM table_70606 WHERE "% of popular vote" = '32.41%' AND "# of seats won" > '95' | wikisql |
CREATE TABLE table_50610 (
"Outcome" text,
"Date" real,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tournament took place after 19... | SELECT "Tournament" FROM table_50610 WHERE "Date" > '1986' AND "Score in the final" = '7–6, 3–6, 6–2' | wikisql |
CREATE TABLE table_14581 (
"Type" text,
"Fleet numbers" text,
"Quantity made" real,
"Manufacturer" text,
"Date made" text,
"GSWR Class" real,
"GSWR Nos." text,
"GSR Class" text,
"Inchicore Class" text,
"Withdrawn" text
)
-- Using valid SQLite, answer the following questions for... | SELECT "Manufacturer" FROM table_14581 WHERE "Fleet numbers" = 'wlwr 2, 4, 11' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.