instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
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 person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_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_ZYJZ... | css |
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 AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "GASTROINTESTINAL BLEED" | mimicsql_data |
CREATE TABLE table_56134 (
"Nation" text,
"Gold" text,
"Silver" text,
"Bronze" text,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the bronze when silver is 4 and gold is 1 and the total is more than 2
| SELECT "Bronze" FROM table_56134 WHERE "Total" > '2' AND "Gold" = '1' AND "Silver" = '4' | wikisql |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT DAY(CreationDate), COUNT(Id) FROM Posts WHERE PostTypeId = 3 AND Posts.CreationDate >= '##Date1##' AND Posts.CreationDate <= '##Date2##' GROUP BY DAY(CreationDate) ORDER BY DAY(CreationDate) | sede |
CREATE TABLE table_76957 (
"Date" text,
"Opponent" text,
"Site" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On which date was the result w20-0?
| SELECT "Date" FROM table_76957 WHERE "Result" = 'w20-0' | wikisql |
CREATE TABLE table_39875 (
"Team" text,
"Location" text,
"Years in senior / adult league" text,
"2013 BAFA Adult division" text,
"2013 BAFA Adult flag division" text,
"2013 BAFA Junior division" text,
"Other teams" text
)
-- Using valid SQLite, answer the following questions for the tables... | SELECT "2013 BAFA Adult flag division" FROM table_39875 WHERE "Location" = 'aylesbury' | wikisql |
CREATE TABLE table_name_29 (
edges INTEGER,
dual_archimedean_solid VARCHAR,
vertices VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Edges have a Dual Archimedean solid of truncated icosidodecahedron, and Vertices larger than 62?
| SELECT MIN(edges) FROM table_name_29 WHERE dual_archimedean_solid = "truncated icosidodecahedron" AND vertices > 62 | sql_create_context |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Dysphagia NEC" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
CREATE TABLE table_204_58 (
id number,
"year" number,
"position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total number of nations that made it to round 1 but not past that round from 1957 to 2013 ?
| SELECT COUNT(*) FROM table_204_58 WHERE "position" = 'round 1' | squall |
CREATE TABLE table_27902171_5 (
team VARCHAR,
location_attendance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is every team with location attendance of Seattle Center Coliseum 14,180?
| SELECT team FROM table_27902171_5 WHERE location_attendance = "Seattle Center Coliseum 14,180" | sql_create_context |
CREATE TABLE table_204_922 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many total medals did colombia win ?
| SELECT "total" FROM table_204_922 WHERE "nation" = 'colombia' | squall |
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 prescriptions.drug FROM prescriptions WHERE prescriptions.formulary_drug_cd = "ZEASP" | mimicsql_data |
CREATE TABLE table_38057 (
"Region" text,
"Total Population" real,
"Manchu" real,
"Percentage in Manchu Population" text,
"Regional Percentage of Population" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest population associated wit... | SELECT MIN("Total Population") FROM table_38057 WHERE "Regional Percentage of Population" = '2.95' | wikisql |
CREATE TABLE table_name_37 (
best_5_year_period VARCHAR,
best_15_year_period VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which best 5-year period has a best 15-year period of alekhine; lasker?
| SELECT best_5_year_period FROM table_name_37 WHERE best_15_year_period = "alekhine; lasker" | sql_create_context |
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE All_Documents (
Document_ID INTEGER,
Date_Stored DATETIME,
Document_Type_Code CHAR(15),
Document_Name CHAR(255),
Document_Description CHA... | SELECT Location_Code, COUNT(*) FROM Document_Locations GROUP BY Location_Code | nvbench |
CREATE TABLE table_28578594_1 (
no INTEGER,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least number for nello pagani
| SELECT MIN(no) FROM table_28578594_1 WHERE driver = "Nello Pagani" | sql_create_context |
CREATE TABLE EMPLOYEE (
EMP_NUM int,
EMP_LNAME varchar(15),
EMP_FNAME varchar(12),
EMP_INITIAL varchar(1),
EMP_JOBCODE varchar(5),
EMP_HIREDATE datetime,
EMP_DOB datetime
)
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CR... | SELECT DEPT_CODE, AVG(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE ORDER BY AVG(STU_GPA) | nvbench |
CREATE TABLE table_name_83 (
team VARCHAR,
points_against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team has 123 points agaibst the other team?
| SELECT team FROM table_name_83 WHERE points_against = "123" | sql_create_context |
CREATE TABLE table_32157 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which competition held the 1st position in 2009?
| SELECT "Competition" FROM table_32157 WHERE "Position" = '1st' AND "Year" = '2009' | wikisql |
CREATE TABLE table_44761 (
"Name" text,
"WSU Year(s)" text,
"Position" text,
"Team" text,
"Pro Year(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Pro Year(s), when Team is Cincinnati Royals?
| SELECT "Pro Year(s)" FROM table_44761 WHERE "Team" = 'cincinnati royals' | wikisql |
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Wheelchair dependence" AND prescriptions.drug_type = "BASE" | mimicsql_data |
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_stop (
flight_id int,
stop_number int,
stop_days text,
stop_... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'OAKLAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city... | atis |
CREATE TABLE table_61275 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the To Par score for the player from France?
| SELECT "To par" FROM table_61275 WHERE "Country" = 'france' | 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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JY... | css |
CREATE TABLE table_name_76 (
byes INTEGER,
wins VARCHAR,
draws VARCHAR,
mininera_dfl VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT ARE THE BYES WITH A DRAWS OF 1, SMW ROVERS, AND WINS LARGER THAN 6?
| SELECT AVG(byes) FROM table_name_76 WHERE draws = 1 AND mininera_dfl = "smw rovers" AND wins > 6 | sql_create_context |
CREATE TABLE Movie (
title VARCHAR,
mID VARCHAR
)
CREATE TABLE Rating (
rID VARCHAR,
stars INTEGER,
mID VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the title and star rating of the movie that got the least rating star for each reviewer.
| SELECT T2.title, T1.rID, T1.stars, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T1.rID | sql_create_context |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text
)
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZ... | SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND pers... | css |
CREATE TABLE table_name_75 (
bronze VARCHAR,
rank VARCHAR,
silver VARCHAR,
gold VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of Bronze, when Silver is greater than 0, when Gold is greater than 3, and when Rank is 1?
| SELECT COUNT(bronze) FROM table_name_75 WHERE silver > 0 AND gold > 3 AND rank = "1" | sql_create_context |
CREATE TABLE table_204_894 (
id number,
"season" number,
"winner" text,
"score" text,
"runners-up" text,
"venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- tell me the total number of goals scored in the 2010 match .
| SELECT "score" + "score" FROM table_204_894 WHERE "season" = 2010 | squall |
CREATE TABLE table_78178 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" real,
"Class" text,
"FCC info" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What city has larger than 94.1 as a frequency?
| SELECT "City of license" FROM table_78178 WHERE "Frequency MHz" > '94.1' | wikisql |
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 country (
Country_id int,
Country_name text,
Capital text,
Official_native_language text
)
CREATE TABLE playe... | SELECT Years_Played, COUNT(Years_Played) FROM player AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew" GROUP BY Years_Played | nvbench |
CREATE TABLE table_203_165 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the number of medals earned by indonesia -lrb- ina -rrb-... | SELECT "total" FROM table_203_165 WHERE "nation" = 'indonesia (ina)' | squall |
CREATE TABLE table_22355_44 (
nation VARCHAR,
athlete VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the nation for abdon pamich category:articles with hcards
| SELECT nation FROM table_22355_44 WHERE athlete = "Abdon Pamich Category:Articles with hCards" | sql_create_context |
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
Cr... | SELECT Post.Id AS "post_link", Post.OwnerUserId AS "user_link", Post.Score, Post.CreationDate, Post.ViewCount FROM Posts AS Post WHERE Post.PostTypeId = 1 AND Post.ClosedDate IS NULL AND (Post.Body LIKE '%best approach%' OR Post.Body LIKE '%best option%' OR Post.Body LIKE '%best strategy%') LIMIT 100 | sede |
CREATE TABLE item (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List all information in the item table.
| SELECT * FROM item | sql_create_context |
CREATE TABLE table_name_84 (
virtues VARCHAR,
significant_relationship VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The Significant Relationship of Parents belongs with what Virtue?
| SELECT virtues FROM table_name_84 WHERE significant_relationship = "parents" | sql_create_context |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistoryTypes (
Id numb... | SELECT Id AS "post_link", LENGTH(Body) AS "characters", REPLACE(REPLACE(Body, '<p>', ' '), '</p>', '') AS "body", Score AS "total_score" FROM Posts WHERE (OwnerUserId = @UserId) ORDER BY LENGTH(Body) LIMIT 30 | sede |
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 STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-89058') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime LIMIT 1 | eicu |
CREATE TABLE table_name_42 (
report VARCHAR,
winning_driver VARCHAR,
fastest_lap VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the driver jonathan summerton won and dane cameron had the fastest lap, what was the report?
| SELECT report FROM table_name_42 WHERE winning_driver = "jonathan summerton" AND fastest_lap = "dane cameron" | sql_create_context |
CREATE TABLE table_name_51 (
q_ INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total of q > 1.4 when q > 1.3 is 455, and q >1.2 is less than 3,028?
| SELECT SUM(q_) > _1.4 FROM table_name_51 WHERE q_ > _1.3 = 455 AND q_ > _1.2 < 3 OFFSET 028 | sql_create_context |
CREATE TABLE table_name_60 (
gold INTEGER,
silver VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Gold has a Total larger than 3, a Rank of total, and a Silver larger than 8?
| SELECT AVG(gold) FROM table_name_60 WHERE "total" > 3 AND rank = "total" AND silver > 8 | 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 Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Price) | nvbench |
CREATE TABLE table_name_92 (
ends VARCHAR,
type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What ends has transferred as the type?
| SELECT ends FROM table_name_92 WHERE type = "transferred" | sql_create_context |
CREATE TABLE table_10822 (
"Year" real,
"Artist" text,
"Mintage (Proof)" text,
"Issue Price (Proof)" text,
"Mintage (BU)[ clarification needed ]" text,
"Issue Price (BU)[ clarification needed ]" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wha... | SELECT "Issue Price (BU)[ clarification needed ]" FROM table_10822 WHERE "Mintage (Proof)" = '29,586' | wikisql |
CREATE TABLE table_204_245 (
id number,
"#" number,
"wrestlers" text,
"reign" number,
"date" text,
"days\nheld" number,
"location" text,
"event" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many tag teams held the... | SELECT COUNT("wrestlers") FROM table_204_245 WHERE "days\nheld" > 300 | squall |
CREATE TABLE table_name_7 (
date VARCHAR,
opponent VARCHAR,
tv_time VARCHAR,
game_site VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Date has a TV Time of cbs 1:00pm, and a Game Site of rca dome, and an Opponent of cincinnati bengals?
| SELECT date FROM table_name_7 WHERE tv_time = "cbs 1:00pm" AND game_site = "rca dome" AND opponent = "cincinnati bengals" | sql_create_context |
CREATE TABLE table_72127 (
"Village (German)" text,
"Village (Slovenian)" text,
"Number of people 1991" real,
"Percent of Slovenes 1991" text,
"Percent of Slovenes 1951" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Provide me with the names of all... | SELECT "Village (German)" FROM table_72127 WHERE "Percent of Slovenes 1951" = '76.3%' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE medication (
med... | SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-3355')) AND microlab.culturesite = 'other' AND DATETIME(microlab.cult... | eicu |
CREATE TABLE table_50834 (
"Year" text,
"Team" text,
"Attempts" text,
"Completions" text,
"Completion %" text,
"Yards" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the team Vanderberg belonged to when there was 42 completions?
| SELECT "Team" FROM table_50834 WHERE "Completions" = '42' | wikisql |
CREATE TABLE table_3070 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Wildcats points" real,
"Opponents" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of the first game?
| SELECT MIN("Game") FROM table_3070 | wikisql |
CREATE TABLE table_18521 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" text,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What party did incumbent Wright Patman belong to?
| SELECT "Party" FROM table_18521 WHERE "Incumbent" = 'Wright Patman' | wikisql |
CREATE TABLE table_55008 (
"Date" text,
"Ship" text,
"Type" text,
"Nationality" text,
"Tonnage GRT" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Nationality has a Tonnage GRT larger than 2,890, and a Ship of mount temple?
| SELECT "Nationality" FROM table_55008 WHERE "Tonnage GRT" > '2,890' AND "Ship" = 'mount temple' | wikisql |
CREATE TABLE table_57825 (
"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.
-- How big was the crowd in game that featured the ... | SELECT "Crowd" FROM table_57825 WHERE "Away team" = 'north melbourne' | wikisql |
CREATE TABLE music_festival (
Volume VARCHAR,
Result VARCHAR
)
CREATE TABLE volume (
Song VARCHAR,
Volume_ID VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Please show the songs that have result 'nominated' at music festivals.
| SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume = T2.Volume_ID WHERE T1.Result = "Nominated" | sql_create_context |
CREATE TABLE table_65333 (
"Vessel" text,
"Origin" text,
"Type" text,
"In service" real,
"Unit" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which vessel has a type of logistic support?
| SELECT "Vessel" FROM table_65333 WHERE "Type" = 'logistic support' | wikisql |
CREATE TABLE table_19626 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score in the game played on December 2, 1984?
| SELECT "Record" FROM table_19626 WHERE "Date" = 'December 2, 1984' | wikisql |
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
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
)
CREATE... | SELECT Time, meter_100 FROM swimmer ORDER BY meter_100 | nvbench |
CREATE TABLE table_18093 (
"Club" text,
"Played" text,
"Won" 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 follo... | SELECT "Points for" FROM table_18093 WHERE "Losing bonus" = '1' | wikisql |
CREATE TABLE table_6740 (
"Buechel & Manhart spelling (pronunciation)" text,
"Ullrich" text,
"Brandon University" text,
"Deloria & Boas" text,
"Dakota Mission" text,
"Rood & Taylor" text,
"Riggs" text,
"Williamson" text,
"University of Minnesota" text,
"White Hat" text
)
-- Usi... | SELECT "Ullrich" FROM table_6740 WHERE "Riggs" = 'e' AND "Buechel & Manhart spelling (pronunciation)" = 'e' | 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 mzjzjlb.JZLSH 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 NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2016-07-27') | css |
CREATE TABLE table_6796 (
"Episode" text,
"VII Season" text,
"VIII Season" text,
"XII Season" text,
"XIII Season" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is XII Season, when Episode is 6?
| SELECT "XII Season" FROM table_6796 WHERE "Episode" = '6' | 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 Founder, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC | nvbench |
CREATE TABLE region (
Region_ID int,
Region_name text,
Date text,
Label text,
Format text,
Catalogue text
)
CREATE TABLE party_events (
Event_ID int,
Event_Name text,
Party_ID int,
Member_in_charge_ID int
)
CREATE TABLE party (
Party_ID int,
Minister text,
Took_offi... | SELECT Party_name, COUNT(*) FROM party_events AS T1 JOIN party AS T2 ON T1.Party_ID = T2.Party_ID GROUP BY T1.Party_ID ORDER BY Party_name DESC | nvbench |
CREATE TABLE table_1277350_1 (
thursday_iuppiter__jupiter_ VARCHAR,
saturday_saturnus___saturn_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the thursday iuppiter (jupiter) with saturday saturnus ( saturn) being jesarn
| SELECT thursday_iuppiter__jupiter_ FROM table_1277350_1 WHERE saturday_saturnus___saturn_ = "Jesarn" | sql_create_context |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
ic... | SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-2498')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.cel... | eicu |
CREATE TABLE table_21225 (
"Province" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
)
-- Using valid SQLite, answer the following questions for the tables provided abov... | SELECT COUNT("PA") FROM table_21225 WHERE "Blank Ends" = '1' | wikisql |
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 * FROM t_kc21 WHERE PERSON_ID = '91955155' AND MED_SER_ORG_NO = '3730481' AND NOT MED_ORG_DEPT_NM LIKE '%正畸%' | css |
CREATE TABLE table_204_484 (
id number,
"song" text,
"artists" text,
"release" text,
"year" number,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times was skrein listed as an artist on a song ?
| SELECT COUNT(*) FROM table_204_484 WHERE "artists" = 'skrein' | squall |
CREATE TABLE table_37526 (
"Type" text,
"Numbers" text,
"Year built" real,
"Quantity built" text,
"Power (horsepower)" real,
"Max Speed (km/h)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the numbers of the thn unit with a power great... | SELECT "Numbers" FROM table_37526 WHERE "Power (horsepower)" > '220' AND "Type" = 'thn' | wikisql |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_care... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 76332 AND admissions.d... | mimic_iii |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT COUNT(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '朱涵蓄' AND t_kc22.STA_DATE BETWEEN '2008-12-31' AND '2013-11-25' AND t_kc22.SOC_SRT_DIRE_CD = '908952' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyj... | css |
CREATE TABLE table_54390 (
"Entrant" text,
"Constructor" text,
"Chassis" text,
"Engine" text,
"Tyres" text,
"Driver" text,
"Rounds" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the constructor for alberto colombo and chassis of a1
| SELECT "Constructor" FROM table_54390 WHERE "Driver" = 'alberto colombo' AND "Chassis" = 'a1' | wikisql |
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
Exp... | SELECT T.TagName, T.Count FROM Tags AS T ORDER BY T.Count DESC LIMIT 5000 | sede |
CREATE TABLE table_name_57 (
champion VARCHAR,
runner_up VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the champion when atl tico wanderers was the runner-up?
| SELECT champion FROM table_name_57 WHERE runner_up = "atlético wanderers" | sql_create_context |
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 AVG(qtb.IN_HOSP_DAYS) FROM qtb WHERE qtb.MED_SER_ORG_NO = '5908391' AND qtb.IN_HOSP_DATE BETWEEN '2003-09-17' AND '2006-10-06' UNION SELECT AVG(gyb.IN_HOSP_DAYS) FROM gyb WHERE gyb.MED_SER_ORG_NO = '5908391' AND gyb.IN_HOSP_DATE BETWEEN '2003-09-17' AND '2006-10-06' UNION SELECT AVG(zyb.IN_HOSP_DAYS) FROM zyb WH... | css |
CREATE TABLE table_37449 (
"School" text,
"Mascot" text,
"Location" text,
"Enrollment" real,
"IHSAA Class" text,
"IHSAA Football Class" text,
"County" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the IHSAA class for Portage?
| SELECT "IHSAA Class" FROM table_37449 WHERE "School" = 'portage' | wikisql |
CREATE TABLE table_13564702_3 (
won VARCHAR,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of won for maesteg harlequins rfc
| SELECT COUNT(won) FROM table_13564702_3 WHERE club = "Maesteg Harlequins RFC" | sql_create_context |
CREATE TABLE table_name_55 (
right_ascension___j2000__ VARCHAR,
declination___j2000__ VARCHAR,
ngc_number VARCHAR,
constellation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the right ascension (J2000) with a Declination (J2000) of 12 43 , ... | SELECT right_ascension___j2000__ FROM table_name_55 WHERE ngc_number > 2068 AND constellation = "dorado" AND declination___j2000__ = "°12′43″" | sql_create_context |
CREATE TABLE table_29581 (
"Pos" real,
"SP" real,
"No." real,
"Driver" text,
"Car Name" text,
"Car Make" text,
"Entrant" text,
"Laps" real,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many status figures does James Fi... | SELECT COUNT("Status") FROM table_29581 WHERE "Entrant" = 'James Finch' | wikisql |
CREATE TABLE table_name_28 (
hits INTEGER,
year VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the least hits for year less than 1920 and player of ed delahanty
| SELECT MIN(hits) FROM table_name_28 WHERE year < 1920 AND player = "ed delahanty" | sql_create_context |
CREATE TABLE table_name_32 (
place VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Place of the Player with a Score of 73-75-71-73=292?
| SELECT place FROM table_name_32 WHERE score = 73 - 75 - 71 - 73 = 292 | sql_create_context |
CREATE TABLE table_71398 (
"Branding" text,
"Callsign" text,
"Frequency" text,
"Power (kW)" text,
"Station Type" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Power has Location in metro manila
| SELECT "Power (kW)" FROM table_71398 WHERE "Location" = 'metro manila' | wikisql |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
res... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare 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 ... | atis |
CREATE TABLE table_name_41 (
year_startup VARCHAR,
operator VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the startup year for the project with apache energy/inpex as the operator?
| SELECT year_startup FROM table_name_41 WHERE operator = "apache energy/inpex" | sql_create_context |
CREATE TABLE table_73605 (
"Code name" text,
"Brand name" text,
"Model (list)" text,
"Frequency" text,
"Cores/Threads" text,
"Max Memory Speed" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What brand is model I7-8xx?
| SELECT "Brand name" FROM table_73605 WHERE "Model (list)" = 'i7-8xx' | wikisql |
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.dob_year < "2052" AND procedures.long_title = "Combined right and left heart cardiac catheterization" | mimicsql_data |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT t_kc24.t_kc21_OUT_DIAG_DIS_CD, t_kc24.t_kc21_OUT_DIAG_DIS_NM FROM t_kc24 WHERE t_kc24.t_kc21_PERSON_NM = '奚丽珠' AND t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 381.88) | css |
CREATE TABLE table_name_77 (
pick__number INTEGER,
college VARCHAR,
overall VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the mean pick number for Iowa College when the overall is less than 200?
| SELECT AVG(pick__number) FROM table_name_77 WHERE college = "iowa" AND overall < 200 | sql_create_context |
CREATE TABLE table_20441 (
"No" text,
"Season" text,
"Start date (1st night)" text,
"End date (Last night)" text,
"Location" text,
"No of Proms" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When are start dates (1st night) for the season of 19... | SELECT "Start date (1st night)" FROM table_20441 WHERE "Season" = '1966' | wikisql |
CREATE TABLE Staff (
staff_id INTEGER,
staff_first_name VARCHAR(80),
staff_last_name VARCHAR(80),
other_staff_details VARCHAR(255)
)
CREATE TABLE Problems (
problem_id INTEGER,
product_id INTEGER,
closure_authorised_by_staff_id INTEGER,
reported_by_staff_id INTEGER,
date_problem_rep... | SELECT log_entry_description, COUNT(log_entry_description) FROM Problem_Log GROUP BY log_entry_description ORDER BY COUNT(log_entry_description) | nvbench |
CREATE TABLE table_54903 (
"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.
-- Which Crowd has a Home team score of 11.13 (79)?... | SELECT AVG("Crowd") FROM table_54903 WHERE "Home team score" = '11.13 (79)' | wikisql |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
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 COUNT(*) FROM mzjzjlb WHERE mzjzjlb.YLJGDM = '6851618' AND mzjzjlb.JZKSRQ BETWEEN '2015-07-27' AND '2016-11-04' AND mzjzjlb.TXBZ > 0 | css |
CREATE TABLE table_8400 (
"Brigade" text,
"Staffing" text,
"Type" text,
"Location" text,
"Pumpers" real,
"Tankers" real,
"Telebooms" text,
"Platforms" text,
"Cars" text,
"Hazmat" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Whi... | SELECT "Tankers" FROM table_8400 WHERE "Hazmat" = '–' AND "Platforms" = '–' AND "Staffing" = 'volunteer' | wikisql |
CREATE TABLE table_204_561 (
id number,
"fence" number,
"name" text,
"jockey" text,
"age" number,
"handicap (st-lb)" text,
"starting price" text,
"fate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the first fence listed in the... | SELECT "fence" FROM table_204_561 WHERE id = 1 | squall |
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 diagnoses (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HYPERGLYCEMIA;HYPONATREMIA" | mimicsql_data |
CREATE TABLE table_name_93 (
date VARCHAR,
winning_score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Date has a Winning score of 14 (66-64-68-68=266)?
| SELECT date FROM table_name_93 WHERE winning_score = –14(66 - 64 - 68 - 68 = 266) | sql_create_context |
CREATE TABLE table_67093 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Rank" text,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the rank for wins of 0 and points of 2
| SELECT "Rank" FROM table_67093 WHERE "Wins" = '0' AND "Points" = '2' | wikisql |
CREATE TABLE table_name_35 (
series VARCHAR,
opponent VARCHAR,
round VARCHAR,
competition VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Series for the uefa cup, in the 2006 07 season, and a Round of group, and an oppo... | SELECT series FROM table_name_35 WHERE competition = "uefa cup" AND season = "2006–07" AND round = "group" AND opponent = "az" | sql_create_context |
CREATE TABLE table_34992 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Game Site" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent at the game at Sullivan Stadium before wee... | SELECT "Opponent" FROM table_34992 WHERE "Week" < '11' AND "Game Site" = 'sullivan stadium' | wikisql |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnon... | SELECT AVG(LENGTH(Text)), AVG(CAST(COALESCE(Score, 0.0) AS FLOAT)) FROM Comments WHERE NOT Score IS NULL | sede |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.