instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_37 (
venue VARCHAR,
kitmaker VARCHAR,
team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Venue has a Kitmaker of lotto, and a Team of apoel?
| SELECT venue FROM table_name_37 WHERE kitmaker = "lotto" AND team = "apoel" | sql_create_context |
CREATE TABLE table_47119 (
"Senator" text,
"Party" text,
"District" real,
"Home Town" text,
"Took Office" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Took Office, when Senator is Eddie Bernice Johnson, and when District is grea... | SELECT MIN("Took Office") FROM table_47119 WHERE "Senator" = 'eddie bernice johnson' AND "District" > '23' | wikisql |
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text ... | SELECT u.Id, u.DisplayName, u.Reputation, u.DownVotes, u.UpVotes, u.LastAccessDate FROM Users AS u WHERE u.Reputation >= 3000 AND u.DownVotes = 0 ORDER BY u.Reputation DESC | sede |
CREATE TABLE table_name_98 (
f_laps VARCHAR,
final_placing VARCHAR,
podiums VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which F/Laps has Podiums of 1, and a Season of 2000, and a Final Placing of nc?
| SELECT f_laps FROM table_name_98 WHERE podiums = "1" AND season = 2000 AND final_placing = "nc" | sql_create_context |
CREATE TABLE table_34633 (
"Spacecraft" text,
"Destination" text,
"Launched" text,
"Closest approach" text,
"Time elapsed" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Launched has both a Spacecraft of Ulysses and 491 days (1 yr, 4 mo, 3 d) a... | SELECT "Launched" FROM table_34633 WHERE "Spacecraft" = 'ulysses' AND "Time elapsed" = '491 days (1 yr, 4 mo, 3 d)' | wikisql |
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
)
CREATE TABLE subjects (
subject_id number,
subject_name text
)
CRE... | SELECT T1.login_name FROM course_authors_and_tutors AS T1 JOIN courses AS T2 ON T1.author_id = T2.author_id WHERE T2.course_name = "advanced database" | spider |
CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
)
CREATE TABLE personfriend (
name text,
friend text,
year number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many type of jobs do they have?
| SELECT COUNT(DISTINCT job) FROM person | spider |
CREATE TABLE table_11447995_2 (
liscumb VARCHAR,
gauthier VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Liscumb when Gauthier is 34?
| SELECT liscumb FROM table_11447995_2 WHERE gauthier = "34" | sql_create_context |
CREATE TABLE table_name_73 (
points VARCHAR,
class VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points did ginger have when she was ranked 5th on a 350cc class bike?
| SELECT COUNT(points) FROM table_name_73 WHERE class = "350cc" AND rank = "5th" | sql_create_context |
CREATE TABLE table_name_67 (
away_team VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What away team has tottenham hotspur as the home team?
| SELECT away_team FROM table_name_67 WHERE home_team = "tottenham hotspur" | sql_create_context |
CREATE TABLE table_26218783_6 (
points VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times is player Stanislas Wawrinka on the list?
| SELECT COUNT(points) AS defending FROM table_26218783_6 WHERE player = "Stanislas Wawrinka" | sql_create_context |
CREATE TABLE table_14408 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the opponent for august 26
| SELECT "Opponent" FROM table_14408 WHERE "Date" = 'august 26' | wikisql |
CREATE TABLE table_name_16 (
no_result VARCHAR,
wins VARCHAR,
losses VARCHAR,
played VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of no result for losses more than 1 and played of 38 and wins less than 19
| SELECT COUNT(no_result) FROM table_name_16 WHERE losses > 1 AND played = 38 AND wins < 19 | sql_create_context |
CREATE TABLE table_name_28 (
to_par VARCHAR,
player VARCHAR,
total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of To Par, when Player is 'Julius Boros', and when Total is greater than 295?
| SELECT COUNT(to_par) FROM table_name_28 WHERE player = "julius boros" AND total > 295 | sql_create_context |
CREATE TABLE table_203_412 (
id number,
"school" text,
"conference" text,
"record (conference)" text,
"head coach" text,
"cws appearances" text,
"cws best finish" text,
"cws record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which te... | SELECT "school" FROM table_203_412 WHERE "record (conference)" <= 16 | squall |
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT People_ID, Weight FROM people | nvbench |
CREATE TABLE table_name_15 (
partner VARCHAR,
opponents_in_the_final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the partner for opponents of anamika bhargava sylvia krywacz
| SELECT partner FROM table_name_15 WHERE opponents_in_the_final = "anamika bhargava sylvia krywacz" | sql_create_context |
CREATE TABLE table_26427332_17 (
measurements__in_cm_ VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what measurement does the contestant from sindelfingen have?
| SELECT measurements__in_cm_ FROM table_26427332_17 WHERE city = "Sindelfingen" | sql_create_context |
CREATE TABLE table_77928 (
"Round" real,
"Pick" real,
"Player" text,
"Position" text,
"Nationality" text,
"Team" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest pick number for players from king's (ny)?
| SELECT MIN("Pick") FROM table_77928 WHERE "College" = 'king''s (ny)' | wikisql |
CREATE TABLE table_11658094_3 (
joined VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year did the school from mars hill, north carolina join?
| SELECT joined FROM table_11658094_3 WHERE location = "Mars Hill, North Carolina" | sql_create_context |
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),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) | nvbench |
CREATE TABLE table_name_63 (
a_score VARCHAR,
nation VARCHAR,
t_score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the total number of A scores for Japan when the T score was more than 4?
| SELECT COUNT(a_score) FROM table_name_63 WHERE nation = "japan" AND t_score > 4 | sql_create_context |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TA... | SELECT COUNT(*) > 0 FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'ANAT' AND course.number = 403 AND program_course.category LIKE '%ULCS%' | advising |
CREATE TABLE table_21756039_1 (
regular_season_results VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the regular season results for the year 2011-2012?
| SELECT regular_season_results FROM table_21756039_1 WHERE year = "2011-2012" | sql_create_context |
CREATE TABLE table_name_57 (
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the home team's score for north melbourne?
| SELECT home_team AS score FROM table_name_57 WHERE home_team = "north melbourne" | sql_create_context |
CREATE TABLE table_name_44 (
date VARCHAR,
surface VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date has a Surface of carpet (i)?
| SELECT date FROM table_name_44 WHERE surface = "carpet (i)" | sql_create_context |
CREATE TABLE table_name_47 (
riding VARCHAR,
rank VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Riding, when the Rank is 4th?
| SELECT riding FROM table_name_47 WHERE rank = "4th" | sql_create_context |
CREATE TABLE table_name_29 (
points_difference VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- I want the points difference for points of 14
| SELECT points_difference FROM table_name_29 WHERE points = 14 | sql_create_context |
CREATE TABLE table_name_88 (
Id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is 1994 Grand Slam Tournament if 1993 is also grand slam tournaments?
| SELECT 1994 FROM table_name_88 WHERE 1993 = "grand slam tournaments" | sql_create_context |
CREATE TABLE table_name_47 (
lane INTEGER,
semi VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which lane did the athlete swim in who had a semi-final time of 49.19?
| SELECT MIN(lane) FROM table_name_47 WHERE semi = 49.19 | sql_create_context |
CREATE TABLE table_63470 (
"Draw" real,
"Language" text,
"Artist" text,
"English translation" text,
"Place" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points does mia martini have?
| SELECT COUNT("Points") FROM table_63470 WHERE "Artist" = 'mia martini' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "17" AND procedures.long_title = "Combined right and left heart cardiac catheterization" | mimicsql_data |
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 WHERE demographic.diagnosis = "CEREBRAL ANEURYSM/SDA" AND demographic.admityear < "2200" | mimicsql_data |
CREATE TABLE table_203_747 (
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 is the total number of medals that india won in the asian yo... | SELECT "total" FROM table_203_747 WHERE "nation" = 'india' | squall |
CREATE TABLE table_56756 (
"Round" real,
"Pick" real,
"Name" text,
"Position" text,
"School" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the person from round 8?
| SELECT "Name" FROM table_56756 WHERE "Round" = '8' | wikisql |
CREATE TABLE table_17806 (
"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 "Drawn" FROM table_17806 WHERE "Tries for" = '46' | wikisql |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instruc... | SELECT DISTINCT total_gpa FROM student WHERE student_id = 1 | advising |
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 Name, AVG(Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Name ORDER BY Name | nvbench |
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 schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cine... | SELECT Title, MAX(T1.Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title ORDER BY Title | nvbench |
CREATE TABLE table_27744 (
"Rd." text,
"Event" text,
"Circuit" text,
"City / State" text,
"Date" text,
"Championship" text,
"Challenge" text,
"Production" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who made the challenge in the Austr... | SELECT "Challenge" FROM table_27744 WHERE "Event" = 'Australian Grand Prix' | wikisql |
CREATE TABLE table_name_97 (
attendance VARCHAR,
final VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance for the final quarter (1)?
| SELECT attendance FROM table_name_97 WHERE final = "quarter (1)" | sql_create_context |
CREATE TABLE table_26686908_2 (
production VARCHAR,
rd VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many productions are shown for rd 2?
| SELECT COUNT(production) FROM table_26686908_2 WHERE rd = "Rd 2" | 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 MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "PITUITARY BLEED" | mimicsql_data |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location ... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((date_day.day_number = 24 AND date_day.month_number = 5 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time... | atis |
CREATE TABLE Bookings (
Booking_ID INTEGER,
Customer_ID INTEGER,
Workshop_Group_ID VARCHAR(100),
Status_Code CHAR(15),
Store_ID INTEGER,
Order_Date DATETIME,
Planned_Delivery_Date DATETIME,
Actual_Delivery_Date DATETIME,
Other_Order_Details VARCHAR(255)
)
CREATE TABLE Order_Items (
... | SELECT Service_Type_Description, COUNT(Service_Type_Description) FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code = T2.Service_Type_Code WHERE T2.Product_Price > 100 GROUP BY Service_Type_Description | nvbench |
CREATE TABLE table_name_97 (
bahia VARCHAR,
northeast_total VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the value for Bahia when the Northeast total was 6747013?
| SELECT bahia FROM table_name_97 WHERE northeast_total = "6747013" | sql_create_context |
CREATE TABLE table_28513 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what type was joined in 1902 5?
| SELECT "Type" FROM table_28513 WHERE "Joined" = '1902 5' | wikisql |
CREATE TABLE train_station (
Train_ID int,
Station_ID int
)
CREATE TABLE train (
Train_ID int,
Name text,
Time text,
Service text
)
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
... | SELECT Location, SUM(Total_Passengers) FROM station GROUP BY Location | nvbench |
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE ... | SELECT AVG(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27703)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'hear... | mimic_iii |
CREATE TABLE table_23014685_1 (
place_ VARCHAR,
_date VARCHAR,
area_damaged VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the place and date that the Apartments area was damaged?
| SELECT place_ & _date FROM table_23014685_1 WHERE area_damaged = "Apartments area" | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.long_title = "Other closed [endoscopic] biopsy of biliary duct or sphincter of Oddi" | mimicsql_data |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE swimme... | SELECT meter_400, meter_100 FROM swimmer | nvbench |
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 COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '0244651' AND qtb.IN_HOSP_DATE BETWEEN '2002-05-16' AND '2016-06-25' AND qtb.IN_DIAG_DIS_CD <> qtb.OUT_DIAG_DIS_CD UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '0244651' AND gyb.IN_HOSP_DATE BETWEEN '2002-05-16' AND '2016-06-25' AND gyb.IN_DIAG_DIS_CD <> ... | css |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '01456680839' | css |
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER,
Customer_Policy_ID INTEGER
)
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE... | SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' | nvbench |
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM t... | SELECT JZKSDM, JZKSMC FROM zyjzjlb WHERE JZLSH = '31808020937' | css |
CREATE TABLE table_name_34 (
earnings_per_share__ INTEGER,
ebit__us_$m_ VARCHAR,
year_to_april VARCHAR,
revenue__us_$million_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Count the Earnings per share ( ) in April smaller than 2012, a Revenue (US $m... | SELECT SUM(earnings_per_share__) AS ¢_ FROM table_name_34 WHERE year_to_april < 2012 AND revenue__us_$million_ = 432.6 AND ebit__us_$m_ < 150.5 | sql_create_context |
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 COUNT(*) FROM jybgb WHERE jybgb.YLJGDM = '4850709' AND jybgb.BGRQ BETWEEN '2004-06-21' AND '2018-03-17' | css |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TA... | SELECT DISTINCT has_projects FROM course WHERE department = 'EECS' AND number = 545 | advising |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT COUNT(DISTINCT course_offering.offering_id) FROM course, course_offering WHERE course.course_id = course_offering.course_id AND course.department = 'SI' AND course.number = 644 | advising |
CREATE TABLE table_name_85 (
played INTEGER,
lost INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest played with a lost bigger than 10?
| SELECT MIN(played) FROM table_name_85 WHERE lost > 10 | sql_create_context |
CREATE TABLE table_23988 (
"Rd." real,
"Race Title" text,
"Circuit" text,
"Location" text,
"Date" text,
"Format" text,
"Winner" text,
"Team" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Was the result of the superche... | SELECT "Report" FROM table_23988 WHERE "Race Title" = 'Supercheap Auto Bathurst 1000' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | SELECT AVG(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-12480') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-115 month') GROUP BY STRFTIM... | eicu |
CREATE TABLE table_60581 (
"Year (Ceremony)" text,
"Original title" text,
"Film title used in nomination" text,
"Director" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year has a original title of 'el tinte de la fama'?
| SELECT "Year (Ceremony)" FROM table_60581 WHERE "Original title" = 'el tinte de la fama' | wikisql |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
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 t... | SELECT mzjzjlb.YLJGDM 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 per... | css |
CREATE TABLE table_74982 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which highest wins number had Kawasaki as a team, 95 points, and a year prior to 1981?
| SELECT MAX("Wins") FROM table_74982 WHERE "Team" = 'kawasaki' AND "Points" = '95' AND "Year" < '1981' | wikisql |
CREATE TABLE manager (
Manager_ID int,
Name text,
Country text,
Working_year_starts text,
Age int,
Level int
)
CREATE TABLE railway_manage (
Railway_ID int,
Manager_ID int,
From_Year text
)
CREATE TABLE train (
Train_ID int,
Train_Num text,
Name text,
From text,
... | SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country ORDER BY Country | nvbench |
CREATE TABLE table_36827 (
"Title" text,
"Genre" text,
"C=64" text,
"ZX Spectrum" text,
"Others" text,
"Year" real,
"Format" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many years have a Title of kriegspiel?
| SELECT COUNT("Year") FROM table_36827 WHERE "Title" = 'kriegspiel' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
... | SELECT prescriptions.drug, prescriptions.route FROM prescriptions WHERE prescriptions.formulary_drug_cd = "EPO2I" | mimicsql_data |
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE time_zone (
time_zone_code t... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((flight.arrival_time <= 1930 AND flight.arrival_time >= 1830) AND date_day.day_number = 16 AND date_day.month_number = 6 AND date_day.year = 19... | atis |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Code, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | nvbench |
CREATE TABLE table_22183 (
"Year" real,
"Car number" real,
"Start" real,
"Qual. speed" text,
"Speed rank" real,
"Finish" real,
"Laps completed" real,
"Laps led" real,
"Race status" text,
"Chassis" text
)
-- Using valid SQLite, answer the following questions for the tables provi... | SELECT COUNT("Speed rank") FROM table_22183 WHERE "Car number" = '92' | wikisql |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.person_info_XM = '韦坚秉' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2001-02-23') | 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 t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '潘红雪' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 2937.59) | css |
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 wdmzjzjlb (
HXPLC number,
HZX... | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '尤... | css |
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 AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "CELO-VESSICLE FISTULA" | mimicsql_data |
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Suggeste... | SELECT Id AS "post_link", Score, ViewCount AS Views, AnswerCount AS Answers, CreationDate, Tags FROM Posts WHERE AcceptedAnswerId IS NULL AND PostTypeId = 1 AND CreationDate < CURRENT_TIMESTAMP() - 30 AND ClosedDate IS NULL AND NOT EXISTS(SELECT * FROM Posts AS p WHERE p.ParentId = Posts.Id AND p.PostTypeId = 2) AND Ta... | sede |
CREATE TABLE table_name_59 (
play VARCHAR,
base VARCHAR,
company VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Athens Base play with Dance Theatre Roes Company?
| SELECT play FROM table_name_59 WHERE base = "athens" AND company = "dance theatre roes" | sql_create_context |
CREATE TABLE table_13083 (
"Date (dd.mm.yyyy)" text,
"Soviet Unit" text,
"Aircraft flown" text,
"Enemy Aircraft" text,
"Axis Unit" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the enemy aircraft on 14.09.1942, when the Soviet Unit was 437... | SELECT "Enemy Aircraft" FROM table_13083 WHERE "Soviet Unit" = '437 iap' AND "Date (dd.mm.yyyy)" = '14.09.1942' | wikisql |
CREATE TABLE table_51119 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where does Bob Tway Place?
| SELECT "Place" FROM table_51119 WHERE "Player" = 'bob tway' | wikisql |
CREATE TABLE table_name_84 (
opponents VARCHAR,
date VARCHAR,
score VARCHAR,
competition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Score of 2-1, and a Competition of pl, and a Date of december 22, 2006 had what opponents?
| SELECT opponents FROM table_name_84 WHERE score = "2-1" AND competition = "pl" AND date = "december 22, 2006" | sql_create_context |
CREATE TABLE table_6543 (
"Year" real,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total numbe rof years for gaby weissen mir... | SELECT COUNT("Year") FROM table_6543 WHERE "Women's doubles" = 'gaby weissen mireille kosmala' | wikisql |
CREATE TABLE table_name_29 (
played VARCHAR,
goal_difference VARCHAR,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Played number had a goal difference of more than 0 when the club was Valencia CF?
| SELECT COUNT(played) FROM table_name_29 WHERE goal_difference > 0 AND club = "valencia cf" | sql_create_context |
CREATE TABLE table_name_96 (
nationality VARCHAR,
player VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the nationality of five-eighth player Darren Lockyer?
| SELECT nationality FROM table_name_96 WHERE player = "darren lockyer" AND position = "five-eighth" | sql_create_context |
CREATE TABLE table_name_42 (
weight VARCHAR,
club VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the weight of the player from the vk primorac kotor club?
| SELECT weight FROM table_name_42 WHERE club = "vk primorac kotor" | sql_create_context |
CREATE TABLE table_204_575 (
id number,
"place" number,
"position" text,
"number" number,
"name" text,
"league one" number,
"fa cup" number,
"league cup" number,
"football league trophy" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tabl... | SELECT AVG("league one") FROM table_204_575 | squall |
CREATE TABLE table_29477 (
"Team" text,
"Outgoing head coach" text,
"Manner of departure" text,
"Date of vacancy" text,
"Position in table" real,
"Incoming head coach" text,
"Date of appointment" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-... | SELECT "Team" FROM table_29477 WHERE "Date of vacancy" = '8 Dec 2010' | wikisql |
CREATE TABLE table_name_30 (
pages INTEGER,
vol__number VARCHAR,
isbn VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many pages does the edition with a volume # smaller than 8 and an ISBM of 1-40122-892-5 have?
| SELECT SUM(pages) FROM table_name_30 WHERE vol__number < 8 AND isbn = "1-40122-892-5" | sql_create_context |
CREATE TABLE city (
city_id number,
city text,
hanzi text,
hanyu_pinyin text,
regional_population number,
gdp number
)
CREATE TABLE hosting_city (
year number,
match_id number,
host_city text
)
CREATE TABLE temperature (
city_id number,
jan number,
feb number,
mar n... | SELECT host_city FROM hosting_city ORDER BY year DESC LIMIT 1 | spider |
CREATE TABLE table_22670216_1 (
location VARCHAR,
winning_driver VARCHAR,
track VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If the track is the Wisconsin State Fair Park Speedway and the winning driver is Wally Dallenbach, what was the location?
| SELECT location FROM table_22670216_1 WHERE winning_driver = "Wally Dallenbach" AND track = "Wisconsin State Fair Park Speedway" | sql_create_context |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bone fracture(s) - ribs' AND DATETIME(diagnosis.di... | eicu |
CREATE TABLE club (
club_id number,
name text,
region text,
start_year text
)
CREATE TABLE competition_result (
competition_id number,
club_id_1 number,
club_id_2 number,
score text
)
CREATE TABLE competition (
competition_id number,
year number,
competition_type text,
... | SELECT COUNT(*) FROM club | spider |
CREATE TABLE table_26352332_4 (
years_produced VARCHAR,
cylinder_layout VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The cylinder layout v8 is produced in what years?
| SELECT years_produced FROM table_26352332_4 WHERE cylinder_layout = "V8" | sql_create_context |
CREATE TABLE table_17616 (
"Rank" real,
"Fastest time (s)" text,
"Wind (m/s)" text,
"Athlete" text,
"Nation" text,
"Date" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the athlete from Edwardsville?
| SELECT "Athlete" FROM table_17616 WHERE "Location" = 'Edwardsville' | wikisql |
CREATE TABLE table_51242 (
"Year" text,
"Name" text,
"Film" text,
"Role" text,
"Status" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year did Miyoshi Umeki make a film?
| SELECT "Year" FROM table_51242 WHERE "Name" = 'miyoshi umeki' | wikisql |
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 text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Incision of vessel, aorta" | mimicsql_data |
CREATE TABLE table_28789 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Patient Portrayer" text,
"Original air date" text,
"Production code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the origin... | SELECT "Original air date" FROM table_28789 WHERE "Title" = 'Monica Wilder' | wikisql |
CREATE TABLE table_66220 (
"Round" real,
"Pick #" real,
"Player" text,
"Position" text,
"College" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the round when the pick # is less than 236 and the position is offensive guard?
| SELECT AVG("Round") FROM table_66220 WHERE "Pick #" < '236' AND "Position" = 'offensive guard' | wikisql |
CREATE TABLE table_name_10 (
team__number2 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the 1st leg for antwerp bc
| SELECT 1 AS st_leg FROM table_name_10 WHERE team__number2 = "antwerp bc" | sql_create_context |
CREATE TABLE table_13383 (
"Draw" real,
"Language" text,
"Artist" text,
"Song" text,
"English translation" text,
"Place" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which artist speaks croatian?
| SELECT "Artist" FROM table_13383 WHERE "Language" = 'croatian' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.