instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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 qtb.IN_HOSP_DAYS FROM qtb WHERE qtb.MED_CLINIC_ID = '84892309667' UNION SELECT gyb.IN_HOSP_DAYS FROM gyb WHERE gyb.MED_CLINIC_ID = '84892309667' UNION SELECT zyb.IN_HOSP_DAYS FROM zyb WHERE zyb.MED_CLINIC_ID = '84892309667' UNION SELECT mzb.IN_HOSP_DAYS FROM mzb WHERE mzb.MED_CLINIC_ID = '84892309667' | 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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Iron defic anemia NOS" AND prescriptions.drug_type = "ADDITIVE" | mimicsql_data |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb 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 = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE person_i... | css |
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 diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "72" AND diagnoses.short_title = "Stevens-Johnson-TEN syn" | mimicsql_data |
CREATE TABLE table_name_61 (
games INTEGER,
gold VARCHAR,
first VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games are associated with over 0 golds and a first year before 2008?
| SELECT SUM(games) FROM table_name_61 WHERE gold > 0 AND first < 2008 | sql_create_context |
CREATE TABLE table_33324 (
"Country" text,
"Area (km\u00b2) 2010" text,
"Population 2011" text,
"GDP (PPP) ( Intl. $ ) 2011" text,
"GDP (PPP) per capita ( Intl. $ ) 2011" text,
"Income inequality 1994\u20132011 (latest available)" text,
"HDI 2011" text,
"FSI 2012" text,
"CPI 2011" te... | SELECT "IEF 2011" FROM table_33324 WHERE "FSI 2012" = '99.2' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE 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 WHERE demographic.diagnosis = "PNEUMONIA" AND demographic.admityear < "2172" | mimicsql_data |
CREATE TABLE table_22673956_1 (
rnd INTEGER,
race_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Daily Empress Indy Silverstone took place on which round?
| SELECT MAX(rnd) FROM table_22673956_1 WHERE race_name = "Daily Empress Indy Silverstone" | sql_create_context |
CREATE TABLE table_204_314 (
id number,
"pos" number,
"team" text,
"played" number,
"won" number,
"draw" number,
"lost" number,
"goals for" number,
"goals against" number,
"goal difference" number,
"points" number,
"notes" text
)
-- Using valid SQLite, answer the follow... | SELECT "team" FROM table_204_314 ORDER BY "won" / "lost" DESC LIMIT 1 | squall |
CREATE TABLE table_37237 (
"Round" real,
"Date" text,
"Grand Prix" text,
"Circuit" text,
"125cc winner" text,
"250cc winner" text,
"MotoGP winner" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Round is the lowest on... | SELECT MIN("Round") FROM table_37237 WHERE "Circuit" = 'donington' | wikisql |
CREATE TABLE zyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '苗英光' AND qtb.IN_HOSP_DATE BETWEEN '2006-11-01' AND '2016-12-31' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.Q... | css |
CREATE TABLE table_76108 (
"Model number" text,
"Frequency" text,
"L2 cache" text,
"FPU width" text,
"Multi 1" text,
"Socket" text,
"Release date" text,
"Order part number" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the L2 ca... | SELECT "L2 cache" FROM table_76108 WHERE "Multi 1" = '13.5x' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.formulary_drug_cd = "BAG" | mimicsql_data |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE prescriptio... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5520) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'potassium') AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURREN... | mimic_iii |
CREATE TABLE table_77323 (
"Season" text,
"Skip" text,
"Third" text,
"Second" text,
"Lead" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which season has Zach Jacobson in third?
| SELECT "Season" FROM table_77323 WHERE "Third" = 'zach jacobson' | wikisql |
CREATE TABLE table_name_92 (
date VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date has a Score of 4 6, 2 6?
| SELECT date FROM table_name_92 WHERE score = "4–6, 2–6" | sql_create_context |
CREATE TABLE table_22778 (
"Name" text,
"Home or representative town or province" text,
"Age" real,
"Edition" text,
"Total days in PBB House" real,
"Duration" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When davao city is t... | SELECT COUNT("Age") FROM table_22778 WHERE "Edition" = 'Clash 2010' AND "Home or representative town or province" = 'Davao City' | wikisql |
CREATE TABLE table_name_1 (
venue VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Venue of the Competition with a Score of 0 2?
| SELECT venue FROM table_name_1 WHERE score = "0–2" | sql_create_context |
CREATE TABLE table_204_511 (
id number,
"number" number,
"driver" text,
"entrant" text,
"chassis" text,
"engine" text,
"tyre" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- did jimmy bryan or jack fairman have a d tyre ?
| SELECT "driver" FROM table_204_511 WHERE "driver" IN ('jimmy bryan', 'jack fairman') AND "tyre" = 'd' | squall |
CREATE TABLE party (
party_id number,
minister text,
took_office text,
left_office text,
region_id number,
party_name text
)
CREATE TABLE party_events (
event_id number,
event_name text,
party_id number,
member_in_charge_id number
)
CREATE TABLE region (
region_id number,
... | SELECT T1.party_name, T2.region_name FROM party AS T1 JOIN region AS T2 ON T1.region_id = T2.region_id | spider |
CREATE TABLE table_25815 (
"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.
-- Where ... | SELECT "Location Attendance" FROM table_25815 WHERE "Game" = '55' | wikisql |
CREATE TABLE table_name_69 (
election INTEGER,
municipality VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is livorno's average election?
| SELECT AVG(election) FROM table_name_69 WHERE municipality = "livorno" | sql_create_context |
CREATE TABLE table_name_11 (
name VARCHAR,
points VARCHAR,
games VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Name, when Games are less than 38, when Rank is less than 4, and when Points are 357?
| SELECT name FROM table_name_11 WHERE games < 38 AND rank < 4 AND points = 357 | sql_create_context |
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_ORG_DEPT_NM, IN_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '3385540' GROUP BY MED_ORG_DEPT_NM, IN_DIAG_DIS_NM HAVING AVG(PERSON_AGE) < 14 | css |
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time 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 WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTO... | atis |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
h... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', 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 = '027-82318'... | eicu |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "47" AND demographic.days_stay > "6" | mimicsql_data |
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 AVG(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_AGE <= 19) | css |
CREATE TABLE table_1974482_1 (
location VARCHAR,
nickname VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the location of statesmen
| SELECT location FROM table_1974482_1 WHERE nickname = "Statesmen" | sql_create_context |
CREATE TABLE table_name_17 (
record VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What record occurred on April 3?
| SELECT record FROM table_name_17 WHERE date = "april 3" | sql_create_context |
CREATE TABLE table_63013 (
"Sunrayia FL" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of losses for teams with more than 0 byes?
| SELECT COUNT("Losses") FROM table_63013 WHERE "Byes" > '0' | wikisql |
CREATE TABLE table_name_43 (
home VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home team that played on February 25?
| SELECT home FROM table_name_43 WHERE date = "february 25" | sql_create_context |
CREATE TABLE table_33183 (
"Positional or Automatic" text,
"Opponents" text,
"Suits" text,
"Material or Non-material" text,
"Count Rectified" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the designation of material or non-material for eith... | SELECT "Material or Non-material" FROM table_33183 WHERE "Positional or Automatic" = 'either' AND "Count Rectified" = 'no' AND "Opponents" = 'either' | wikisql |
CREATE TABLE table_70655 (
"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.
-- What is the team 1 with a (g14)morolo team 2?
| SELECT "Team 1" FROM table_70655 WHERE "Team 2" = '(g14)morolo' | wikisql |
CREATE TABLE table_963 (
"IN No." real,
"County Name" text,
"Establishment Date (SW Indiana) (History) (Statehood)" text,
"County Seat" text,
"Time Zone" text,
"Population (2010) (Rank)" text,
"Area sq mi (km 2 ) (Rank)" text,
"Twps" real,
"ZIP code Prefix(es)" text,
"% of Bounda... | SELECT "Population (2010) (Rank)" FROM table_963 WHERE "Area sq mi (km 2 ) (Rank)" = 'sqmi (km2) (5)' | wikisql |
CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
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 TE... | SELECT Winery, COUNT(Winery) FROM wine WHERE Price > 100 GROUP BY Grape, Winery ORDER BY Winery DESC | nvbench |
CREATE TABLE table_49936 (
"Method of administration[ citation needed ]" text,
"Category 1" real,
"Category 2" real,
"Category 3" text,
"Category 4" text,
"Category 5" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the sum of all values i... | SELECT SUM("Category 1") FROM table_49936 WHERE "Category 3" = '300' | wikisql |
CREATE TABLE table_14029 (
"Pick" real,
"Team" text,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the College of the Halfback Player?
| SELECT "College" FROM table_14029 WHERE "Position" = 'halfback' | wikisql |
CREATE TABLE table_name_17 (
area VARCHAR,
roll VARCHAR,
authority VARCHAR,
gender VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the area of the coed school with a state authority and a roll number of 122?
| SELECT area FROM table_name_17 WHERE authority = "state" AND gender = "coed" AND roll = 122 | sql_create_context |
CREATE TABLE table_37338 (
"Track" text,
"City" text,
"State" text,
"Opened" text,
"Major Series" text,
"Turns" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the track located that opened in 1992?
| SELECT "Track" FROM table_37338 WHERE "Opened" = '1992' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
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 n... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... | mimic_iii |
CREATE TABLE table_52490 (
"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 date was the game played at princes park?
| SELECT "Date" FROM table_52490 WHERE "Venue" = 'princes park' | wikisql |
CREATE TABLE table_11179 (
"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 there a crowd larger than 23,000?
| SELECT "Date" FROM table_11179 WHERE "Crowd" > '23,000' | wikisql |
CREATE TABLE table_name_98 (
state VARCHAR,
elected_assumed_office VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What state had an elected/assumed office in 2013?
| SELECT state FROM table_name_98 WHERE elected_assumed_office = 2013 | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE intakeoutput (
... | 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 = '007-11182')) AND medication.drugname = 'potassium chloride 40 meq inj' AND STR... | eicu |
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId ... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%coimbatore%' OR UPPER(Location) LIKE '%COIMBATORE%' OR Location LIKE '%Karur%' ORDER BY Reputation DESC LIMIT 10 | sede |
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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT diagnoses_icd.icd9_code FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 25312) AND DATETIME(diagnoses_icd.charttime, 'start of year') = DATETIME(C... | mimic_iii |
CREATE TABLE table_601 (
"No" real,
"Player" text,
"Height" text,
"Position" text,
"Year born" real,
"Current Club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What club does the player who is 1.97 m tall play for?
| SELECT "Current Club" FROM table_601 WHERE "Height" = '1.97' | wikisql |
CREATE TABLE table_44391 (
"Date" text,
"at/vs." text,
"Opponent'" text,
"Score'" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the attendance sum of the game on March 16, 1990 with a loss record?
| SELECT SUM("Attendance") FROM table_44391 WHERE "Record" = 'loss' AND "Date" = 'march 16, 1990' | wikisql |
CREATE TABLE table_59146 (
"Event" text,
"Time" text,
"Swimmer" text,
"School" text,
"Year" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Year, when Time is '1:47.55'?
| SELECT "Year" FROM table_59146 WHERE "Time" = '1:47.55' | wikisql |
CREATE TABLE table_24912693_4 (
steals INTEGER,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Tiffani Johnson's maximum steals?
| SELECT MAX(steals) FROM table_24912693_4 WHERE player = "Tiffani Johnson" | sql_create_context |
CREATE TABLE table_name_71 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 1957 number when the 1955 is smaller than 0.63, and 1952 is larger than 0.22?
| SELECT COUNT(1957) FROM table_name_71 WHERE 1955 < 0.63 AND 1952 > 0.22 | 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_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '32023982' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 3281.11) | css |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Games, All_Games_Percent FROM basketball_match ORDER BY All_Games | nvbench |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid ... | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 3 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI... | eicu |
CREATE TABLE table_name_68 (
date VARCHAR,
outcome VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Date, when Outcome is Winner, and when Opponent is An-Sophie Mestach?
| SELECT date FROM table_name_68 WHERE outcome = "winner" AND opponent = "an-sophie mestach" | sql_create_context |
CREATE TABLE table_name_75 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 1993 value with a 1r in 1991 and sf in 1990?
| SELECT 1993 FROM table_name_75 WHERE 1991 = "1r" AND 1990 = "sf" | sql_create_context |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dob_year < "2089" AND diagnoses.short_title = "Chr pulmon heart dis NEC" | mimicsql_data |
CREATE TABLE table_name_30 (
place VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the place with the 68 score?
| SELECT place FROM table_name_30 WHERE score = 68 | sql_create_context |
CREATE TABLE code_description (
code varchar,
description 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 int,
fligh... | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANT... | atis |
CREATE TABLE table_27220 (
"Round" text,
"Opposition" text,
"Time" text,
"Date" text,
"Home/Away" text,
"Venue" text,
"Score" text,
"Result/Margin" text,
"Broadcaster" text,
"TV" text,
"Ladder Position" text
)
-- Using valid SQLite, answer the following questions for the ta... | SELECT "Ladder Position" FROM table_27220 WHERE "Score" = '15.9 (99)–14.6 (90)' | wikisql |
CREATE TABLE table_name_35 (
order_of_succession VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the highest 2007 budget when the order of succession was 3?
| SELECT MAX(2007 AS _budget_in_billions_of_dollars) FROM table_name_35 WHERE order_of_succession = "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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "4" AND prescriptions.formulary_drug_cd = "CITA20" | mimicsql_data |
CREATE TABLE table_19798 (
"Rank" real,
"Country" text,
"Miss Universe" real,
"1st Runner-up" real,
"2nd Runner-up" real,
"3rd Runner-up" real,
"4th Runner-up" real,
"Semifinalists" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT MIN("Rank") FROM table_19798 WHERE "Country" = 'Puerto Rico' | wikisql |
CREATE TABLE table_11691 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which tournament has raffaella reggi listed as the oppon... | SELECT "Tournament" FROM table_11691 WHERE "Opponent in the final" = 'raffaella reggi' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE 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 WHERE demographic.diagnosis = "GUILLAIN BARRE SYNDROME" AND demographic.dod_year <= "2138.0" | mimicsql_data |
CREATE TABLE table_21316 (
"Game" real,
"Date" text,
"Opponent" 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.
-- Na... | SELECT "Date" FROM table_21316 WHERE "Score" = 'W 83-69' | wikisql |
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 jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_... | css |
CREATE TABLE table_204_628 (
id number,
"trial number" text,
"date" text,
"name of trial" text,
"celebrity/ies taking part" text,
"winner/number of stars" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the last name of ... | SELECT "name of trial" FROM table_204_628 ORDER BY id DESC LIMIT 1 | squall |
CREATE TABLE table_name_83 (
injured INTEGER,
place VARCHAR,
killed VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the least amount of injuries in Dantewada, Chhattisgarh when 8 people were killed?
| SELECT MIN(injured) FROM table_name_83 WHERE place = "dantewada, chhattisgarh" AND killed = 8 | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.discharge_location = "DEAD/EXPIRED" | mimicsql_data |
CREATE TABLE table_14711 (
"Name" text,
"Line" text,
"Location" text,
"Closed" text,
"Current Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the station in Toolamba that is currently demolished?
| SELECT "Name" FROM table_14711 WHERE "Current Status" = 'demolished' AND "Location" = 'toolamba' | 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 hz_info (
KH text,
KLX number... | SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AN... | css |
CREATE TABLE city (
city_id number,
city text,
country_id number,
last_update time
)
CREATE TABLE actor (
actor_id number,
first_name text,
last_name text,
last_update time
)
CREATE TABLE inventory (
inventory_id number,
film_id number,
store_id number,
last_update time... | SELECT payment_date FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' | spider |
CREATE TABLE Apartment_Bookings (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many apartment bookings are there in total?
| SELECT COUNT(*) FROM Apartment_Bookings | sql_create_context |
CREATE TABLE table_37891 (
"Date" text,
"Round" text,
"Opponents" text,
"H / A" text,
"Result F \u2013 A" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which opponent made it to the final round?
| SELECT "Opponents" FROM table_37891 WHERE "Round" = 'final' | wikisql |
CREATE TABLE table_66860 (
"Year" real,
"Date" text,
"Title" text,
"Format(s)" text,
"Award description(s)" text,
"Result(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the award description with Format album?
| SELECT "Award description(s)" FROM table_66860 WHERE "Format(s)" = 'album' | wikisql |
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TA... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((((flight.departure_time <= 2359 AND flight.departure_time >= 1800) AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year... | atis |
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 T2.Headquarter, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter | nvbench |
CREATE TABLE table_72892 (
"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.
-- Steve ... | SELECT COUNT("Team") FROM table_72892 WHERE "High points" = 'Steve Nash (24)' | wikisql |
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.MAIN_COND_DES FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '04273607781' UNION SELECT fgwyjzb.MAIN_COND_DES FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '04273607781' | css |
CREATE TABLE Elimination (
Elimination_ID text,
Wrestler_ID text,
Team text,
Eliminated_By text,
Elimination_Move text,
Time text
)
CREATE TABLE wrestler (
Wrestler_ID int,
Name text,
Reign text,
Days_held text,
Location text,
Event text
)
-- Using valid SQLite, answer... | SELECT Team, COUNT(Team) FROM Elimination GROUP BY Team ORDER BY Team DESC | nvbench |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
... | SELECT Id, DisplayName, (SELECT COUNT(*) FROM Posts WHERE Posts.PostTypeId = 1 AND Posts.OwnerUserId = Users.Id) AS AnswerCount FROM Users WHERE (SELECT COUNT(*) FROM Posts WHERE Posts.PostTypeId = 2 AND Posts.OwnerUserId = Users.Id) = 0 AND Reputation > 10000 ORDER BY Reputation DESC | sede |
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 class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE ... | 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 = 'PHOENIX' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILWAU... | atis |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeoutputid ... | SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'stress ulcer prophylaxis - pantoprazole' AND DATETIME(treatment.treatment... | eicu |
CREATE TABLE table_13295 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Scorers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the date when scorers is parkinson?
| SELECT "Date" FROM table_13295 WHERE "Scorers" = 'parkinson' | wikisql |
CREATE TABLE table_name_50 (
score VARCHAR,
player VARCHAR,
tries VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Player of jaco coetzee, and a Tries larger than 6 had what total number of score?
| SELECT COUNT(score) FROM table_name_50 WHERE player = "jaco coetzee" AND tries > 6 | sql_create_context |
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 class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE ... | 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 = 'PHIL... | atis |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
h... | SELECT COUNT(*) > 0 FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22449)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'tpn d12.... | mimic_iii |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE prescriptions (
... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_... | 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 SUM(t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.PERSON_NM = '严美丽' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2013-12-25' AND '2021-12-14' | css |
CREATE TABLE table_21858 (
"Episode" real,
"Original title" text,
"Directed by" text,
"Written by" text,
"Original airdate" text,
"Duration" text,
"Viewership" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total viewership where... | SELECT "Viewership" FROM table_21858 WHERE "Original title" = ' Your Cheating Art ' | wikisql |
CREATE TABLE table_name_53 (
episode VARCHAR,
segment_d VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many episodes have a segment d that is goalie masks (part 2)?
| SELECT COUNT(episode) FROM table_name_53 WHERE segment_d = "goalie masks (part 2)" | sql_create_context |
CREATE TABLE Tasks (
task_id INTEGER,
project_id INTEGER,
task_details VARCHAR(255),
"eg Agree Objectives" VARCHAR(1)
)
CREATE TABLE Document_Types (
document_type_code VARCHAR(10),
document_description VARCHAR(255)
)
CREATE TABLE Organisation_Types (
organisation_type VARCHAR(10),
org... | SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description ORDER BY COUNT(outcome_description) | nvbench |
CREATE TABLE nuclear_power_plants (
id text,
name text,
latitude text,
longitude text,
country text,
status text,
reactortype text,
reactormodel text,
constructionstartat text,
operationalfrom text,
operationalto text,
capacity text,
lastupdatedat text,
source tex... | SELECT country FROM nuclear_power_plants GROUP BY country ORDER BY COUNT(name) DESC LIMIT 1 | geonucleardata |
CREATE TABLE table_name_38 (
name VARCHAR,
tries VARCHAR,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was part of Club Munster with 1 try?
| SELECT name FROM table_name_38 WHERE tries = 1 AND club = "munster" | sql_create_context |
CREATE TABLE table_15784 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent at the game that had a loss of Harden (9-6)?
| SELECT "Opponent" FROM table_15784 WHERE "Loss" = 'harden (9-6)' | wikisql |
CREATE TABLE table_name_49 (
manufacturer VARCHAR,
grid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the manufacturer for the race on grid 12?
| SELECT manufacturer FROM table_name_49 WHERE grid = 12 | sql_create_context |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostHistory (
Id number,
Po... | SELECT p.Id AS "post_link", COUNT(c.Id) AS CommentCount, p.Score FROM Posts AS p INNER JOIN Comments AS c ON c.PostId = p.Id WHERE p.OwnerUserId = '##UserId##' GROUP BY p.Id, p.Score ORDER BY CommentCount DESC | sede |
CREATE TABLE table_50218 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" text,
"Competition" text,
"Man of the Match" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Result on the Date of 25th?
| SELECT "Result" FROM table_50218 WHERE "Date" = '25th' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.