instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_49 (
authority VARCHAR,
roll VARCHAR,
gender VARCHAR,
decile VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which Authority has a coed school with a decile greater than 4, with a 150 roll?
| SELECT authority FROM table_name_49 WHERE gender = "coed" AND decile > 4 AND roll = "150" | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number... | SELECT chartevents.charttime 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 = 3710) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents.itemid ... | mimic_iii |
CREATE TABLE table_name_98 (
status VARCHAR,
route_of_administration VARCHAR,
gene VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the statue of the aat gene, which has an intramuscular route of administration?
| SELECT status FROM table_name_98 WHERE route_of_administration = "intramuscular" AND gene = "aat" | sql_create_context |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostsWithDeleted (
Id numbe... | SELECT CreationDate, Id, ViewCount FROM (SELECT CreationDate, Id, ViewCount FROM Posts WHERE Tags LIKE '%fabric%' AND CreationDate BETWEEN '2016-01-01' AND '2020-12-31') AS tb ORDER BY 1 | sede |
CREATE TABLE table_24145 (
"Rank" real,
"Strike rate" text,
"Player" text,
"Innings" real,
"Balls Faced" real,
"Runs" real,
"Period" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank for a strike rate of 91.67?
| SELECT MAX("Rank") FROM table_24145 WHERE "Strike rate" = '91.67' | wikisql |
CREATE TABLE table_71245 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the engine for years before 1990 and chassis of eurobrun er189
| SELECT "Engine" FROM table_71245 WHERE "Year" < '1990' AND "Chassis" = 'eurobrun er189' | 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 (SELECT zyjybgb.KSBM FROM mzjzjlb JOIN zyjybgb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '9602560' AND zyjybgb.BGRQ BETWEEN '2004-10-17' AND '2016-06-04' GROUP BY zyjybgb.KSBM HAVING COUNT(*) > 27 UNION SELECT mzjybgb.KSBM FROM mzjzj... | 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 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.label = "Other Cell" | mimicsql_data |
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 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 = '97116983' AND mzjzjlb.JZKSRQ BETWEEN '2006-12-08' AND '2015-10-12' AND mzjzjlb.YLJGDM = '2605542' | css |
CREATE TABLE table_name_29 (
capacity INTEGER,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average capacity for the venue where the team kommunalnik played?
| SELECT AVG(capacity) FROM table_name_29 WHERE team = "kommunalnik" | sql_create_context |
CREATE TABLE table_name_67 (
finish VARCHAR,
start VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the finish value for a start of 19?
| SELECT finish FROM table_name_67 WHERE start = "19" | sql_create_context |
CREATE TABLE table_name_49 (
purpose VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Purpose has a Name of oak?
| SELECT purpose FROM table_name_49 WHERE name = "oak" | sql_create_context |
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 TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE date_day (
mon... | 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 ((flight.to_airport = AIRPORT_SERVICE_0.airport_code AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'MONTREAL') OR (flight.from_airpor... | atis |
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 c.Id AS "Comment ID", c.CreationDate AS "Comment Date", u.DisplayName AS "Post Owner", p.Id AS "Post ID", p.Title AS "Post Title", p.ParentId AS "Parent ID" FROM Posts AS p JOIN Comments AS c ON c.PostId = p.Id JOIN Users AS u ON u.Id = p.OwnerUserId WHERE c.UserId = 206691 | sede |
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, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter DESC | nvbench |
CREATE TABLE table_27537518_9 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On which date was the record of 27-28-11 set?
| SELECT date FROM table_27537518_9 WHERE record = "27-28-11" | sql_create_context |
CREATE TABLE table_name_82 (
method VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the method of the bout lasting 4:15?
| SELECT method FROM table_name_82 WHERE time = "4:15" | sql_create_context |
CREATE TABLE PostTypes (
Id number,
Name 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 number,
ProfileImage... | SELECT Title, Body, Tags FROM Posts WHERE Tags LIKE '%orienta o-a-objetos%' | sede |
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 zyjybgb.BGJGDM, zyjybgb.BGJGMC FROM zyjybgb WHERE zyjybgb.BGDH = '19150646660' UNION SELECT mzjybgb.BGJGDM, mzjybgb.BGJGMC FROM mzjybgb WHERE mzjybgb.BGDH = '19150646660' | css |
CREATE TABLE table_20098479_1 (
written_by VARCHAR,
no_in_series VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wrote episode number 48
| SELECT written_by FROM table_20098479_1 WHERE no_in_series = 48 | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-42006... | eicu |
CREATE TABLE table_name_88 (
traffic_direction VARCHAR,
street VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the traffic direction of 70th street?
| SELECT traffic_direction FROM table_name_88 WHERE street = "70th street" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugst... | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-18678')) AND vitalperiodic.respiration < 21.0 AND NOT vitalperio... | eicu |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | SELECT mzjzjlb.JZZTDM, mzjzjlb.JZZTMC FROM mzjzjlb WHERE mzjzjlb.JZLSH = '87790352071' | 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 * FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE hz_inf... | css |
CREATE TABLE table_name_81 (
grid INTEGER,
laps VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Grid for jj lehto with over 51 laps?
| SELECT MIN(grid) FROM table_name_81 WHERE laps > 51 AND driver = "jj lehto" | sql_create_context |
CREATE TABLE lives_in (
stuid number,
dormid number,
room_number number
)
CREATE TABLE has_amenity (
dormid number,
amenid number
)
CREATE TABLE dorm (
dormid number,
dorm_name text,
student_capacity number,
gender text
)
CREATE TABLE dorm_amenity (
amenid number,
amenity_... | SELECT SUM(student_capacity) FROM dorm | spider |
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 WHERE demographic.admission_type = "URGENT" AND demographic.insurance = "Self Pay" | mimicsql_data |
CREATE TABLE table_17380 (
"Season" text,
"Cup FinalDate" text,
"WinningTeam" text,
"Score" text,
"LosingTeam" text,
"Location" text,
"Cup Final Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many losingteams were for the cup... | SELECT COUNT("LosingTeam") FROM table_17380 WHERE "Cup FinalDate" = '20 August 1989' | wikisql |
CREATE TABLE table_dev_57 (
"id" int,
"intra_aortic_balloon_pump_iabp" bool,
"systolic_blood_pressure_sbp" int,
"heart_disease" bool,
"vasopressors" bool,
"temperature" float,
"creatinine_clearance_cl" float,
"cardiogenic_shock" bool,
"height" int,
"serum_creatinine" float,
"... | SELECT * FROM table_dev_57 WHERE cardiogenic_shock = 1 OR (systolic_blood_pressure_sbp < 80 OR (systolic_blood_pressure_sbp < 100 AND (vasopressors = 1 OR intra_aortic_balloon_pump_iabp = 1))) | criteria2sql |
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 MIN(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.age >= "55" | mimicsql_data |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE days (
d... | SELECT DISTINCT aircraft.basic_type FROM aircraft, airline, equipment_sequence, flight WHERE airline.airline_name LIKE 'CANADIAN AIRLINES' AND equipment_sequence.aircraft_code = aircraft.aircraft_code AND flight.aircraft_code_sequence = equipment_sequence.aircraft_code_sequence AND flight.airline_code = airline.airline... | atis |
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 jybgb (
BBCJBW text,
BBDM tex... | SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_inf... | css |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-5271')) AND NOT vitalperiodic.heartrate IS NULL... | eicu |
CREATE TABLE table_name_68 (
player VARCHAR,
position VARCHAR,
nationality VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the player from Denmark who plays position c?
| SELECT player FROM table_name_68 WHERE position = "c" AND nationality = "denmark" | sql_create_context |
CREATE TABLE table_name_23 (
superlative VARCHAR,
record_set VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Superlative had a record set of 12 nominations?
| SELECT superlative FROM table_name_23 WHERE record_set = "12 nominations" | sql_create_context |
CREATE TABLE table_78856 (
"Year" real,
"Award Ceremony" text,
"Category" text,
"Nominee" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result for the nomination of Best Revival of a Musical?
| SELECT "Result" FROM table_78856 WHERE "Category" = 'best revival of a musical' | wikisql |
CREATE TABLE ref_document_types (
document_type_code text,
document_type_name text,
document_type_description text
)
CREATE TABLE roles (
role_code text,
role_name text,
role_description text
)
CREATE TABLE all_documents (
document_id number,
date_stored time,
document_type_code te... | SELECT T1.employee_id FROM employees AS T1 JOIN roles AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Human Resource" OR T2.role_name = "Manager" | spider |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.days_stay = "8" AND demographic.admityear >= "2103" | mimicsql_data |
CREATE TABLE table_name_90 (
episodes VARCHAR,
romaji_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Episodes have a Romaji Title of dragon zakura?
| SELECT COUNT(episodes) FROM table_name_90 WHERE romaji_title = "dragon zakura" | sql_create_context |
CREATE TABLE table_35890 (
"Date" text,
"Competition" text,
"Opponents" text,
"Venue" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent at the League Cup competition with a score of 3-1?
| SELECT "Opponents" FROM table_35890 WHERE "Competition" = 'league cup' AND "Score" = '3-1' | wikisql |
CREATE TABLE table_2945 (
"No. in Series" real,
"No. in Season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided ab... | SELECT "Production code" FROM table_2945 WHERE "Directed by" = 'Matt Shakman' | wikisql |
CREATE TABLE table_name_96 (
runner_up VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the runner- up when the tournament is santiago?
| SELECT runner_up FROM table_name_96 WHERE tournament = "santiago" | sql_create_context |
CREATE TABLE table_39873 (
"Team #1" text,
"Agg." text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who played against Hapoel tel aviv when they were team #1?
| SELECT "Team #2" FROM table_39873 WHERE "Team #1" = 'hapoel tel aviv' | wikisql |
CREATE TABLE table_name_54 (
away_team VARCHAR,
match_score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Away team when the match score was norths 19 manly 4?
| SELECT away_team FROM table_name_54 WHERE match_score = "norths 19 manly 4" | 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 jybgb (
BBCJBW text,
BBDM tex... | SELECT person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND zyjzjlb.YLJGDM = jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB WHERE jybgb.BGDH = '66920522667' | css |
CREATE TABLE table_5309 (
"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 wa... | SELECT AVG("Game") FROM table_5309 WHERE "Record" = '16-63' | wikisql |
CREATE TABLE procedures_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 d_icd_proce... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'proparacaine hcl 0.5% opth.' AND DATETIME(prescriptions.startdate... | mimic_iii |
CREATE TABLE table_name_56 (
game INTEGER,
january VARCHAR,
decision VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Game has a January larger than 18, and a Decision of valiquette?
| SELECT MAX(game) FROM table_name_56 WHERE january > 18 AND decision = "valiquette" | sql_create_context |
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.JCZBJGDL, jyjgzbb.JCZBJGDW 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 = jy... | css |
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.admission_type = "EMERGENCY" AND procedures.short_title = "Replace small bowel tube" | mimicsql_data |
CREATE TABLE table_62648 (
"Region" text,
"Date" text,
"Format(s)" text,
"Edition(s)" text,
"Label" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Edition of the release in Germany?
| SELECT "Edition(s)" FROM table_62648 WHERE "Region" = 'germany' | wikisql |
CREATE TABLE procedures (
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 WHERE demographic.admityear < "2187" AND diagnoses.long_title = "Cardiac tamponade" | mimicsql_data |
CREATE TABLE table_70882 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Chassis with less than 8 points before 1960?
| SELECT "Chassis" FROM table_70882 WHERE "Year" < '1960' AND "Points" < '8' | wikisql |
CREATE TABLE table_149330_1 (
change_in_seat VARCHAR,
_percentage_of_votes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the number of seat changes when the % of votes was 23.75?
| SELECT change_in_seat FROM table_149330_1 WHERE _percentage_of_votes = "23.75" | sql_create_context |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
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 t... | SELECT * 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.YLJGDM AND jybgb.... | css |
CREATE TABLE table_name_6 (
against VARCHAR,
opposing_teams VARCHAR,
status VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total against for opposing team scotland at twickenham, london venue with a status of five nations?
| SELECT COUNT(against) FROM table_name_6 WHERE status = "five nations" AND venue = "twickenham, london" AND opposing_teams = "scotland" | sql_create_context |
CREATE TABLE table_38276 (
"Name" text,
"Creator" text,
"Platform / OS" text,
"First public release" text,
"Latest stable release" text,
"Open source" text,
"Programming language used" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Cre... | SELECT "Creator" FROM table_38276 WHERE "Latest stable release" = 'unknown' AND "Name" = 'myeclipse' | wikisql |
CREATE TABLE table_name_88 (
surface VARCHAR,
partner VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What type of surface was played on when julie halard-decugis was the partner on October 8, 2000?
| SELECT surface FROM table_name_88 WHERE partner = "julie halard-decugis" AND date = "october 8, 2000" | sql_create_context |
CREATE TABLE table_26263322_1 (
background VARCHAR,
candidate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the background of the candidate daniel phillips?
| SELECT background FROM table_26263322_1 WHERE candidate = "Daniel Phillips" | sql_create_context |
CREATE TABLE table_name_59 (
week VARCHAR,
attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What week had attendance of 48,667?
| SELECT COUNT(week) FROM table_name_59 WHERE attendance = 48 OFFSET 667 | sql_create_context |
CREATE TABLE table_name_44 (
iwork_version VARCHAR,
release_date VARCHAR,
pages_version VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What version of iWork was released on October 22, 2013 with a pages version greater than 2?
| SELECT iwork_version FROM table_name_44 WHERE release_date = "october 22, 2013" AND pages_version > 2 | sql_create_context |
CREATE TABLE table_name_16 (
pre_conversion VARCHAR,
owner VARCHAR,
re_entered_service__p_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which of V/Line Passenger's pre-conversions re-entered service on 23 November 1984?
| SELECT pre_conversion FROM table_name_16 WHERE owner = "v/line passenger" AND re_entered_service__p_ = "23 november 1984" | sql_create_context |
CREATE TABLE table_name_66 (
year VARCHAR,
laps VARCHAR,
qual VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Year has a Qual of 144.683 and Lap larger than 27?
| SELECT year FROM table_name_66 WHERE laps > 27 AND qual = "144.683" | sql_create_context |
CREATE TABLE table_29546030_2 (
skip__club_ VARCHAR,
pa VARCHAR,
blank_ends VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which skip (club) had 31 PA and 9 blank ends?
| SELECT skip__club_ FROM table_29546030_2 WHERE pa = 31 AND blank_ends = 9 | sql_create_context |
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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
... | SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 96833) AND DATETIME(icustays.intime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') | mimic_iii |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_descriptio... | SELECT DISTINCT flight.departure_time FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'S... | atis |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE month (
... | SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'US' | atis |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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 jy... | css |
CREATE TABLE table_34548 (
"Date" text,
"Tournament" text,
"Tier" text,
"Surface" text,
"Opponent in the final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When David McNamara was the opponent in the final, what was the tier?
| SELECT "Tier" FROM table_34548 WHERE "Opponent in the final" = 'david mcnamara' | wikisql |
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", p.CreationDate, p.OwnerUserId AS "user_link" FROM Posts AS p INNER JOIN Users AS u ON u.Id = p.OwnerUserId WHERE p.PostTypeId = 1 AND u.LastAccessDate > DATEADD(m, -1, GETDATE()) AND p.CreationDate < DATEADD(d, -60, GETDATE()) AND NOT p.ClosedDate IS NULL AND p.AnswerCount = 0 AND p.Score > ... | sede |
CREATE TABLE table_name_22 (
attendance INTEGER,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of Attendance when macclesfield town was the way team?
| SELECT SUM(attendance) FROM table_name_22 WHERE away_team = "macclesfield town" | sql_create_context |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "EPISCOPALIAN" AND lab.itemid = "51497" | mimicsql_data |
CREATE TABLE table_25109 (
"Player" text,
"Nat" text,
"Pos" text,
"L Apps" real,
"L G" real,
"C Apps" real,
"C G" real,
"Total Apps" real,
"Total G" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least total apaps for txema
| SELECT MIN("Total Apps") FROM table_25109 WHERE "Player" = 'Txema' | wikisql |
CREATE TABLE table_2008069_2 (
conventional VARCHAR,
uyghur___k̢ona_yezik̢__ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the conventional for
| SELECT conventional FROM table_2008069_2 WHERE uyghur___k̢ona_yezik̢__ = "تاغارما" | sql_create_context |
CREATE TABLE table_name_34 (
episode__number VARCHAR,
original_airdate VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the episode number that aired on july 23, 2000
| SELECT episode__number FROM table_name_34 WHERE original_airdate = "july 23, 2000" | sql_create_context |
CREATE TABLE table_24919137_2 (
venue VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the game played when the score was 14.16 (100)-12.12 (84)?
| SELECT venue FROM table_24919137_2 WHERE score = "14.16 (100)-12.12 (84)" | sql_create_context |
CREATE TABLE table_name_69 (
result VARCHAR,
year VARCHAR,
award VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result for song of the year award in 1994?
| SELECT result FROM table_name_69 WHERE year = 1994 AND award = "song of the year" | sql_create_context |
CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREATE TABLE Events (
Event_ID INTEGER,
Service_ID INTEGER,
Event_Details VARCHAR(255)
)
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER... | SELECT Participant_Type_Code, COUNT(Participant_Type_Code) FROM Participants GROUP BY Participant_Type_Code ORDER BY Participant_Type_Code DESC | nvbench |
CREATE TABLE table_13321 (
"Debut year" real,
"Player" text,
"Games" real,
"Goals" real,
"Years at club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the debut year for the player with fewer than 54 games, fewer than 8 goals and 1989 at cl... | SELECT AVG("Debut year") FROM table_13321 WHERE "Games" < '54' AND "Years at club" = '1989' AND "Goals" < '8' | 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 hz_info_mzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YL... | 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 SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '90720666' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2000-02-09' AND '2000-05-14' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' | css |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE m... | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18877 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND microbiologyevents.spec_type_desc = 'bronchoalveolar lavage' AND NOT microbiology... | mimic_iii |
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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID | nvbench |
CREATE TABLE table_61933 (
"Summoned" text,
"Elected" text,
"Assembled" text,
"Dissolved" text,
"1st member" text,
"2nd member" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the dissolved date of the parliament assembled on 3 June 1467?... | SELECT "Dissolved" FROM table_61933 WHERE "Assembled" = '3 june 1467' | wikisql |
CREATE TABLE table_name_45 (
international_mail INTEGER,
change VARCHAR,
domestic_mail VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the international mail with the highest number that has a change of +0,2% and less than 0 domestic mail?
| SELECT MAX(international_mail) FROM table_name_45 WHERE change = "+0,2%" AND domestic_mail < 0 | sql_create_context |
CREATE TABLE table_66830 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
)
-- Using valid SQLite, answer the following questions f... | SELECT "Points against" FROM table_66830 WHERE "Played" = '22' AND "Losing bonus" = '3' AND "Tries against" = '45' | wikisql |
CREATE TABLE table_4736 (
"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 was the score when geelong was the away team... | SELECT "Home team score" FROM table_4736 WHERE "Home team" = 'geelong' | wikisql |
CREATE TABLE table_name_53 (
main_language_s_ VARCHAR,
film_title_used_in_nomination VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the primary language used in the film, Black Book?
| SELECT main_language_s_ FROM table_name_53 WHERE film_title_used_in_nomination = "black book" | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREAT... | SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '033-10145' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '033-10145' AND patient.hospitaldischargetime IS NULL)) AND tr... | eicu |
CREATE TABLE table_41750 (
"Variant id" text,
"5\u2019UTR splice" text,
"Coding" text,
"3\u2019UTR sequence" text,
"GenBank id" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which genbank id's variant is abd1a?
| SELECT "GenBank id" FROM table_41750 WHERE "Variant id" = 'abd1a' | wikisql |
CREATE TABLE table_204_190 (
id number,
"rank" number,
"city" text,
"county" text,
"state" text,
"percentage" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which city is ranked last ?
| SELECT "city" FROM table_204_190 ORDER BY "rank" DESC LIMIT 1 | squall |
CREATE TABLE table_69062 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" text,
"Class" text,
"FCC info" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which class City of license of ferrum, virginia?
| SELECT "Class" FROM table_69062 WHERE "City of license" = 'ferrum, virginia' | wikisql |
CREATE TABLE table_name_59 (
points VARCHAR,
lost VARCHAR,
points_against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points did the club with 13 losses and 461 points against have?
| SELECT points FROM table_name_59 WHERE lost = "13" AND points_against = "461" | sql_create_context |
CREATE TABLE table_201_14 (
id number,
"crossing" text,
"carries" text,
"location" text,
"coordinates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many crossings are in maryland ?
| SELECT COUNT("crossing") FROM table_201_14 WHERE "location" = 'maryland' | squall |
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
... | 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 CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_na... | atis |
CREATE TABLE table_55849 (
"Presidency" real,
"President" text,
"Date of Birth" text,
"Took office" real,
"Left office" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Took Office Date of the Presidency that Left Office Incumbent?
| SELECT SUM("Took office") FROM table_55849 WHERE "Left office" = 'incumbent' | wikisql |
CREATE TABLE table_71232 (
"Capital" text,
"Prefecture" text,
"Region" text,
"Island" text,
"Pop. \u00b9" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the highest pop for tottori
| SELECT MAX("Pop. \u00b9") FROM table_71232 WHERE "Prefecture" = 'tottori' | wikisql |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDa... | WITH tmp AS (SELECT p.AnswerCount AS ACount, Period = CASE @Frequency WHEN 1 THEN TIME_TO_STR(bs.CreationDate, '%h') WHEN 2 THEN TIME_TO_STR(bs.CreationDate, '%W') WHEN 3 THEN ROUND((CAST(TIME_TO_STR(bs.CreationDate, '%W') AS FLOAT) + CAST(TIME_TO_STR(bs.CreationDate, '%h') AS FLOAT) / 24), 2) END FROM Posts AS p INNER... | sede |
CREATE TABLE table_29116 (
"Event" text,
"Start Date" text,
"Finish Date" text,
"Start" text,
"Finish" text,
"Distance" text,
"Abu Dhabi" text,
"Camper" real,
"Groupama" real,
"Puma" text,
"Sanya" text,
"Telef\u00f3nica" real
)
-- Using valid SQLite, answer the followin... | SELECT COUNT("Sanya") FROM table_29116 WHERE "Distance" = 'Abu Dhabi' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.