instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_198175_2 (
map_number INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest value for map number?
| SELECT MAX(map_number) FROM table_198175_2 | sql_create_context |
CREATE TABLE table_61911 (
"Name in English" text,
"Name in Malay" text,
"Acronym" text,
"Foundation" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the acronym for the English name Northern management and technological inst... | SELECT "Acronym" FROM table_61911 WHERE "Name in English" = 'northern management and technological institute' | wikisql |
CREATE TABLE table_24055352_1 (
height VARCHAR,
hometown VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the height when the player is from Los Angeles?
| SELECT height FROM table_24055352_1 WHERE hometown = "Los Angeles" | sql_create_context |
CREATE TABLE table_name_43 (
club VARCHAR,
sport VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which club had football at Mitchel Athletic Field?
| SELECT club FROM table_name_43 WHERE sport = "football" AND venue = "mitchel athletic field" | sql_create_context |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime t... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-202970')) AND intakeoutput.cellpath LIKE '%intake%' AND ... | eicu |
CREATE TABLE table_45351 (
"Heat" real,
"Lane" real,
"Name" text,
"Country" text,
"Mark" text,
"React" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest React that has a 7.61 Mark and a heat bigger than 1?
| SELECT MAX("React") FROM table_45351 WHERE "Mark" = '7.61' AND "Heat" > '1' | wikisql |
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.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '孔子明' AND t_kc21.MED_SER_ORG_NO = '8860248' AND NOT t_kc21.IN_DIAG_DIS_NM LIKE '%胃炎%' | css |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE state (
state_code text,
... | 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 = 'MIAMI' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEW YORK... | atis |
CREATE TABLE table_name_18 (
round INTEGER,
nationality VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average round of the rw position player from the United States?
| SELECT AVG(round) FROM table_name_18 WHERE nationality = "united states" AND position = "rw" | sql_create_context |
CREATE TABLE table_name_16 (
msdn_integration VARCHAR,
load_testing VARCHAR,
test_impact_analysis VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which MSDN integration has a Load testing of no, and a Test impact analysis of no?
| SELECT msdn_integration FROM table_name_16 WHERE load_testing = "no" AND test_impact_analysis = "no" | sql_create_context |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE... | SELECT Id AS "post_link", OwnerUserId AS "user_link", Score, Body FROM Posts WHERE Body LIKE '%http%##ext?jpg##%' AND LastActivityDate >= '##Date1?2019-01-01##' AND LastActivityDate <= '##Date2?2020-01-01##' ORDER BY Id | sede |
CREATE TABLE table_name_61 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the 2010 for 2011 of a and 2008 of 1r
| SELECT 2010 FROM table_name_61 WHERE 2011 = "a" AND 2008 = "1r" | sql_create_context |
CREATE TABLE table_44225 (
"Date" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the venue A with a result of 3 0?
| SELECT "Date" FROM table_44225 WHERE "Venue" = 'a' AND "Result" = '3–0' | wikisql |
CREATE TABLE table_5493 (
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which To par has a Winning score of 64-68-66-63=261?
| SELECT "To par" FROM table_5493 WHERE "Winning score" = '64-68-66-63=261' | wikisql |
CREATE TABLE happy_hour (
HH_ID int,
Shop_ID int,
Month text,
Num_of_shaff_in_charge int
)
CREATE TABLE shop (
Shop_ID int,
Address text,
Num_of_staff text,
Score real,
Open_Year text
)
CREATE TABLE happy_hour_member (
HH_ID int,
Member_ID int,
Total_amount real
)
CREA... | SELECT Time_of_purchase, Age FROM member GROUP BY Address ORDER BY Time_of_purchase | nvbench |
CREATE TABLE table_52274 (
"Year" real,
"Theme" text,
"Artist" text,
"Issue Price" real,
"Special Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years have a theme of Toronto Maple Leafs and an Issue Price of 24.95?
| SELECT COUNT("Year") FROM table_52274 WHERE "Theme" = 'toronto maple leafs' AND "Issue Price" = '24.95' | wikisql |
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 gwyjzb.MED_CLINIC_ID, gwyjzb.PERSON_ID, gwyjzb.PERSON_NM, gwyjzb.IDENTITY_CARD, gwyjzb.PERSON_SEX, gwyjzb.PERSON_AGE FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc24.MED_AMOUT = (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID = '11812286713') UNION SELECT fgwyjz... | css |
CREATE TABLE table_74911 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many wins did the team, which had more than 110 points, have in 1989?
| SELECT SUM("Wins") FROM table_74911 WHERE "Year" = '1989' AND "Points" > '110' | wikisql |
CREATE TABLE gyb (
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 COUNT(*) FROM gyb WHERE gyb.MED_TYPE = '4076214' AND gyb.IN_HOSP_DAYS BETWEEN '2007-03-08' AND '2014-07-22' | css |
CREATE TABLE table_14798 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the team 1 that had a 1st leg score of 0-1?
| SELECT "Team 1" FROM table_14798 WHERE "1st leg" = '0-1' | wikisql |
CREATE TABLE table_name_5 (
player VARCHAR,
position VARCHAR,
jersey_number_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who wears the jersey number 20 and has the position of SG?
| SELECT player FROM table_name_5 WHERE position = "sg" AND jersey_number_s_ = "20" | sql_create_context |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
CO... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY COUNT(HIRE_DATE) DESC | nvbench |
CREATE TABLE happy_hour_member (
hh_id number,
member_id number,
total_amount number
)
CREATE TABLE member (
member_id number,
name text,
membership_card text,
age number,
time_of_purchase number,
level_of_membership number,
address text
)
CREATE TABLE happy_hour (
hh_id nu... | SELECT shop_id, COUNT(*) FROM happy_hour GROUP BY shop_id ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_40120 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Lowest lost for Team Ypiranga-SP wh... | SELECT MIN("Lost") FROM table_40120 WHERE "Played" > '10' AND "Team" = 'ypiranga-sp' AND "Against" > '50' | wikisql |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course_offering (
offering_id int,
course_id int,
... | SELECT DISTINCT course_offering.end_time, course_offering.start_time, semester.semester, semester.year FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'MATSCIE' AND ... | advising |
CREATE TABLE table_name_65 (
diameter__km_ VARCHAR,
longitude VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How long is the diameter that has a longitude of 8.0e?
| SELECT diameter__km_ FROM table_name_65 WHERE longitude = "8.0e" | 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.ethnicity = "BLACK/HAITIAN" AND prescriptions.route = "BOTH EYES" | mimicsql_data |
CREATE TABLE table_1733457_1 (
others_percentage VARCHAR,
county VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the others % for cleveland
| SELECT others_percentage FROM table_1733457_1 WHERE county = "Cleveland" | sql_create_context |
CREATE TABLE table_name_5 (
rank INTEGER,
name VARCHAR,
appearances VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the sum of ranks of those called Fernando Cavenaghi who appeared less than 7.
| SELECT SUM(rank) FROM table_name_5 WHERE name = "fernando cavenaghi" AND appearances < 7 | sql_create_context |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAd... | SELECT YEAR(CreationDate) AS year, SUM(CAST(ViewCount AS INT)) / COUNT(Id) AS average_views FROM Posts GROUP BY YEAR(CreationDate) | sede |
CREATE TABLE table_28538368_2 (
young_rider_classification VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the young rider classification when Paolo Tiralongo won?
| SELECT young_rider_classification FROM table_28538368_2 WHERE winner = "Paolo Tiralongo" | sql_create_context |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
Creati... | SELECT * FROM Tags WHERE TagName IN ('java', 'c++', 'java') | sede |
CREATE TABLE table_30058355_2 (
mon_22_aug VARCHAR,
wed_24_aug VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What shows for mon 22 aug whenwed 24 aug is 19' 56.16 113.553mph?
| SELECT mon_22_aug FROM table_30058355_2 WHERE wed_24_aug = "19' 56.16 113.553mph" | sql_create_context |
CREATE TABLE table_41515 (
"Date" text,
"Cover model" text,
"Centerfold model" text,
"Interview subject" text,
"20 Questions" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the 20 Questions section aimed at when the Interview Subject was Cam... | SELECT "20 Questions" FROM table_41515 WHERE "Interview subject" = 'camille paglia' | wikisql |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT intakeoutput.patientunitstayid FROM intakeoutput WHERE intakeoutput.celllabel = 'enteral feeds' AND intakeoutput.cellpath LIKE '%input%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME()... | eicu |
CREATE TABLE table_1073 (
"Nation" text,
"Winners" real,
"Runners-up" real,
"Third Place" real,
"Fourth Place" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many teams named argentina?
| SELECT MAX("Fourth Place") FROM table_1073 WHERE "Nation" = 'Argentina' | wikisql |
CREATE TABLE table_name_62 (
format VARCHAR,
label VARCHAR,
catalog VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What format was the release in form the Edsel label, and that was from the EDCD 262 catalog?
| SELECT format FROM table_name_62 WHERE label = "edsel" AND catalog = "edcd 262" | sql_create_context |
CREATE TABLE table_name_66 (
record VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the game that was 76-85, what was the record?
| SELECT record FROM table_name_66 WHERE score = "76-85" | sql_create_context |
CREATE TABLE table_45192 (
"Date" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Set 3 when the total was 53 75?
| SELECT "Set 3" FROM table_45192 WHERE "Total" = '53–75' | wikisql |
CREATE TABLE table_name_36 (
cuts_made INTEGER,
tournament VARCHAR,
events VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many cuts did he make at the PGA championship in 3 events?
| SELECT MAX(cuts_made) FROM table_name_36 WHERE tournament = "pga championship" AND events > 3 | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id t... | SELECT demographic.gender FROM demographic WHERE demographic.subject_id = "15061" | mimicsql_data |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id ... | SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 27465 AND DATETIME(admissions.admittime) >= DATETIME(CURRENT_TIME(), '-1 year') ORDER BY admissions.admittime LIMIT 1 | mimic_iii |
CREATE TABLE table_32042 (
"Year" text,
"Division" text,
"League" text,
"Reg. Season" text,
"Playoffs" text,
"Challenge Cup" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the league for year of 1915/16
| SELECT "League" FROM table_32042 WHERE "Year" = '1915/16' | wikisql |
CREATE TABLE table_2668374_10 (
candidates VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who were the running candidates when Samuel Riker was the incumbent?
| SELECT candidates FROM table_2668374_10 WHERE incumbent = "Samuel Riker" | sql_create_context |
CREATE TABLE table_name_32 (
date VARCHAR,
catalog VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the record with catalog ALCA-275 released?
| SELECT date FROM table_name_32 WHERE catalog = "alca-275" | sql_create_context |
CREATE TABLE table_1456056_1 (
total INTEGER,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the minimum total for ireland
| SELECT MIN(total) FROM table_1456056_1 WHERE country = "Ireland" | sql_create_context |
CREATE TABLE table_56936 (
"Episode" text,
"Rating" real,
"Share" real,
"18\u201349 (Rating/Share)" text,
"Viewers (m)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average Viewers (m) for 'aka', with a Rating larger than 3.3?
| SELECT AVG("Viewers (m)") FROM table_56936 WHERE "Episode" = 'aka' AND "Rating" > '3.3' | wikisql |
CREATE TABLE zzmzjzjlb (
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 zzmzjzjlb.JLSJ FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '32713764439' UNION SELECT fzzmzjzjlb.JLSJ FROM fzzmzjzjlb WHERE fzzmzjzjlb.JZLSH = '32713764439' | css |
CREATE TABLE table_1137696_3 (
grand_prix VARCHAR,
round VARCHAR,
winning_driver VARCHAR,
fastest_lap VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the grand prix with a driver of Michael Schumacher and a round of 7?
| SELECT grand_prix FROM table_1137696_3 WHERE winning_driver = "Michael Schumacher" AND fastest_lap = "Michael Schumacher" AND round = 7 | sql_create_context |
CREATE TABLE table_17355628_10 (
score VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the score for charlotte
| SELECT score FROM table_17355628_10 WHERE team = "Charlotte" | sql_create_context |
CREATE TABLE table_name_97 (
attendance INTEGER,
tie_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many attended tie number 3?
| SELECT MAX(attendance) FROM table_name_97 WHERE tie_no = "3" | sql_create_context |
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_dat... | SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code ORDER BY booking_status_code DESC | nvbench |
CREATE TABLE table_name_14 (
current_version VARCHAR,
rtm_build VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the current version of windows 8 with an RTM build of 9200?
| SELECT current_version FROM table_name_14 WHERE rtm_build = "9200" AND name = "windows 8" | sql_create_context |
CREATE TABLE table_1342013_10 (
candidates VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name all the candidates listed in the race where the incumbent is Prince Hulon Preston, Jr.
| SELECT candidates FROM table_1342013_10 WHERE incumbent = "Prince Hulon Preston, Jr." | sql_create_context |
CREATE TABLE table_name_60 (
round VARCHAR,
tournament VARCHAR,
winner VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Round, when Winner is 'Ivanovic', when Year is less than 2008, and when Tournament is 'Paris'?
| SELECT round FROM table_name_60 WHERE winner = "ivanovic" AND year < 2008 AND tournament = "paris" | sql_create_context |
CREATE TABLE table_name_57 (
title VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title of Amenemhat I?
| SELECT title FROM table_name_57 WHERE name = "amenemhat i" | sql_create_context |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | SELECT RZBQDM, RZBQMC, RYCWH FROM zyjzjlb WHERE JZLSH = '49376399892' | css |
CREATE TABLE t_kc21 (
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 SUM(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.PERSON_NM = '严虹雨' AND t_kc21.CLINIC_TYPE = '门诊' | css |
CREATE TABLE table_41838 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" real,
"Goals" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many ranks had 367 matches and more than 216 goals?
| SELECT SUM("Rank") FROM table_41838 WHERE "Matches" = '367' AND "Goals" > '216' | wikisql |
CREATE TABLE table_58739 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Pts." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the year of the Lotus 18 chassis?
| SELECT COUNT("Year") FROM table_58739 WHERE "Chassis" = 'lotus 18' | wikisql |
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_Home, SUM(Team_ID) FROM basketball_match GROUP BY All_Home | nvbench |
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... | SELECT TOP(10) AS id, LEN(Body) AS "length", Id AS "post_link" FROM Posts WHERE OwnerUserId = '##UserID##' ORDER BY LEN(Body) DESC | sede |
CREATE TABLE available_policies (
customer_phone VARCHAR,
policy_type_code VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are all the customer phone numbers under the most popular policy type?
| SELECT customer_phone FROM available_policies WHERE policy_type_code = (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1) | sql_create_context |
CREATE TABLE table_name_38 (
top_5 VARCHAR,
year VARCHAR,
wins VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the total number of Top 5 that has the Year smaller than 2009, and the Wins larger than 0?
| SELECT COUNT(top_5) FROM table_name_38 WHERE year < 2009 AND wins > 0 | sql_create_context |
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 Name, COUNT(Name) FROM appellations AS T1 JOIN wine AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.Price < 50 GROUP BY Name ORDER BY Name DESC | nvbench |
CREATE TABLE table_name_38 (
draws INTEGER,
wins VARCHAR,
losses VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Draws have Losses smaller than 16, and a Team of university, and Wins larger than 0?
| SELECT AVG(draws) FROM table_name_38 WHERE losses < 16 AND team = "university" AND wins > 0 | sql_create_context |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT * FROM zyjybgb WHERE zyjybgb.JZLSH = '93926804881' UNION SELECT * FROM mzjybgb WHERE mzjybgb.JZLSH = '93926804881' | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TAB... | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-13127') AND NOT patient.unitdischargetime IS NULL ORDER BY patie... | eicu |
CREATE TABLE Aircraft (
aid VARCHAR,
name VARCHAR,
distance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the id and name of the aircraft with the maximum distance.
| SELECT aid, name FROM Aircraft ORDER BY distance DESC LIMIT 1 | sql_create_context |
CREATE TABLE table_name_98 (
bullet_weight VARCHAR,
max_pressure VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the bullet weight with a 12,000 cup max pressure?
| SELECT bullet_weight FROM table_name_98 WHERE max_pressure = "12,000 cup" | sql_create_context |
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 hz_info JOIN mzjzjlb JOIN jybgb 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 person_info_hz_info.KH = hz_info.KH AND pers... | css |
CREATE TABLE table_name_70 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was their record 26-19?
| SELECT date FROM table_name_70 WHERE record = "26-19" | sql_create_context |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "WIDOWED" AND lab.itemid = "51249" | mimicsql_data |
CREATE TABLE table_15187735_1 (
segment_a VARCHAR,
segment_b VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was segment A when segment B was snowboards?
| SELECT segment_a FROM table_15187735_1 WHERE segment_b = "Snowboards" | sql_create_context |
CREATE TABLE table_36469 (
"Game" real,
"February" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games have a February larger than 11, and a Record of 23-7-8?
| SELECT COUNT("Game") FROM table_36469 WHERE "February" > '11' AND "Record" = '23-7-8' | wikisql |
CREATE TABLE table_name_73 (
fleet_size VARCHAR,
class VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the fleet size of the Vanguard 0-6-0dh class?
| SELECT fleet_size FROM table_name_73 WHERE class = "vanguard 0-6-0dh" | sql_create_context |
CREATE TABLE table_9449 (
"Tie no" text,
"Home team" text,
"Score" text,
"Away team" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Score, when Tie No is Replay, and when Home Team is Sunderland?
| SELECT "Score" FROM table_9449 WHERE "Tie no" = 'replay' AND "Home team" = 'sunderland' | wikisql |
CREATE TABLE table_77777 (
"Player" text,
"Position" text,
"School" text,
"Hometown" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the position of the player from Fort Lauderdale, Florida?
| SELECT "Position" FROM table_77777 WHERE "Hometown" = 'fort lauderdale, florida' | wikisql |
CREATE TABLE table_name_66 (
finalist VARCHAR,
surface VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the finalist of the hard surface tournament in Miami?
| SELECT finalist FROM table_name_66 WHERE surface = "hard" AND tournament = "miami" | sql_create_context |
CREATE TABLE table_54164 (
"Player" text,
"No.(s)" text,
"Height in Ft." text,
"Position" text,
"Years for Rockets" text,
"School/Club Team/Country" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the height in ft for 1999-2004
| SELECT "Height in Ft." FROM table_54164 WHERE "Years for Rockets" = '1999-2004' | wikisql |
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 t_kc24.t_kc21_MED_ORG_DEPT_NM, t_kc24.t_kc21_OUT_DIAG_DIS_CD, MIN(t_kc24.PER_EXP) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '9266257' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_NM, t_kc24.t_kc21_OUT_DIAG_DIS_CD ORDER BY MIN(t_kc24.PER_EXP / t_kc24.MED_AMOUT) | css |
CREATE TABLE table_44741 (
"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 of the Player with a Score of 69-70=139?
| SELECT "To par" FROM table_44741 WHERE "Score" = '69-70=139' | wikisql |
CREATE TABLE table_name_7 (
location VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the fight located that lasted a time of 2:33?
| SELECT location FROM table_name_7 WHERE time = "2:33" | sql_create_context |
CREATE TABLE table_64609 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What bike has 26 as the grid?
| SELECT "Bike" FROM table_64609 WHERE "Grid" = '26' | wikisql |
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.BGDH 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_info... | css |
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE schedule... | SELECT Directed_by, COUNT(Directed_by) FROM film GROUP BY Directed_by ORDER BY COUNT(Directed_by) DESC | nvbench |
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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime ... | SELECT patients.dob FROM patients WHERE patients.subject_id = 96833 | mimic_iii |
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "WIDOWED" AND procedures.icd9_code = "8968" | mimicsql_data |
CREATE TABLE table_11637 (
"Route Name" text,
"Direction" text,
"Termini" text,
"Junctions" text,
"Length" text,
"Population Area" text,
"Remarks" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the terminini of the highway with an ea... | SELECT "Termini" FROM table_11637 WHERE "Direction" = 'east west' AND "Remarks" = 'replaced by us 59' | wikisql |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '009-7776') AND DATETIME(medication.drugstarttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT medication.drugname FROM medicat... | eicu |
CREATE TABLE table_21991 (
"Spaceport" text,
"Launch complex" text,
"Launcher" text,
"Spacecraft" text,
"Flights" text,
"Years" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What spacecraft was launched from the LC34 launch complex?
| SELECT "Spacecraft" FROM table_21991 WHERE "Launch complex" = 'LC34' | wikisql |
CREATE TABLE table_50113 (
"Game" real,
"October" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the last game of the season that has the record 0-1-0?
| SELECT MIN("Game") FROM table_50113 WHERE "Record" = '0-1-0' | wikisql |
CREATE TABLE table_52971 (
"Goalkeeper" text,
"Goals" real,
"Matches" real,
"Average" real,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For Getafe CF, what is the highest number of goals scored?
| SELECT MAX("Goals") FROM table_52971 WHERE "Team" = 'getafe cf' | wikisql |
CREATE TABLE table_204_665 (
id number,
"rank" number,
"name" text,
"notability" text,
"birthplace" text,
"advocate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what are the number of images on the list ?
| SELECT COUNT(*) FROM table_204_665 | squall |
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decima... | SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC | nvbench |
CREATE TABLE t_kc21 (
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 COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '吕莹玉' AND t_kc22.STA_DATE BETWEEN '2008-10-25' AND '2015-12-06' AND t_kc22.SELF_PAY_PRO < 0.73 | css |
CREATE TABLE table_name_99 (
city VARCHAR,
seasons_in_league VARCHAR,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which City has Seasons in league of 17, and a Club of shakhter?
| SELECT city FROM table_name_99 WHERE seasons_in_league = 17 AND club = "shakhter" | sql_create_context |
CREATE TABLE table_61174 (
"Round" text,
"Main date" text,
"Number of fixtures" real,
"Clubs" text,
"New entries this round" text,
"Prize money" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the new entries for the Semi-Finals round w... | SELECT "New entries this round" FROM table_61174 WHERE "Number of fixtures" < '8' AND "Round" = 'semi-finals' | wikisql |
CREATE TABLE table_203_410 (
id number,
"game" number,
"date" text,
"opponent" text,
"location" text,
"score" text,
"attendance" number,
"record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the average combined score in febru... | SELECT AVG("score" + "score") FROM table_203_410 WHERE "date" = 2 | squall |
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,... | SELECT diagnoses_icd.charttime FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'lumbar disc displacement') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24971) AND STRFTI... | mimic_iii |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.