instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Continuous invasive mechanical ventilation for less than 96 consecutive hours" AND lab."CATEGORY" = "Hematol... | mimicsql_data |
CREATE TABLE table_name_76 (
grid INTEGER,
time_retired VARCHAR,
laps VARCHAR,
constructor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the average Grid for a Maserati with less than 80 laps, and a Time/Retired of +2 laps?
| SELECT AVG(grid) FROM table_name_76 WHERE laps < 80 AND constructor = "maserati" AND time_retired = "+2 laps" | sql_create_context |
CREATE TABLE table_19144 (
"Season" real,
"Class" text,
"Team" text,
"Motorcycle" text,
"Type" text,
"Races" real,
"Wins" real,
"Podiums" real,
"Poles" real,
"Fastest Laps" real,
"Pts" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the... | SELECT "Pts" FROM table_19144 WHERE "Team" = 'Kopron Team Scot' | wikisql |
CREATE TABLE table_18388 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was the candidate elected to the democratic party in 1952?
| SELECT "Candidates" FROM table_18388 WHERE "First elected" = '1952' AND "Party" = 'Democratic' | wikisql |
CREATE TABLE table_17012578_6 (
pa VARCHAR,
blank_ends VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the blank ends at 1, what is the PA?
| SELECT COUNT(pa) FROM table_17012578_6 WHERE blank_ends = 1 | sql_create_context |
CREATE TABLE table_203_249 (
id number,
"position" number,
"song title" text,
"artist" text,
"sales" number,
"highest position" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what position did madonna rank on the top 40 singles of 1995 chart ?... | SELECT "position" FROM table_203_249 WHERE "artist" = 'madonna' | squall |
CREATE TABLE table_203_180 (
id number,
"#" number,
"weekend end date" text,
"film" text,
"weekend gross (millions)" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what movie grossed the most amount of money in one weekend ?
| SELECT "film" FROM table_203_180 ORDER BY "weekend gross (millions)" DESC LIMIT 1 | squall |
CREATE TABLE table_name_94 (
qual_1 VARCHAR,
qual_2 VARCHAR,
best VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the qual 1 when the qual 2 has no time and the best is 1:16.776?
| SELECT qual_1 FROM table_name_94 WHERE qual_2 = "no time" AND best = "1:16.776" | sql_create_context |
CREATE TABLE table_14562722_1 (
original_air_date VARCHAR,
directed_by VARCHAR,
written_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the airdate of the episode that was directed by giancarlo volpe and written by is john o'bryan?
| SELECT original_air_date FROM table_14562722_1 WHERE directed_by = "Giancarlo Volpe" AND written_by = "John O'Bryan" | sql_create_context |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT p.Id AS "post_link" FROM Posts AS p INNER JOIN Comments AS cdup ON cdup.PostId = p.Id INNER JOIN Comments AS cown ON cown.PostId = p.Id AND cown.UserId = p.OwnerUserId WHERE p.PostTypeId = 1 AND cdup.Text LIKE '%possible duplicate%' AND cown.Text LIKE '%thanks%' AND p.ClosedDate IS NULL | sede |
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "15" AND prescriptions.formulary_drug_cd = "IMDU30" | mimicsql_data |
CREATE TABLE mountain (
Name VARCHAR,
Mountain_ID VARCHAR
)
CREATE TABLE climber (
Name VARCHAR,
Mountain_ID VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the names of mountains that do not have any climber.
| SELECT Name FROM mountain WHERE NOT Mountain_ID IN (SELECT Mountain_ID FROM climber) | sql_create_context |
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 AVG(t_kc24.PER_ACC_PAY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '8739090' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2003-04-09' AND '2019-11-24' | css |
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 Headquarter, AVG(Manufacturer) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY AVG(Manufacturer) DESC | nvbench |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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 varchar(20),
LAST_NAME varchar(25... | SELECT JOB_ID, SUM(DEPARTMENT_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY SUM(DEPARTMENT_ID) | nvbench |
CREATE TABLE table_4235 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Title" FROM table_4235 WHERE "Production code" = 'FL209' | wikisql |
CREATE TABLE table_name_87 (
date INTEGER,
catalog VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the lowest date for catalog of 6561910008-1
| SELECT MIN(date) FROM table_name_87 WHERE catalog = "6561910008-1" | 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 prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.itemid = "51279" | mimicsql_data |
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 COUNT(*) FROM t_kc21 WHERE PERSON_NM = '马文心' AND CLINIC_TYPE = '住院' AND MOD(MED_AMOUT, 1) = 0 | css |
CREATE TABLE table_name_31 (
catalogno VARCHAR,
remark VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Catalogno was #160 us?
| SELECT catalogno FROM table_name_31 WHERE remark = "#160 us" | sql_create_context |
CREATE TABLE stadium (
id int,
name text,
Home_Games int,
Average_Attendance real,
Total_Attendance real,
Capacity_Percentage real
)
CREATE TABLE injury_accident (
game_id int,
id int,
Player text,
Injury text,
Number_of_matches text,
Source text
)
CREATE TABLE game (
... | SELECT T1.id, COUNT(*) FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id GROUP BY T1.id | nvbench |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetake... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 377 AND STRFTIME('%y', patient.unitadmittime) <= '2103' | eicu |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREAT... | SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-59493')) AND treatment.treatmentname = 'valve replacement or ... | eicu |
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 hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '54865219' AND hz_info.YLJGDM = '2082704' AND NOT zyjzjlb.JZKSMC LIKE '%精神科%' | css |
CREATE TABLE medicine (
id int,
name text,
Trade_Name text,
FDA_approved text
)
CREATE TABLE enzyme (
id int,
name text,
Location text,
Product text,
Chromosome text,
OMIM int,
Porphyria text
)
CREATE TABLE medicine_enzyme_interaction (
enzyme_id int,
medicine_id in... | SELECT name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id ORDER BY name DESC | nvbench |
CREATE TABLE mzjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'I65.176' AND jyjgzbb.JCZBDM =... | css |
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_ORG_DEPT_CD, MED_ORG_DEPT_NM FROM t_kc21 WHERE MED_CLINIC_ID = '14427272423' | css |
CREATE TABLE table_32639 (
"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 home team has a score of 11.9 (75)?
| SELECT "Home team" FROM table_32639 WHERE "Home team score" = '11.9 (75)' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT prescriptions.icustay_id FROM prescriptions WHERE prescriptions.subject_id = "83678" | mimicsql_data |
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases IN... | SELECT County, COUNT(County) FROM appellations GROUP BY County | nvbench |
CREATE TABLE table_17236 (
"Rnd" real,
"Circuit" text,
"WSC Winning Team" text,
"GT1 Winning Team" text,
"GT2 Winning Team" text,
"GT3 Winning Team" text,
"Results" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the GT2 winning team ... | SELECT "GT2 Winning Team" FROM table_17236 WHERE "GT3 Winning Team" = '#1 PTG' | wikisql |
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDat... | SELECT COUNT(*) FROM Votes JOIN Posts ON Votes.PostId = Posts.Id WHERE Votes.VoteTypeId IN (2, 3) AND Votes.CreationDate >= DATEADD(DAY, -30, GETDATE()) AND Posts.PostTypeId IN (1) | sede |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
had... | SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 83901) AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 ... | mimic_iii |
CREATE TABLE table_15780049_8 (
date VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the date for sacramento
| SELECT date FROM table_15780049_8 WHERE team = "Sacramento" | sql_create_context |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND diagnoses.long_title = "Drug induced neutropenia" | mimicsql_data |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugsto... | SELECT (SELECT vitalperiodic.systemicmean FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-11305') AND NOT patient.unitdischargetime ... | eicu |
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_required varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
... | 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, state WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NEWARK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... | atis |
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, Team_ID FROM basketball_match ORDER BY All_Games | nvbench |
CREATE TABLE table_203_538 (
id number,
"flight" text,
"date" text,
"payload nickname" text,
"payload" text,
"orbit" text,
"result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in what year did the first h ii flight take place ?
| SELECT MIN("date") FROM table_203_538 | squall |
CREATE TABLE table_256286_54 (
meas_num INTEGER,
no_votes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the no votes was 322682, what was the max meas. number?
| SELECT MAX(meas_num) FROM table_256286_54 WHERE no_votes = 322682 | sql_create_context |
CREATE TABLE table_name_23 (
record VARCHAR,
score VARCHAR,
home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Record has a Score of 2 4, and a Home of quebec nordiques?
| SELECT record FROM table_name_23 WHERE score = "2–4" AND home = "quebec nordiques" | sql_create_context |
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
value_points real,
quality_rank int
)
CREATE TABLE repair_assignment (
technician_id int,
... | SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "HYPERGLYCEMIA;HYPONATREMIA" AND procedures.short_title = "Insert 2 vascular stents" | mimicsql_data |
CREATE TABLE table_10798421_1 (
village__german_ VARCHAR,
village__slovenian_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Provide me with the name of all the village (German) that are part of the village (Slovenian) with sele borovnica.
| SELECT village__german_ FROM table_10798421_1 WHERE village__slovenian_ = "Sele Borovnica" | sql_create_context |
CREATE TABLE table_name_9 (
tournament VARCHAR,
opponent_in_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which Tournament was Mansour Bahrami Eric Winogradsky
| SELECT tournament FROM table_name_9 WHERE opponent_in_final = "mansour bahrami eric winogradsky" | sql_create_context |
CREATE TABLE table_80025 (
"Model" text,
"Seats" text,
"Period" text,
"Built" real,
"Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Between which years were there 241 fokker 70 model cabins built?
| SELECT "Period" FROM table_80025 WHERE "Built" < '241' AND "Model" = 'fokker 70' | wikisql |
CREATE TABLE table_name_51 (
remixed_by VARCHAR,
year VARCHAR,
version VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which long version was remixed in 1986?
| SELECT remixed_by FROM table_name_51 WHERE year = 1986 AND version = "long version" | sql_create_context |
CREATE TABLE table_8823 (
"City" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is City, when Country is 'Kuwait'?
| SELECT "City" FROM table_8823 WHERE "Country" = 'kuwait' | wikisql |
CREATE TABLE table_2159571_2 (
reason_for_change VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every reason for change for the Washington 3rd District?
| SELECT reason_for_change FROM table_2159571_2 WHERE district = "Washington 3rd" | sql_create_context |
CREATE TABLE table_train_116 (
"id" int,
"mini_mental_state_examination_mmse" int,
"hemoglobin_a1c_hba1c" float,
"body_weight" float,
"hepatic_disease" bool,
"geriatric_depression_scale_gds" int,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT * FROM table_train_116 WHERE hepatic_disease = 1 | criteria2sql |
CREATE TABLE table_17157 (
"Player" text,
"No.(s)" text,
"Height in Ft." text,
"Position" text,
"Years for Rockets" text,
"School/Club Team/Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which school, club team, or country played for th... | SELECT "School/Club Team/Country" FROM table_17157 WHERE "Years for Rockets" = '2000-01' | wikisql |
CREATE TABLE table_16751596_12 (
republican VARCHAR,
dates_administered VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On November 14, 2007, how many different Republican: Jeff Sessions are there?
| SELECT COUNT(republican) AS :_jeff_sessions FROM table_16751596_12 WHERE dates_administered = "November 14, 2007" | sql_create_context |
CREATE TABLE table_60863 (
"Round" real,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning Driver" text,
"Winning Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who had the pole position on 7 August?
| SELECT "Pole Position" FROM table_60863 WHERE "Date" = '7 august' | wikisql |
CREATE TABLE table_203_538 (
id number,
"flight" text,
"date" text,
"payload nickname" text,
"payload" text,
"orbit" text,
"result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- no flight other than what flight was canceled ?
| SELECT "flight" FROM table_203_538 WHERE "result" = 'canceled' | squall |
CREATE TABLE table_55684 (
"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.
-- When was the game at Essendon?
| SELECT "Date" FROM table_55684 WHERE "Away team" = 'essendon' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.short_title = "Cardiopulm resuscita NOS" | mimicsql_data |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 93104 AND admissions.admission_location = 'emergency room admit' AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
CREATE TABLE table_72675 (
"Round" text,
"Race" real,
"Circuit" text,
"Date" text,
"Pole Position" text,
"Fastest Lap" text,
"Winning driver" text,
"Winning team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which race number in the In... | SELECT "Race" FROM table_72675 WHERE "Circuit" = 'Indy F3 Challenge' AND "Pole Position" = 'John Martin' | wikisql |
CREATE TABLE table_name_50 (
score VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score when 43,746 attended?
| SELECT score FROM table_name_50 WHERE attendance = "43,746" | sql_create_context |
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 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.short_title = "Peritonitis (acute) gen" AND prescriptions.route = "IH" | mimicsql_data |
CREATE TABLE table_13755296_1 (
season__number INTEGER,
directed_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the season number of the episode directed by Dan Attias?
| SELECT MIN(season__number) FROM table_13755296_1 WHERE directed_by = "Dan Attias" | sql_create_context |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | (SELECT jybgb.KSBM, jybgb.KSMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '... | css |
CREATE TABLE Enrolled_in (
StuID INTEGER,
CID VARCHAR(7),
Grade VARCHAR(2)
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Rank VARCHAR(15),
Sex VARCHAR(1),
Phone INTEGER,
Room VARCHAR(5),
Building VARCHAR(13)
)
CREATE TABLE Member_of (
Fac... | SELECT Days, SUM(Instructor) FROM Course GROUP BY Days ORDER BY Credits | nvbench |
CREATE TABLE sampledata15 (
sample_pk number,
state text,
year text,
month text,
day text,
site text,
commod text,
source_id text,
variety text,
origin text,
country text,
disttype text,
commtype text,
claim text,
quantity number,
growst text,
packst t... | SELECT testclass FROM resultsdata15 WHERE sample_pk = 7498 | pesticide |
CREATE TABLE table_name_95 (
dissolved VARCHAR,
elected VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was dissolved that was elected in 1553?
| SELECT dissolved FROM table_name_95 WHERE elected = "1553" | sql_create_context |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDBM = 'B99.606' AND jyjgzbb.JCZBMC = '... | css |
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 SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '凤德容' AND MED_SER_ORG_NO = '8078105' AND IN_HOSP_DATE BETWEEN '2008-02-04' AND '2014-05-24') | css |
CREATE TABLE table_32554 (
"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 venue saw a crowd larger than 29,840?
| SELECT "Venue" FROM table_32554 WHERE "Crowd" > '29,840' | wikisql |
CREATE TABLE table_name_5 (
jury_points VARCHAR,
televote_points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Jury Points value when there were 3 Televote Points?
| SELECT jury_points FROM table_name_5 WHERE televote_points = "3" | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Medicaid" AND lab.label = "Prostate Specific Antigen" | mimicsql_data |
CREATE TABLE table_name_58 (
position VARCHAR,
appearances VARCHAR,
leeds_career VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What position does the player who has made 244 appearances with a Leeds career of 1981 1989 play?
| SELECT position FROM table_name_58 WHERE appearances = 244 AND leeds_career = "1981–1989" | sql_create_context |
CREATE TABLE table_name_16 (
loss VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Record of 89-67 had what loss?
| SELECT loss FROM table_name_16 WHERE record = "89-67" | sql_create_context |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE requirement (
requirement_id int,
require... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 10 AND program_course.category LIKE 'ULCS' | advising |
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 COUNT(*) FROM zyjzjlb WHERE YLJGDM = '9624712' AND JZKSDM = '1153' AND RYDJSJ BETWEEN '2012-07-05' AND '2019-09-09' | css |
CREATE TABLE table_203_308 (
id number,
"athlete" text,
"nation" text,
"olympics" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- in what year was karine ruby 's first olymp... | SELECT MIN("olympics") FROM table_203_308 WHERE "athlete" = 'karine ruby' | squall |
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes nu... | SELECT TIME_TO_STR(Posts.CreationDate, '%m') AS "month", TIME_TO_STR(Posts.CreationDate, '%d') AS "day", COUNT(Posts.Id) AS "posts", SUM(CASE WHEN Users.Reputation = 101 THEN 1 ELSE 0 END) AS posts_101, SUM(CASE WHEN Users.Reputation = 1 THEN 1 ELSE 0 END) AS posts_1 FROM Posts INNER JOIN Users ON Users.Id = OwnerUserI... | sede |
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Accounts (
Account_ID INTEGER,
Statement_ID INTEGER,
Account_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Typ... | SELECT COUNT(*), Project_ID FROM Documents WHERE Document_Type_Code = "BK" GROUP BY Project_ID | nvbench |
CREATE TABLE table_name_81 (
elected VARCHAR,
party VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Party of republican, and a District of 7th is what elected?
| SELECT elected FROM table_name_81 WHERE party = "republican" AND district = "7th" | sql_create_context |
CREATE TABLE table_name_80 (
drawn INTEGER,
lost VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Drawn has a Lost larger than 8, and Points smaller than 7?
| SELECT SUM(drawn) FROM table_name_80 WHERE lost > 8 AND points < 7 | sql_create_context |
CREATE TABLE table_name_94 (
attendance INTEGER,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest attendance on November 18?
| SELECT MIN(attendance) FROM table_name_94 WHERE date = "november 18" | sql_create_context |
CREATE TABLE table_19427 (
"State/UT Code" real,
"India/State/UT" text,
"Literate Persons (%)" text,
"Males (%)" text,
"Females (%)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the percentage of literate people where india is andaman and ... | SELECT "Literate Persons (%)" FROM table_19427 WHERE "India/State/UT" = 'Andaman and Nicobar Islands' | wikisql |
CREATE TABLE table_5341 (
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Gold of 0, and a Bronze smaller than 0 and what is the sum of the silver?
| SELECT SUM("Silver") FROM table_5341 WHERE "Gold" = '0' AND "Bronze" < '0' | wikisql |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id... | 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHOENIX... | atis |
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Ref_Transaction_Types (
transaction_type_code VARCHAR(10),
transaction_type_description VARCHAR(80)
)
CREATE T... | SELECT lot_details, COUNT(lot_details) FROM Lots GROUP BY lot_details ORDER BY COUNT(lot_details) | nvbench |
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 COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.JZKSMC = '小儿青光眼科' AND wdmzjzjlb.JZKSRQ BETWEEN '2013-03-31' AND '2020-09-29' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.JZKSMC = '小儿青光眼科' AND bdmzjzjlb.JZKSRQ BETWEEN '2013-03-31' AND '2020-09-29' | 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 demographic.gender, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "813" | mimicsql_data |
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.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '07653980' AND gwyjzb.IN_HOSP_DATE BETWEEN '2002-01-04' AND '2003-06-25' GROUP BY gwyjzb.IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1 UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID... | css |
CREATE TABLE table_3625 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What party represents the district with john g. jackson?
| SELECT "Party" FROM table_3625 WHERE "Incumbent" = 'John G. Jackson' | wikisql |
CREATE TABLE table_18217753_1 (
series__number VARCHAR,
us_viewers__millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many series had viewers totaling 23.93 million?
| SELECT COUNT(series__number) FROM table_18217753_1 WHERE us_viewers__millions_ = "23.93" | sql_create_context |
CREATE TABLE table_name_10 (
distance VARCHAR,
stage VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What distance did giovanni lombardi win after stage 5?
| SELECT distance FROM table_name_10 WHERE stage > 5 AND winner = "giovanni lombardi" | sql_create_context |
CREATE TABLE table_43063 (
"Date" text,
"Cover model" text,
"Centerfold model" text,
"Interview subject" text,
"20 Questions" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Interview Subject when the 20 Questions was William H. Macy?
| SELECT "Interview subject" FROM table_43063 WHERE "20 Questions" = 'william h. macy' | wikisql |
CREATE TABLE table_name_31 (
attendance VARCHAR,
visitor VARCHAR,
home VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many people were at Washington's home game against Miami?
| SELECT COUNT(attendance) FROM table_name_31 WHERE visitor = "miami" AND home = "washington" | sql_create_context |
CREATE TABLE characteristics (
characteristic_id number,
characteristic_type_code text,
characteristic_data_type text,
characteristic_name text,
other_characteristic_details text
)
CREATE TABLE ref_colors (
color_code text,
color_description text
)
CREATE TABLE product_characteristics (
... | SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id WHERE t1.product_name = "sesame" | spider |
CREATE TABLE stores (
store_id text,
address_id number,
marketing_region_code text,
store_name text,
store_phone text,
store_email_address text,
other_details text
)
CREATE TABLE bookings (
booking_id number,
customer_id number,
workshop_group_id text,
status_code text,
... | SELECT T1.city_town FROM addresses AS T1 JOIN stores AS T2 ON T1.address_id = T2.address_id WHERE T2.store_name = "FJA Filming" | spider |
CREATE TABLE table_name_21 (
actor VARCHAR,
duration VARCHAR,
soap_opera VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which actor played on Home and Away for 20 years?
| SELECT actor FROM table_name_21 WHERE duration = "20 years" AND soap_opera = "home and away" | sql_create_context |
CREATE TABLE table_name_41 (
monotone VARCHAR,
clone_independence VARCHAR,
pareto_efficiency VARCHAR,
non_dictatorship VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the monotone when pareto efficiency is yes, non-dictatorship is yes, and clo... | SELECT monotone FROM table_name_41 WHERE pareto_efficiency = "yes" AND non_dictatorship = "yes" AND clone_independence = "yes" | sql_create_context |
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 SUM(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '7500106' AND t_kc24.t_kc21_MED_ORG_DEPT_NM = '高压氧科') AND t_kc24.CLINIC_SLT_DATE BETWEEN '2003-11-16' AND '2012-11-19' | css |
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 ACC_Road, SUM(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road | nvbench |
CREATE TABLE table_40941 (
"Tournament" text,
"Wins" real,
"Top-5" real,
"Top-25" real,
"Events" real,
"Cuts made" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of top-25s for tournaments that had 0 wins, 1 cut made, an... | SELECT COUNT("Top-25") FROM table_40941 WHERE "Wins" = '0' AND "Cuts made" = '1' AND "Events" > '5' | wikisql |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDat... | WITH two_answers AS (SELECT q.Id AS question, MIN(a.Id) AS first, MAX(a.Id) AS last FROM Posts AS q JOIN Posts AS a ON q.Id = a.ParentId WHERE q.AnswerCount >= 2 GROUP BY q.Id HAVING CURRENT_TIMESTAMP() - MAX(a.CreationDate) > 30) SELECT COALESCE(q.AnswerCount, 0) AS answers, ROUND(AVG(CAST(COALESCE(f.Score, 0) AS FLOA... | sede |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.