instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_204_466 (
id number,
"rank" number,
"bib" number,
"country" text,
"time" text,
"penalties (p+s)" text,
"deficit" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which team finished first , romania or belarus ?
| SELECT "country" FROM table_204_466 WHERE "country" IN ('romania', 'belarus') ORDER BY "rank" LIMIT 1 | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2131.0" AND procedures.short_title = "Other skin & subq i & d" | mimicsql_data |
CREATE TABLE all_star (
player_id VARCHAR
)
CREATE TABLE player (
name_first VARCHAR,
name_last VARCHAR,
player_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the first name, last name and id of the player with the most all star game exp... | SELECT T1.name_first, T1.name_last, T1.player_id, COUNT(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id = T2.player_id GROUP BY T1.player_id ORDER BY COUNT(*) DESC LIMIT 1 | 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 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 WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.admityear < "2165" | mimicsql_data |
CREATE TABLE regular_order_products (
regular_order_id number,
product_id number
)
CREATE TABLE delivery_route_locations (
location_code text,
route_id number,
location_address_id number,
location_name text
)
CREATE TABLE actual_orders (
actual_order_id number,
order_status_code text,
... | SELECT customer_name, customer_phone, customer_email FROM customers ORDER BY date_became_customer | spider |
CREATE TABLE table_name_35 (
outcome VARCHAR,
surface VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Outcome of the Doubles played on Carpet?
| SELECT outcome FROM table_name_35 WHERE surface = "carpet" | sql_create_context |
CREATE TABLE table_77185 (
"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 when the outcome is winner against yevgeny kafelnikov?
| SELECT "Score" FROM table_77185 WHERE "Outcome" = 'winner' AND "Opponent" = 'yevgeny kafelnikov' | wikisql |
CREATE TABLE table_name_80 (
rowers VARCHAR,
country VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the rower from Canada?
| SELECT rowers FROM table_name_80 WHERE country = "canada" | sql_create_context |
CREATE TABLE table_42061 (
"8:00" text,
"8:30" text,
"9:00" text,
"9:30" text,
"10:00" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What show played at 8:00 when Ugly Betty played at 8:30?
| SELECT "8:00" FROM table_42061 WHERE "8:30" = 'ugly betty' | wikisql |
CREATE TABLE table_66825 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Result on 26 jan 2005?
| SELECT "Result" FROM table_66825 WHERE "Date" = '26 jan 2005' | wikisql |
CREATE TABLE table_10628 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the away team score at Western Oval?
| SELECT "Away team score" FROM table_10628 WHERE "Venue" = 'western oval' | wikisql |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_f... | SELECT DISTINCT flight_id FROM flight WHERE airline_code = 'YX' | atis |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Endoscopic excision or destruction of lesion or tissue of stomach" | mimicsql_data |
CREATE TABLE table_66911 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Mountains classification" text,
"Intergiro classification" text,
"Trofeo Fast Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided abo... | SELECT "Intergiro classification" FROM table_66911 WHERE "Trofeo Fast Team" = 'team polti' AND "Stage" = '14' | wikisql |
CREATE TABLE table_name_55 (
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which 3rd run has rank of 8?
| SELECT 3 AS rd_run FROM table_name_55 WHERE rank = 8 | sql_create_context |
CREATE TABLE table_name_38 (
date VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what date was the record 62 84?
| SELECT date FROM table_name_38 WHERE record = "62–84" | sql_create_context |
CREATE TABLE table_name_1 (
result VARCHAR,
film_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result for the fil Paljas?
| SELECT result FROM table_name_1 WHERE film_title = "paljas" | sql_create_context |
CREATE TABLE table_name_35 (
depth VARCHAR,
time__utc_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the depth of the quake that occurred at 19:48?
| SELECT depth FROM table_name_35 WHERE time__utc_ = "19:48" | sql_create_context |
CREATE TABLE railway_manage (
Railway_ID int,
Manager_ID int,
From_Year text
)
CREATE TABLE railway (
Railway_ID int,
Railway text,
Builder text,
Built text,
Wheels text,
Location text,
ObjectNumber text
)
CREATE TABLE manager (
Manager_ID int,
Name text,
Country te... | SELECT Arrival, COUNT(Arrival) FROM train GROUP BY Arrival | nvbench |
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE PROFESSOR (
EMP_NUM int,
DEPT_CODE varchar(10),
PROF_OFFICE varchar(50),
PROF_EXTENSION varchar(4),
PROF_HIGH_DEGREE varchar(5)
)
CREATE TABLE CLASS (
... | SELECT CRS_DESCRIPTION, COUNT(CRS_DESCRIPTION) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY PROF_OFFICE, CRS_DESCRIPTION ORDER BY CRS_DESCRIPTION DESC | nvbench |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.gender = "F" AND procedures.short_title = "Ven cath renal dialysis" | mimicsql_data |
CREATE TABLE table_41539 (
"Player" text,
"Nationality" text,
"Position" text,
"Years in Orlando" text,
"School/Club Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the team that has forward-center as a position?
| SELECT "School/Club Team" FROM table_41539 WHERE "Position" = 'forward-center' | wikisql |
CREATE TABLE table_14966537_1 (
record VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many games were played against the Chicago Bears?
| SELECT COUNT(record) FROM table_14966537_1 WHERE opponent = "Chicago Bears" | sql_create_context |
CREATE TABLE block (
blockfloor number,
blockcode number
)
CREATE TABLE on_call (
nurse number,
blockfloor number,
blockcode number,
oncallstart time,
oncallend time
)
CREATE TABLE undergoes (
patient number,
procedures number,
stay number,
dateundergoes time,
physician... | SELECT name FROM procedures WHERE cost > 1000 EXCEPT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid = T2.physician JOIN procedures AS T3 ON T3.code = T2.treatment WHERE T1.name = "John Wen" | spider |
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
... | SELECT t.TagName, t.Count, MIN(p.CreationDate) FROM Tags AS t JOIN PostTags AS pt ON t.Id = pt.TagId JOIN Posts AS p ON p.Id = pt.PostId WHERE t.Count <= 3 GROUP BY t.TagName, t.Count ORDER BY MIN(p.CreationDate) LIMIT 100 | sede |
CREATE TABLE table_2785 (
"Release" text,
"Oricon Albums Chart" text,
"Peak Position" real,
"Debut Sales (copies)" real,
"Sales Total (copies)" real,
"Chart Run" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many peak positions were there o... | SELECT "Peak Position" FROM table_2785 WHERE "Oricon Albums Chart" = 'Daily Charts' | wikisql |
CREATE TABLE table_27795 (
"Municipality" text,
"No. of Barangays" real,
"Area (hectares)" real,
"Population (2007)" real,
"Population (2010)" real,
"Pop. density (per km 2 )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the population... | SELECT "Pop. density (per km 2 )" FROM table_27795 WHERE "Municipality" = 'Caramoran' | wikisql |
CREATE TABLE table_name_86 (
event VARCHAR,
notes VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What event has 7860 notes?
| SELECT event FROM table_name_86 WHERE notes = "7860" | sql_create_context |
CREATE TABLE table_76431 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"TV Time" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE WEEK WITH AN ATTENDANCE OF 75,555?
| SELECT SUM("Week") FROM table_76431 WHERE "Attendance" = '75,555' | 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 jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM ... | css |
CREATE TABLE review (
rid int,
business_id varchar,
user_id varchar,
rating float,
text longtext,
year int,
month varchar
)
CREATE TABLE neighborhood (
id int,
business_id varchar,
neighborhood_name varchar
)
CREATE TABLE user (
uid int,
user_id varchar,
name varcha... | SELECT COUNT(DISTINCT (business_id)) FROM business WHERE city = 'Los Angeles' AND name = 'Target' | yelp |
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Personal history of malignant neoplasm of rectum, rectosigmoid junction, and anus" AND pres... | mimicsql_data |
CREATE TABLE table_name_64 (
language VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the language for Strong Heart?
| SELECT language FROM table_name_64 WHERE title = "strong heart" | sql_create_context |
CREATE TABLE table_6175 (
"Date" text,
"Tournament" text,
"Location" text,
"Winner" text,
"Score" text,
"1st prize ( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Tournament has a Location of texas, and a Winner of tom watson (39)?
| SELECT "Tournament" FROM table_6175 WHERE "Location" = 'texas' AND "Winner" = 'tom watson (39)' | wikisql |
CREATE TABLE table_name_68 (
airport VARCHAR,
iata VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the airport with an IATA of KUF?
| SELECT airport FROM table_name_68 WHERE iata = "kuf" | 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 PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,... | SELECT T.TagName, T2.TagName FROM Tags AS T JOIN Posts AS P ON (T.WikiPostId = P.Id) LEFT JOIN TagSynonyms AS TS ON (T.TagName = TS.SourceTagName) LEFT JOIN Tags AS T2 ON (TS.TargetTagName = T2.TagName) WHERE (T.TagName LIKE '%android%' OR P.Body LIKE '%android%') OR (T.TagName LIKE '%java%' OR P.Body LIKE '%java%') | sede |
CREATE TABLE table_21726793_1 (
written_by VARCHAR,
no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who wrote the no 2?
| SELECT written_by FROM table_21726793_1 WHERE no = 2 | sql_create_context |
CREATE TABLE table_name_91 (
finalist VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the finalist in the Monte Carlo Tournament?
| SELECT finalist FROM table_name_91 WHERE tournament = "monte carlo" | sql_create_context |
CREATE TABLE table_26908 (
"Codename (main article)" text,
"Brand name (list)" text,
"Cores" real,
"L3 Cache" text,
"Socket" text,
"TDP" text,
"I/O Bus" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What i/o buses are associated with the br... | SELECT "I/O Bus" FROM table_26908 WHERE "Brand name (list)" = 'Core i3-21xxT' | wikisql |
CREATE TABLE albums (
aid number,
title text,
year number,
label text,
type text
)
CREATE TABLE tracklists (
albumid number,
position number,
songid number
)
CREATE TABLE instruments (
songid number,
bandmateid number,
instrument text
)
CREATE TABLE vocals (
songid num... | SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid = T2.albumid JOIN songs AS T3 ON T2.songid = T3.songid WHERE t1.label = "Universal Music Group" | spider |
CREATE TABLE table_name_88 (
competition VARCHAR,
lost VARCHAR,
points VARCHAR,
draw VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What competition has a score greater than 30, a draw less than 5, and a loss larger than 10?
| SELECT competition FROM table_name_88 WHERE points > 30 AND draw < 5 AND lost > 10 | sql_create_context |
CREATE TABLE table_73991 (
"Edition" text,
"Year" real,
"Host city" text,
"Host country" text,
"Date" text,
"No. of athletes" text,
"Nations" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the number of athletes in the host city of ... | SELECT "No. of athletes" FROM table_73991 WHERE "Host city" = 'Nice' | wikisql |
CREATE TABLE table_1341930_5 (
party VARCHAR,
district VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of party in the arkansas 1 district
| SELECT COUNT(party) FROM table_1341930_5 WHERE district = "Arkansas 1" | sql_create_context |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE HIRE_DATE < '2002-06-21' | nvbench |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "47" AND demographic.days_stay > "30" | mimicsql_data |
CREATE TABLE table_203_835 (
id number,
"season" text,
"club" text,
"country" text,
"competition" text,
"apps." number,
"goals" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many goals did gunter thiebaut score in the 2001/02 season ?... | SELECT "goals" FROM table_203_835 WHERE "season" = '2001/02' | squall |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-85328') AND patient.unitdischargetime IS NULL) ... | eicu |
CREATE TABLE journalist (
journalist_ID int,
Name text,
Nationality text,
Age text,
Years_working int
)
CREATE TABLE news_report (
journalist_ID int,
Event_ID int,
Work_Type text
)
CREATE TABLE event (
Event_ID int,
Date text,
Venue text,
Name text,
Event_Attendance... | SELECT Work_Type, AVG(t1.Age) FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_ID = t2.journalist_ID GROUP BY t2.Work_Type | nvbench |
CREATE TABLE table_56781 (
"Driver" text,
"Constructor" text,
"Laps" text,
"Time/Retired" text,
"Grid" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Time/Retired value for Driver Johnny Herbert with Constructor Benetton - Renault
| SELECT "Time/Retired" FROM table_56781 WHERE "Constructor" = 'benetton - renault' AND "Driver" = 'johnny herbert' | 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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "15" AND diagnoses.long_title = "Personal history of malignant neoplasm of other gastrointestinal tract" | mimicsql_data |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugst... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.hospitaldischargetime IS NULL AND patient.age BETWEEN 30 AND 39 | eicu |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
... | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' | nvbench |
CREATE TABLE table_51771 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the score for Venue of tanteen recreation ground, st. george's
| SELECT "Score" FROM table_51771 WHERE "Venue" = 'tanteen recreation ground, st. george''s' | wikisql |
CREATE TABLE table_65473 (
"Rank" real,
"Rowers" text,
"Country" text,
"Time" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who are the Rowers with a Time of 6:39.49?
| SELECT "Rowers" FROM table_65473 WHERE "Time" = '6:39.49' | wikisql |
CREATE TABLE Flight (
flno VARCHAR,
distance VARCHAR,
price VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the flight number and distance of the flight with maximum price.
| SELECT flno, distance FROM Flight ORDER BY price DESC LIMIT 1 | sql_create_context |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ tim... | SELECT person_info.XM 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 jybgb.BGDH = '80578545144' | css |
CREATE TABLE table_1590652_4 (
runner_s__up VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the runners up for when tournament is wgc-accenture match play championship
| SELECT runner_s__up FROM table_1590652_4 WHERE tournament = "WGC-Accenture Match Play Championship" | sql_create_context |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT DISTINCT medication.routeadmin FROM medication WHERE medication.drugname = 'oxycodone hcl 5 mg po tabs (range) prn' | eicu |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissi... | mimic_iii |
CREATE TABLE table_4458 (
"Episode #" real,
"Title" text,
"Air Date" text,
"Demo" text,
"Viewers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which episode with a demo of 0.7/3 was the lowest?
| SELECT MIN("Episode #") FROM table_4458 WHERE "Demo" = '0.7/3' | wikisql |
CREATE TABLE table_train_22 (
"id" int,
"pre_treatment_with_hydroxyethyl_starch" int,
"requiring_dialysis" bool,
"intracerebral_hemorrhage" bool,
"serum_creatinine" float,
"kidney_disease" bool,
"allergy_to_hydroxyethyl_starch" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLi... | SELECT * FROM table_train_22 WHERE (kidney_disease = 1 AND requiring_dialysis = 1) OR serum_creatinine > 320 | criteria2sql |
CREATE TABLE customer_addresses (
address_id VARCHAR,
customer_id VARCHAR
)
CREATE TABLE addresses (
address_details VARCHAR,
address_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Return the address of customer 10.
| SELECT T1.address_details FROM addresses AS T1 JOIN customer_addresses AS T2 ON T1.address_id = T2.address_id WHERE T2.customer_id = 10 | sql_create_context |
CREATE TABLE table_203_431 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the most number of points scored in a game... | SELECT "score" + "score" FROM table_203_431 ORDER BY ("score" + "score") DESC LIMIT 1 | squall |
CREATE TABLE Courses (
course_id VARCHAR(100),
course_name VARCHAR(120),
course_description VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Students (
student_id INTEGER,
student_details VARCHAR(255)
)
CREATE TABLE Student_Course_Registrations (
student_id INTEGER,
course_id IN... | SELECT course_name, COUNT(*) FROM Students AS T1 JOIN Student_Course_Registrations AS T2 ON T1.student_id = T2.student_id JOIN Courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id | nvbench |
CREATE TABLE table_66432 (
"Name" text,
"Height" text,
"Weight" text,
"Spike" text,
"2008 club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the spike for the club of d.c. in 2008?
| SELECT "Spike" FROM table_66432 WHERE "2008 club" = 'd.c.' | wikisql |
CREATE TABLE table_51313 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the surface when the partner is carlos berlocq
| SELECT "Surface" FROM table_51313 WHERE "Partner" = 'carlos berlocq' | wikisql |
CREATE TABLE table_77159 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What i... | SELECT "High rebounds" FROM table_77159 WHERE "High assists" = 'jason kidd (13)' | wikisql |
CREATE TABLE table_53556 (
"Name" text,
"Position" text,
"From (Club)" text,
"Date Joined" text,
"Debut" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date did the player from Santo Andr debut?
| SELECT "Date Joined" FROM table_53556 WHERE "From (Club)" = 'santo andré' | wikisql |
CREATE TABLE table_name_36 (
school_club_team VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which School/Club Team has a Player of michael bradley?
| SELECT school_club_team FROM table_name_36 WHERE player = "michael bradley" | sql_create_context |
CREATE TABLE table_66273 (
"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 are the IHSAA classes of the Indianapo... | SELECT "IHSAA Class" FROM table_66273 WHERE "Location" = 'indianapolis' | 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 (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 '2004-08-25' AND '2016-07-12') + (SELECT COUNT(*) FROM person_info J... | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "RASH" AND demographic.age < "43" | mimicsql_data |
CREATE TABLE table_71068 (
"Stage" text,
"Date" text,
"Course" text,
"Distance" text,
"Winner" text,
"Race Leader" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which race Leader has a Stage of 7?
| SELECT "Race Leader" FROM table_71068 WHERE "Stage" = '7' | wikisql |
CREATE TABLE mzjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
... | SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.Y... | css |
CREATE TABLE table_204_492 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many top 3 finishes does gordeeva have ?
| SELECT COUNT(*) FROM table_204_492 WHERE "position" <= 3 | squall |
CREATE TABLE table_15511 (
"Date" text,
"Time ( CEST )" real,
"Team #1" text,
"Res." text,
"Team #2" text,
"Round" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What id the team with a smaller Time than 18?
| SELECT "Team #1" FROM table_15511 WHERE "Time ( CEST )" < '18' | wikisql |
CREATE TABLE table_23015396_1 (
year VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of year for june 30
| SELECT COUNT(year) FROM table_23015396_1 WHERE date = "June 30" | sql_create_context |
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
... | SELECT COUNT(DisplayName), DisplayName FROM Users WHERE UPPER(DisplayName) LIKE 'JON%' GROUP BY DisplayName ORDER BY COUNT(DisplayName) DESC LIMIT 10 | sede |
CREATE TABLE table_name_76 (
home VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has the Home Score of 52-54?
| SELECT home FROM table_name_76 WHERE score = "52-54" | sql_create_context |
CREATE TABLE table_34734 (
"Team" text,
"Stadium" text,
"Capacity" real,
"Highest" real,
"Lowest" real,
"Average" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Capacity smaller than 3,292, and a Highest larger than 812, and a Stadium of strathc... | SELECT SUM("Average") FROM table_34734 WHERE "Capacity" < '3,292' AND "Highest" > '812' AND "Stadium" = 'strathclyde homes stadium' | wikisql |
CREATE TABLE table_21453 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What w... | SELECT "High assists" FROM table_21453 WHERE "Date" = 'April 7' | wikisql |
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
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 T... | SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY COUNT(HIRE_DATE) DESC | nvbench |
CREATE TABLE table_17111812_1 (
tenth VARCHAR,
ninth VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When Kubb is in 9th, who is in 10th?
| SELECT tenth FROM table_17111812_1 WHERE ninth = "Kubb" | sql_create_context |
CREATE TABLE table_47085 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the Score that has the Opponent of at edmonton oilers?
| SELECT "Score" FROM table_47085 WHERE "Opponent" = 'at edmonton oilers' | wikisql |
CREATE TABLE table_name_14 (
long VARCHAR,
ryds VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Long when the ryds is 18?
| SELECT long FROM table_name_14 WHERE ryds = "18" | sql_create_context |
CREATE TABLE table_20688030_1 (
county VARCHAR,
obama_percentage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total of countys where Obama is popular by 35.44%?
| SELECT COUNT(county) FROM table_20688030_1 WHERE obama_percentage = "35.44%" | sql_create_context |
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER
)
CREATE TABLE Participants (
Participant_ID INTEGER,
Participant_Type_Code CHAR(15),
Participant_Details VARCHAR(255)
)
CREATE TABLE Events (
Event_ID INTEGER,
Service_ID INTEGER,
Event_Details VARCHAR(255)... | SELECT Event_Details, COUNT(Event_Details) FROM Events AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY Event_Details | nvbench |
CREATE TABLE table_name_90 (
score VARCHAR,
high_points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Score has High points of douglas (15)?
| SELECT score FROM table_name_90 WHERE high_points = "douglas (15)" | sql_create_context |
CREATE TABLE table_61811 (
"Tournament" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is 2011, when 2012 is 'A', and when Tournament is 'French Open'?
| SELECT "2011" FROM table_61811 WHERE "2012" = 'a' AND "Tournament" = 'french open' | wikisql |
CREATE TABLE table_69839 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Rank" text,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the earliest year in the 125cc class with more than 102 points and a rank of 2nd?
| SELECT MIN("Year") FROM table_69839 WHERE "Class" = '125cc' AND "Points" > '102' AND "Rank" = '2nd' | 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 Badges (
Id number,
UserId number,
Name text,
... | SELECT CAST(COUNT(AcceptedAnswerId) AS FLOAT) / COUNT(*) AS Accept_ratio FROM Posts WHERE PostTypeId = 1 | sede |
CREATE TABLE table_name_56 (
distance VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of 2012 passengers in millions that have traveled a distance of 1075km?
| SELECT COUNT(2012 AS _passengers__in_millions_) FROM table_name_56 WHERE distance = "1075km" | sql_create_context |
CREATE TABLE table_28445 (
"Season" real,
"Series" text,
"Team" text,
"Races" real,
"Wins" real,
"Poles" real,
"F/Laps" real,
"Podiums" real,
"Points" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the mi... | SELECT MIN("F/Laps") FROM table_28445 | wikisql |
CREATE TABLE table_204_854 (
id number,
"#" number,
"wrestlers" text,
"reign" number,
"date" text,
"days\nheld" number,
"location" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many matches were in 2007 ?
| SELECT COUNT(*) FROM table_204_854 WHERE "date" = 2007 | squall |
CREATE TABLE table_name_78 (
country VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country was the golfer with a score of 72-72-72=216 representing?
| SELECT country FROM table_name_78 WHERE score = 72 - 72 - 72 = 216 | sql_create_context |
CREATE TABLE table_758 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who ran for office in the Alabama 1 district?
| SELECT "Candidates" FROM table_758 WHERE "District" = 'Alabama 1' | wikisql |
CREATE TABLE subjects (
subject_id number,
subject_name text
)
CREATE TABLE course_authors_and_tutors (
author_id number,
author_tutor_atb text,
login_name text,
password text,
personal_name text,
middle_name text,
family_name text,
gender_mf text,
address_line_1 text
)
CRE... | SELECT * FROM course_authors_and_tutors ORDER BY personal_name | spider |
CREATE TABLE table_name_55 (
word VARCHAR,
pronunciation_b VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the word with pronunciation b of *s ks
| SELECT word FROM table_name_55 WHERE pronunciation_b = "*sɨks" | sql_create_context |
CREATE TABLE qtb (
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 qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '32284795' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 1441.3) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '32284795' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_k... | css |
CREATE TABLE table_name_5 (
political_party VARCHAR,
monarchs_served VARCHAR,
birth_place VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- To which political party did the prime minister who served under George V and was born in Manchester belong?
| SELECT political_party FROM table_name_5 WHERE monarchs_served = "george v" AND birth_place = "manchester" | sql_create_context |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.