instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE i... | 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 = '011-55642'... | eicu |
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimme... | SELECT name, ID FROM swimmer ORDER BY name | nvbench |
CREATE TABLE table_15941 (
"Season" real,
"Timeslot ( ET )" text,
"Season premiere" text,
"Season finale" text,
"TV season" text,
"Rank" text,
"Viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the season year where ... | SELECT "TV season" FROM table_15941 WHERE "Rank" = '39' | wikisql |
CREATE TABLE table_name_55 (
fiscal_year INTEGER,
headquarters VARCHAR,
employees VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Fiscal Year of the firm Headquartered in noida, with less than 85,335 employees?
| SELECT AVG(fiscal_year) FROM table_name_55 WHERE headquarters = "noida" AND employees < 85 OFFSET 335 | sql_create_context |
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real
)
CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int... | SELECT Country, COUNT(Country) FROM artist GROUP BY Country | nvbench |
CREATE TABLE table_78850 (
"Main contestant" text,
"Co-contestant (Yaar vs. Pyaar)" text,
"Date performed" text,
"Scores by each individual judge" text,
"Total score/week" text,
"Position" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided a... | SELECT "Main contestant" FROM table_78850 WHERE "Scores by each individual judge" = '8 + 7 + 7 = 21' | wikisql |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE" AND diagnoses.short_title = "Portal hypertension" | mimicsql_data |
CREATE TABLE team (
Team_id int,
Name text
)
CREATE TABLE match_season (
Season real,
Player text,
Position text,
Country int,
Team int,
Draft_Pick_Number int,
Draft_Class text,
College text
)
CREATE TABLE player (
Player_ID int,
Player text,
Years_Played text,
... | SELECT Years_Played, COUNT(Years_Played) FROM player GROUP BY Years_Played ORDER BY COUNT(Years_Played) DESC | nvbench |
CREATE TABLE table_54229 (
"Year" real,
"Date" text,
"Winner" text,
"Result" text,
"Loser" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the loser at Municipal Stadium after 1970?
| SELECT "Loser" FROM table_54229 WHERE "Location" = 'municipal stadium' AND "Year" > '1970' | wikisql |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Manufacturer DESC | nvbench |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2170" AND procedures.icd9_code = "8854" | mimicsql_data |
CREATE TABLE table_name_50 (
attendance VARCHAR,
visitor VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number in attendance for when the bulls visited
| SELECT COUNT(attendance) FROM table_name_50 WHERE visitor = "bulls" | sql_create_context |
CREATE TABLE table_61692 (
"Date From" text,
"Date To" text,
"Position" text,
"Name" text,
"From" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the date for Watford and player Lionel Ainsworth?
| SELECT "Date To" FROM table_61692 WHERE "From" = 'watford' AND "Name" = 'lionel ainsworth' | wikisql |
CREATE TABLE table_dev_60 (
"id" int,
"systolic_blood_pressure_sbp" int,
"body_weight" float,
"renal_disease" bool,
"allergy_to_aspirin" bool,
"creatinine_clearance_cl" float,
"allergy_to_clopidogrel" bool,
"allergy_to_heparin" bool,
"platelet_count" float,
"thrombocytopenia" flo... | SELECT * FROM table_dev_60 WHERE allergy_to_fibrinolytics = 1 OR allergy_to_aspirin = 1 OR allergy_to_heparin = 1 OR allergy_to_clopidogrel = 1 | criteria2sql |
CREATE TABLE table_44387 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Attendance" real,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Record has a Visitor of pittsburgh, and a Score of 4 0?
| SELECT "Record" FROM table_44387 WHERE "Visitor" = 'pittsburgh' AND "Score" = '4–0' | wikisql |
CREATE TABLE table_29067 (
"Date" text,
"Time" text,
"Visiting team" text,
"Home team" text,
"Site" text,
"Broadcast" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home team where the San Jo... | SELECT "Home team" FROM table_29067 WHERE "Visiting team" = 'San Jose State' | wikisql |
CREATE TABLE table_name_24 (
round VARCHAR,
margin VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which round has a margin of 178?
| SELECT round FROM table_name_24 WHERE margin = "178" | sql_create_context |
CREATE TABLE table_65195 (
"Rank" text,
"Country" text,
"Jerseys" real,
"Giro wins" real,
"Points" real,
"Young rider" real,
"Most recent cyclist" text,
"Most recent date" text,
"Different holders" real
)
-- Using valid SQLite, answer the following questions for the tables provided... | SELECT SUM("Giro wins") FROM table_65195 WHERE "Jerseys" = '2' AND "Country" = 'portugal' AND "Young rider" > '0' | wikisql |
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
-- Using valid SQLite, answer the following questions for the... | SELECT Price, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 | nvbench |
CREATE TABLE table_name_78 (
lner_class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 1914 NER class with a d17/2 LNER class?
| SELECT 1914 AS _ner_class FROM table_name_78 WHERE lner_class = "d17/2" | sql_create_context |
CREATE TABLE table_10815 (
"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.
-- In the venue Corio Oval, who was the away team?
| SELECT "Away team" FROM table_10815 WHERE "Venue" = 'corio oval' | wikisql |
CREATE TABLE table_37583 (
"Pick" real,
"Player" text,
"Team" text,
"Position" text,
"School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Pick for the Pasco, Wa school?
| SELECT AVG("Pick") FROM table_37583 WHERE "School" = 'pasco, wa' | wikisql |
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(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY AVG(Price) DESC | nvbench |
CREATE TABLE table_3826 (
"Season" text,
"Competition" text,
"Stage" text,
"Result" text,
"Opponent" text,
"Scorers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result of the game where the opponent is Innsbrucker Kilmarnock CSK V... | SELECT "Result" FROM table_3826 WHERE "Opponent" = 'Innsbrucker Kilmarnock CSK VVS Samara' | wikisql |
CREATE TABLE table_15731 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date did they have a record of 12-17?
| SELECT "Date" FROM table_15731 WHERE "Record" = '12-17' | wikisql |
CREATE TABLE table_name_2 (
laps VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the total number of Laps for the rider whose time was +7.951?
| SELECT COUNT(laps) FROM table_name_2 WHERE time = "+7.951" | sql_create_context |
CREATE TABLE table_41565 (
"Rank" real,
"Name" text,
"Team" text,
"Games" real,
"Assists" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has the fewest assists and played 2 games or fewer?
| SELECT MIN("Assists") FROM table_41565 WHERE "Games" < '2' | wikisql |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
v... | SELECT d_icd_diagnoses.long_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'periph t cell lym abdom' UNION SELECT d_icd_procedures.long_title FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'periph t cell lym abdom' | mimic_iii |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT Id, DisplayName AS "display_name", Reputation, WebsiteUrl AS Website, Location FROM Users WHERE Location LIKE '%Nigeria%' ORDER BY Reputation DESC LIMIT 100 | sede |
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 jybgb.KSBM, jybgb.KSMC FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZ... | css |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jybgb.BGDH 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 = '鲁嘉歆' AND jybg... | css |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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,
C... | SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '5633728' AND t_kc21.MED_ORG_DEPT_NM = '检验科') AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-04-22' AND '2014-02-02' | css |
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 t_kc21.MED_CLINIC_ID FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '褚力言' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-12-21' AND '2015-08-04' | css |
CREATE TABLE table_5833 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the game that led to a 7-5 record?
| SELECT "Score" FROM table_5833 WHERE "Record" = '7-5' | wikisql |
CREATE TABLE table_name_53 (
chassis VARCHAR,
year VARCHAR,
pts VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which chassis is more recent than 1972 and has more than 0 Pts. ?
| SELECT chassis FROM table_name_53 WHERE year > 1972 AND pts > 0 | sql_create_context |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZ... | SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJ... | css |
CREATE TABLE table_name_85 (
venue VARCHAR,
score VARCHAR,
h_a_n VARCHAR,
pos VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which venue has a neutral H/A/N, lower than position 3 and a score of 141?
| SELECT venue FROM table_name_85 WHERE h_a_n = "neutral" AND pos < 3 AND score = "141" | sql_create_context |
CREATE TABLE table_46082 (
"Name" text,
"Born-Died" text,
"Term start" text,
"Term end" text,
"Political Party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Born-Died, when Term End is 19 January 1943?
| SELECT "Born-Died" FROM table_46082 WHERE "Term end" = '19 january 1943' | wikisql |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
... | SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_i... | advising |
CREATE TABLE table_5577 (
"Game" real,
"October" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total Points for the Opponent of @ New Jersey Devils and a Game bigger than ... | SELECT SUM("Points") FROM table_5577 WHERE "Opponent" = '@ new jersey devils' AND "Game" > '7' | wikisql |
CREATE TABLE table_19753079_36 (
result VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the result for north carolina 7
| SELECT result FROM table_19753079_36 WHERE district = "North Carolina 7" | sql_create_context |
CREATE TABLE table_41684 (
"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 "Tries For" FROM table_41684 WHERE "Try Bonus" = '0' | wikisql |
CREATE TABLE list (
classroom VARCHAR,
grade VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which classrooms are used by grade 4?
| SELECT DISTINCT classroom FROM list WHERE grade = 4 | sql_create_context |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT (SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '韦嘉泽' AND mzjzjlb.JZKSRQ BETWEEN '2003-03-16' AND '2012-01-12') + (SELECT COUNT(*) FROM person_info J... | css |
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 WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA" AND demographic.dod_year <= "2115.0" | mimicsql_data |
CREATE TABLE table_76011 (
"Publication" text,
"Country" text,
"Accolade" text,
"Year" real,
"Rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which year's rank was #4 when the country was the US?
| SELECT "Year" FROM table_76011 WHERE "Rank" = '#4' AND "Country" = 'us' | wikisql |
CREATE TABLE table_43604 (
"Outcome" text,
"Date" text,
"Championship" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the score on 22 february 1993?
| SELECT "Score" FROM table_43604 WHERE "Date" = '22 february 1993' | 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 zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC 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 = '32686638' | css |
CREATE TABLE table_70393 (
"Overall place" text,
"Yacht name" text,
"Skipper" text,
"Points" text,
"Combined elapsed time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Overall place has a Yacht name of lg flatron?
| SELECT "Overall place" FROM table_70393 WHERE "Yacht name" = 'lg flatron' | wikisql |
CREATE TABLE table_name_16 (
total INTEGER,
to_par VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum total when the To par is +3?
| SELECT MAX(total) FROM table_name_16 WHERE to_par = "+3" | sql_create_context |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name DESC | nvbench |
CREATE TABLE table_33255 (
"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 team plays at home at Windy Hill?
| SELECT "Home team" FROM table_33255 WHERE "Venue" = 'windy hill' | wikisql |
CREATE TABLE table_1130632_1 (
title VARCHAR,
us_viewers__million_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the title that have 19.48 million u.s. viewers?
| SELECT title FROM table_1130632_1 WHERE us_viewers__million_ = "19.48" | sql_create_context |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
... | SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8016)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [diast... | mimic_iii |
CREATE TABLE table_75922 (
"Season" text,
"Competition" text,
"Round" text,
"Opponent" text,
"Home" text,
"Away" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home score with marek dupnitsa as opponent?
| SELECT "Home" FROM table_75922 WHERE "Opponent" = 'marek dupnitsa' | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicaid" AND diagnoses.long_title = "Congestive heart failure, unspecified" | 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.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_CD, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '1511465' GROUP BY gwyjzb.MED_ORG_DEPT_CD, gwyjzb.IN_DIAG_DIS_CD UNION SELECT fgwyjzb.MED_ORG_DEPT_CD, fgwyjzb.IN_DIAG_DIS_CD, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '15114... | css |
CREATE TABLE table_12476 (
"State" text,
"Type" text,
"Name" text,
"Title" text,
"Royal house" text,
"From" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which state has a royal house of Jiang?
| SELECT "State" FROM table_12476 WHERE "Royal house" = 'jiang' | wikisql |
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE dataset (
datasetid int,
datasetname va... | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Artificial Neural Network' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid | scholar |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
d... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', prescriptions.startdate)) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 96833 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'acetazolamide sodium' ORDER BY prescriptions... | mimic_iii |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE comment_instructor (
instructor_id int... | SELECT DISTINCT advisory_requirement FROM course WHERE department = 'INSTHUM' AND number = 212 | advising |
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 HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(EMPLOYEE_ID) DESC | 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 (SELECT zyjybgb.KSBM FROM mzjzjlb JOIN zyjybgb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '0002177' AND zyjybgb.BGRQ BETWEEN '2002-06-17' AND '2007-12-06' GROUP BY zyjybgb.KSBM HAVING COUNT(*) < 23 UNION SELECT mzjybgb.KSBM FROM mzjzj... | css |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.icd9_code = "25040" | mimicsql_data |
CREATE TABLE table_204_813 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- where was the location of the last venue held ?
| SELECT "venue" FROM table_204_813 ORDER BY "year" DESC LIMIT 1 | squall |
CREATE TABLE table_6924 (
"Office" text,
"Democratic ticket" text,
"Republican ticket" text,
"Conservative ticket" text,
"Liberal ticket" text,
"Free Libertarian ticket" text,
"Socialist Labor ticket" text
)
-- Using valid SQLite, answer the following questions for the tables provided abov... | SELECT "Liberal ticket" FROM table_6924 WHERE "Free Libertarian ticket" = 'robert s. flanzer' | wikisql |
CREATE TABLE table_67019 (
"Rank" text,
"Games" text,
"Player" text,
"Club" text,
"Career span" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rank that shows 426 games?
| SELECT "Rank" FROM table_67019 WHERE "Games" = '426' | wikisql |
CREATE TABLE table_27776266_1 (
directed_by VARCHAR,
us_viewers__million_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who directed the episode with an audience of 14.11 million?
| SELECT directed_by FROM table_27776266_1 WHERE us_viewers__million_ = "14.11" | sql_create_context |
CREATE TABLE wdmzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH number,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZ... | SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.... | 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, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road DESC | nvbench |
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 SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '57925867491' GROUP BY SOC_SRT_DIRE_CD ORDER BY SUM(SELF_PAY_AMO) DESC LIMIT 1 | css |
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE keyphrase (
keyphraseid int,
keyphrasename varchar
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE paperfield (
fieldid int,
... | SELECT DISTINCT paper.year, writes.paperid FROM author, paper, writes WHERE author.authorname LIKE 'Michael Armstrong' AND paper.year LIKE '199' AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | scholar |
CREATE TABLE Participates_in (
stuid INTEGER,
actid INTEGER
)
CREATE TABLE Faculty_Participates_in (
FacID INTEGER,
actid INTEGER
)
CREATE TABLE Activity (
actid INTEGER,
activity_name varchar(25)
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
Fname VARCHAR(15),
Ra... | SELECT activity_name, COUNT(*) FROM Activity AS T1 JOIN Faculty_Participates_in AS T2 ON T1.actid = T2.actid GROUP BY T1.actid ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_name_54 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is 2007, when 2003 is 1R?
| SELECT 2007 FROM table_name_54 WHERE 2003 = "1r" | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2124" AND procedures.long_title = "Percutaneous [endoscopic] gastrostomy [PEG]" | mimicsql_data |
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Lauren Sarringhaus%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructo... | advising |
CREATE TABLE table_486 (
"Season #" real,
"Series #" real,
"Title" text,
"Canadian airdate" text,
"U.S. airdate" text,
"Production code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the minimum production code
| SELECT MIN("Production code") FROM table_486 | 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 jyjgzbb (
BGDH text,
BGRQ tim... | 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.JZZDSM = '慢性牙周炎' AND jyjgzbb.JCZBMC = '... | css |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "309" | mimicsql_data |
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 * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0795185' AND t_kc21.IN_HOSP_DATE BETWEEN '2005-08-27' AND '2019-02-22' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0795185' AND t_kc21.IN_HOSP_DATE BETWEEN '2005-08-27' AND '2019-02-22' AND t_kc21.IN_DIAG_DIS_CD = t_kc21.OUT_DIAG_DIS_CD | css |
CREATE TABLE match (
Round real,
Location text,
Country text,
Date text,
Fastest_Qualifying text,
Winning_Pilot text,
Winning_Aircraft text
)
CREATE TABLE airport (
Airport_ID int,
Airport_Name text,
Total_Passengers real,
%_Change_2007 text,
International_Passengers rea... | SELECT Aircraft, COUNT(*) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_34390 (
"Game" real,
"April" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest value in April with New York Rangers as opponent for a game less than ... | SELECT MIN("April") FROM table_34390 WHERE "Opponent" = 'new york rangers' AND "Game" < '82' | wikisql |
CREATE TABLE table_name_14 (
rank VARCHAR,
total VARCHAR,
gold VARCHAR,
nation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many ranks have 0 golds, a Nation of namibia, and a Total smaller than 1?
| SELECT COUNT(rank) FROM table_name_14 WHERE gold = 0 AND nation = "namibia" AND total < 1 | sql_create_context |
CREATE TABLE table_27502 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What episode number in the series is 'tough love'?
| SELECT MAX("No. in series") FROM table_27502 WHERE "Title" = 'Tough Love' | wikisql |
CREATE TABLE table_24639086_3 (
viewers__in_millions_ VARCHAR,
series__number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the amount of viewers if the series number is 14?
| SELECT viewers__in_millions_ FROM table_24639086_3 WHERE series__number = 14 | sql_create_context |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
... | SELECT MONTH(CreationDate), PostTypeId, COUNT(Id) FROM Posts WHERE YEAR(CreationDate) = '##Year##' AND PostTypeId <= 2 AND Score <= 0 GROUP BY MONTH(CreationDate), PostTypeId ORDER BY MONTH(CreationDate) | sede |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
... | SELECT meter_700, ID FROM swimmer | nvbench |
CREATE TABLE table_59552 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Laps, when Bike is 'Yamaha YZF-R1', when Rider is 'David Checa', and when Grid is greater than ... | SELECT MAX("Laps") FROM table_59552 WHERE "Bike" = 'yamaha yzf-r1' AND "Rider" = 'david checa' AND "Grid" > '18' | wikisql |
CREATE TABLE table_24600706_1 (
released INTEGER,
song VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the most released for apologize
| SELECT MAX(released) FROM table_24600706_1 WHERE song = "Apologize" | sql_create_context |
CREATE TABLE table_45247 (
"Name" text,
"Pinnacle height" text,
"Structure type" text,
"Main use" text,
"Country" text,
"Town" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country has the SBA Towers Tower Hayneville?
| SELECT "Country" FROM table_45247 WHERE "Name" = 'sba towers tower hayneville' | wikisql |
CREATE TABLE table_name_44 (
score VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Score has a Away team of walthamstow avenue?
| SELECT score FROM table_name_44 WHERE away_team = "walthamstow avenue" | sql_create_context |
CREATE TABLE table_78294 (
"Pick" real,
"Round" text,
"Player" text,
"Position" text,
"School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Round is pick 112 in?
| SELECT "Round" FROM table_78294 WHERE "Pick" = '112' | wikisql |
CREATE TABLE table_1604579_2 (
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How economically free is the country of Armenia?
| SELECT 2013 AS _index_of_economic_freedom FROM table_1604579_2 WHERE country = "Armenia" | sql_create_context |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-21509') AND NOT patient.admissionheight IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1 | eicu |
CREATE TABLE table_35963 (
"Team" text,
"Copa Libertadores 1993" text,
"Supercopa Sudamericana 1993" text,
"Copa CONMEBOL 1993" text,
"Recopa Sudamericana 1993" text,
"Intercontinental Cup 1993" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wha... | SELECT "Intercontinental Cup 1993" FROM table_35963 WHERE "Supercopa Sudamericana 1993" = 'round of 16' | wikisql |
CREATE TABLE table_21192 (
"Months in Malayalam Era" text,
"In Malayalam" text,
"Gregorian Calendar" text,
"Tamil calendar" text,
"Saka era" text,
"Sign of Zodiac" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the saka era for sign of zodi... | SELECT "Saka era" FROM table_21192 WHERE "Sign of Zodiac" = 'Pisces' | wikisql |
CREATE TABLE table_19683 (
"Position" real,
"Team" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Scored" real,
"Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games were played?
| SELECT MIN("Played") FROM table_19683 | wikisql |
CREATE TABLE table_1108394_6 (
staten_island VARCHAR,
brooklyn VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was Staten Island when Brooklyn was 940?
| SELECT staten_island FROM table_1108394_6 WHERE brooklyn = "940" | sql_create_context |
CREATE TABLE table_name_93 (
built VARCHAR,
builder VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was Stephenson the builder?
| SELECT built FROM table_name_93 WHERE builder = "stephenson" | sql_create_context |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
U... | SELECT COUNT(*) FROM Posts WHERE DeletionDate IS NULL AND Score <= -1 AND (Tags LIKE '%minecraft-%%' OR Tags LIKE '%minecraft%') AND (ClosedDate IS NULL OR NOT ClosedDate IS NULL) | sede |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.