table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_19059 (
"Team" text,
"Stadium" text,
"Capacity" real,
"Highest" real,
"Lowest" real,
"Average" real
) | what's the team with stadium being borough briggs | SELECT "Team" FROM table_19059 WHERE "Stadium" = 'Borough Briggs' |
CREATE TABLE table_60124 (
"Name" text,
"Volume" text,
"Engine" text,
"Fuel" text,
"Output" text,
"Torque" text,
"Engine ID code(s)" text,
"0\u2013100km/h,s" real,
"Top speed" text,
"CO 2" text,
"Years" text
) | Which Fuel has an Output of ps (kw; hp) @6000 rpm? | SELECT "Fuel" FROM table_60124 WHERE "Output" = 'ps (kw; hp) @6000 rpm' |
CREATE TABLE Faculty (
Rank VARCHAR,
building VARCHAR
) | How many Professors are in building NEB? | SELECT COUNT(*) FROM Faculty WHERE Rank = "Professor" AND building = "NEB" |
CREATE TABLE table_55105 (
"Team" text,
"City/Area" text,
"Arena" text,
"Capacity" text,
"Last season" text
) | What is the capacity for the arena in Chester? | SELECT "Capacity" FROM table_55105 WHERE "City/Area" = 'chester' |
CREATE TABLE table_203_784 (
id number,
"no. in\nseries" number,
"no. in\nseason" number,
"performer" text,
"appearance" text,
"air date" text
) | how many episodes only had one performer ? | SELECT COUNT(*) FROM table_203_784 |
CREATE TABLE table_name_80 (
driver VARCHAR,
race_1 VARCHAR,
points VARCHAR,
team VARCHAR
) | Which driver for Bob Holden Motors has fewer than 36 points and placed 7 in race 1? | SELECT driver FROM table_name_80 WHERE points < 36 AND team = "bob holden motors" AND race_1 = "7" |
CREATE TABLE table_14070062_3 (
losing_bonus VARCHAR,
won VARCHAR
) | What's the losing bonus count for the club with 9 won games? | SELECT losing_bonus FROM table_14070062_3 WHERE won = "9" |
CREATE TABLE table_name_15 (
total VARCHAR,
name VARCHAR
) | What is the total when the name is Carl Robinson Category:Articles with hcards? | SELECT total FROM table_name_15 WHERE name = "carl robinson category:articles with hcards" |
CREATE TABLE table_29261215_4 (
points INTEGER,
peeter_vähi VARCHAR
) | What is the maximum points received when Peeter V hl gave a 9? | SELECT MIN(points) FROM table_29261215_4 WHERE peeter_vähi = 9 |
CREATE TABLE table_29630 (
"#" real,
"No." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Viewers" real,
"Original airdate" text,
"Prod. code" real
) | What is the smallest numbered episode in the series listed? | SELECT MIN("#") FROM table_29630 |
CREATE TABLE Customers (
Customer_ID INTEGER,
Customer_Details VARCHAR(255)
)
CREATE TABLE Claims (
Claim_ID INTEGER,
Policy_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed INTEGER,
Amount_Settled INTEGER
)
CREATE TABLE Payments (
Payment_ID INTEGER,
S... | Calculate the average amount for all the payments processed with Visa of each day of week using a bar chart, and display y-axis in asc order. | SELECT Date_Payment_Made, AVG(Amount_Payment) FROM Payments WHERE Payment_Method_Code = 'Visa' ORDER BY AVG(Amount_Payment) |
CREATE TABLE loan (
cust_id VARCHAR
)
CREATE TABLE customer (
cust_name VARCHAR,
credit_score VARCHAR,
cust_id VARCHAR
) | Find the name and credit score of the customers who have some loans. | SELECT DISTINCT T1.cust_name, T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id = T2.cust_id |
CREATE TABLE table_58195 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Who is the away team that played home team Hawthorn? | SELECT "Away team" FROM table_58195 WHERE "Home team" = 'hawthorn' |
CREATE TABLE table_name_59 (
venue VARCHAR,
away_team VARCHAR
) | In what venue was the hosted away team Essendon? | SELECT venue FROM table_name_59 WHERE away_team = "essendon" |
CREATE TABLE table_train_10 (
"id" int,
"severe_sepsis" bool,
"consent" bool,
"raising_legs_or_head" bool,
"intention_to_arterial_catheter" bool,
"allergy_to_adhesive" bool,
"intention_to_central_venous_catheter" bool,
"septic_shock" bool,
"age" float,
"NOUSE" float
) | children under the age of 18 will not be included in this study | SELECT * FROM table_train_10 WHERE age >= 18 |
CREATE TABLE table_11677691_9 (
school VARCHAR,
hometown VARCHAR
) | Which school is located in the hometown of Centerville, Ohio? | SELECT school FROM table_11677691_9 WHERE hometown = "Centerville, Ohio" |
CREATE TABLE table_203_313 (
id number,
"name" text,
"pennant" text,
"builder" text,
"launched" text,
"original name" text,
"fate" text
) | which other ship was launched in the same year as the wave victor ? | SELECT "name" FROM table_203_313 WHERE "name" <> 'wave victor' AND "launched" = (SELECT "launched" FROM table_203_313 WHERE "name" = 'wave victor') |
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,
... | how many patients underwent lymphs lab test? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Lymphs" |
CREATE TABLE table_name_6 (
Id VARCHAR
) | What 1935 has 4 as a 1953? | SELECT 1935 FROM table_name_6 WHERE 1953 = "4" |
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),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END... | For those employees who did not have any job in the past, a bar chart shows the distribution of hire_date and the average of salary bin hire_date by weekday, rank by the mean salary from high to low please. | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(SALARY) DESC |
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... | Draw a bar chart about the distribution of Name and Height , and rank y-axis in descending order. | SELECT Name, Height FROM people ORDER BY Height DESC |
CREATE TABLE table_68179 (
"Year" real,
"Winner" text,
"Jockey" text,
"Trainer" text,
"Owner" text,
"Distance (Miles)" text,
"Time" text
) | Who was the trainer when Crowd Pleaser won? | SELECT "Trainer" FROM table_68179 WHERE "Winner" = 'crowd pleaser' |
CREATE TABLE table_name_36 (
part_2 VARCHAR,
class VARCHAR
) | What is the part 2 entry for class 3a? | SELECT part_2 FROM table_name_36 WHERE class = "3a" |
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER
)
CREATE TABLE Products (
product_id INTEGER,
product_type_code VARCHAR(10),
product_name VARCHAR(80),
product_price DECIMAL(19,4)
)
CREATE TABLE Customer_Addresses (
customer_id INTEGER,
address... | Return the average price for each product type by a pie chart. | SELECT product_type_code, AVG(product_price) FROM Products GROUP BY product_type_code |
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
) | For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and manufacturer , and group by attribute name. | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name |
CREATE TABLE table_28768 (
"Season #" real,
"Series #" real,
"Episode title" text,
"Original air date" text,
"Nick prod. #" real
) | What date did season 12 premiere? | SELECT "Original air date" FROM table_28768 WHERE "Season #" = '12' |
CREATE TABLE table_27083 (
"Year" real,
"Engine" text,
"Power" text,
"Torque" text,
"Transmission" text,
"0\u2013100km/h (60mph)" text,
"Top speed" text,
"CO2" text
) | when0 100km/h (60mph) is 5.5 seconds (5.2), whats is the top speed? | SELECT "Top speed" FROM table_27083 WHERE "0\u2013100km/h (60mph)" = '5.5 seconds (5.2)' |
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
... | The Core classes , who is teaching them next Winter ? | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr... |
CREATE TABLE table_train_236 (
"id" int,
"renal_disease" bool,
"creatinine_clearance_cl" float,
"estimated_glomerular_filtration_rate_egfr" int,
"hba1c" float,
"fbg" int,
"NOUSE" float
) | impaired renal function with a creatinine level > 1.5 . | SELECT * FROM table_train_236 WHERE renal_disease = 1 AND creatinine_clearance_cl > 1.5 |
CREATE TABLE department (
dept_name VARCHAR,
budget VARCHAR
) | Which department has the lowest budget? | SELECT dept_name FROM department ORDER BY budget LIMIT 1 |
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 lab (
subject_id text,
hadm_id text,
... | how many patients had oxyc10 as their drug code? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "OXYC10" |
CREATE TABLE table_name_87 (
name VARCHAR,
lane VARCHAR
) | What is the name of the swimmer in lane 6? | SELECT name FROM table_name_87 WHERE lane = 6 |
CREATE TABLE table_13388681_1 (
to_par VARCHAR,
country VARCHAR,
winning_score VARCHAR
) | What is the number of 'to par' in Mexico with a winning score of 67-67-69-70=273? | SELECT to_par FROM table_13388681_1 WHERE country = "Mexico" AND winning_score = 67 - 67 - 69 - 70 = 273 |
CREATE TABLE table_45862 (
"Player" text,
"Club" text,
"Games" real,
"Goals" real,
"Assists" real,
"Points" real
) | What is Goals, when Assists is greater than 28, and when Player is Steve Walker? | SELECT "Goals" FROM table_45862 WHERE "Assists" > '28' AND "Player" = 'steve walker' |
CREATE TABLE film_market_estimation (
Estimation_ID int,
Low_Estimate real,
High_Estimate real,
Film_ID int,
Type text,
Market_ID int,
Year int
)
CREATE TABLE market (
Market_ID int,
Country text,
Number_cities int
)
CREATE TABLE film (
Film_ID int,
Title text,
Stud... | Use a stacked bar chart to show how many films for each title and each type. The x-axis is title. | SELECT Title, COUNT(Title) FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Type, Title |
CREATE TABLE table_27019 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
) | Name the surface for nathalie tauziat | SELECT "Surface" FROM table_27019 WHERE "Partner" = 'Nathalie Tauziat' |
CREATE TABLE table_29923 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What's the record in the game where Greg Monroe (8) did the high rebounds? | SELECT "Record" FROM table_29923 WHERE "High rebounds" = 'Greg Monroe (8)' |
CREATE TABLE table_22784 (
"No." real,
"#" real,
"Title" text,
"Directed by" text,
"Written by" text,
"U.S. air date" text,
"Production code" text,
"U.S. viewers (million)" text
) | When there are 3.39 million u.s viewers what is the production code? | SELECT "Production code" FROM table_22784 WHERE "U.S. viewers (million)" = '3.39' |
CREATE TABLE table_name_76 (
crowd VARCHAR,
away_team VARCHAR
) | How big was the crowd in game that featured the visiting team of north melbourne? | SELECT crowd FROM table_name_76 WHERE away_team = "north melbourne" |
CREATE TABLE table_name_16 (
catalog VARCHAR,
region VARCHAR,
label VARCHAR
) | What is Catalog, when the Region is UK, and when Label is Razor Records? | SELECT catalog FROM table_name_16 WHERE region = "uk" AND label = "razor records" |
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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttim... | how many hours has passed since the first time patient 8888 visited careunit tsicu on this hospital encounter? | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8888 AND admissions.dischtime IS NULL) AND transfers.careunit = 'tsicu' ORDER BY transfers.intime LIMIT 1 |
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 dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
... | list all the airlines that fly into MKE | SELECT DISTINCT airline.airline_code FROM airline, airport, flight WHERE airport.airport_code = 'MKE' AND flight.airline_code = airline.airline_code AND flight.to_airport = airport.airport_code |
CREATE TABLE photos (
id int,
camera_lens_id int,
mountain_id int,
color text,
name text
)
CREATE TABLE mountain (
id int,
name text,
Height real,
Prominence real,
Range text,
Country text
)
CREATE TABLE camera_lens (
id int,
brand text,
name text,
focal_len... | Show me a pie chart for what is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos. | SELECT T1.name, COUNT(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY COUNT(*) |
CREATE TABLE race (
race_id number,
name text,
class text,
date text,
track_id text
)
CREATE TABLE track (
track_id number,
name text,
location text,
seating number,
year_opened number
) | Show the name of track with most number of races. | SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id = T2.track_id GROUP BY T1.track_id ORDER BY COUNT(*) DESC LIMIT 1 |
CREATE TABLE table_67351 (
"Date" text,
"City" text,
"Event" text,
"Winner" text,
"Prize" text
) | What is the City, when the Prize is 880,000? | SELECT "City" FROM table_67351 WHERE "Prize" = '€880,000' |
CREATE TABLE table_1500146_1 (
rhel_release_date VARCHAR,
scientific_linux_release VARCHAR
) | When is the rhel release date when scientific linux release is 3.0.4 | SELECT rhel_release_date FROM table_1500146_1 WHERE scientific_linux_release = "3.0.4" |
CREATE TABLE broadcast (
channel_id number,
program_id number,
time_of_day text
)
CREATE TABLE broadcast_share (
channel_id number,
program_id number,
date text,
share_in_percent number
)
CREATE TABLE program (
program_id number,
name text,
origin text,
launch number,
o... | List all channel names ordered by their rating in percent from big to small. | SELECT name FROM channel ORDER BY rating_in_percent DESC |
CREATE TABLE table_35572 (
"Position" real,
"Pilot" text,
"Glider" text,
"Speed" text,
"Distance" text
) | What is the lowest position for bruce taylor? | SELECT MIN("Position") FROM table_35572 WHERE "Pilot" = 'bruce taylor' |
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... | Can you draw the trend of the average of capacity over the openning year?, and show by the X in ascending. | SELECT Openning_year, AVG(Capacity) FROM cinema ORDER BY Openning_year |
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... | how many patients aged below 72 years died in or before the year 2168? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "72" AND demographic.dod_year <= "2168.0" |
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE swimme... | Give me the comparison about the sum of ID over the Nationality , and group by attribute Nationality, could you order in descending by the Y-axis please? | SELECT Nationality, SUM(ID) FROM swimmer GROUP BY Nationality ORDER BY SUM(ID) DESC |
CREATE TABLE table_204_562 (
id number,
"no." number,
"date" text,
"location" text,
"surface" text,
"opponent in final" text,
"score" text
) | what is the top ranked location ? | SELECT "location" FROM table_204_562 WHERE "no." = 1 |
CREATE TABLE ref_service_types (
service_type_code text,
parent_service_type_code text,
service_type_description text
)
CREATE TABLE marketing_regions (
marketing_region_code text,
marketing_region_name text,
marketing_region_descriptrion text,
other_details text
)
CREATE TABLE bookings (
... | What are the names of the workshop groups that have bookings with status code 'stop'? | SELECT T2.store_name FROM bookings AS T1 JOIN drama_workshop_groups AS T2 ON T1.workshop_group_id = T2.workshop_group_id WHERE T1.status_code = "stop" |
CREATE TABLE table_180802_3 (
color VARCHAR,
planet VARCHAR
) | What is the color of the planet venus? | SELECT color FROM table_180802_3 WHERE planet = "Venus" |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeou... | so whats the first weight of patient 002-59265 until 36 months ago? | SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-59265') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime) <= DATETIME(CURRENT_TIME(), '-36 month') ORDER BY patient.unita... |
CREATE TABLE table_448 (
"Character(s)" text,
"First Appearance" text,
"Cover Date" text,
"Publisher" text,
"Estimated Value" text
) | what is the total number of publisher where first appearance is daredevil #1 | SELECT COUNT("Publisher") FROM table_448 WHERE "First Appearance" = 'Daredevil #1' |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text... | how many prescriptions have been written for potassium chl 40 meq / 1000 ml ns until 3 years ago? | SELECT COUNT(*) FROM prescriptions WHERE prescriptions.drug = 'potassium chl 40 meq / 1000 ml ns' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-3 year') |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25... | For those employees who was hired before 2002-06-21, give me the comparison about the average of manager_id over the hire_date bin hire_date by weekday, order by the y-axis in descending. | SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(MANAGER_ID) DESC |
CREATE TABLE table_33593 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What did the away team score when the home team scored 9.18 (72)? | SELECT "Away team score" FROM table_33593 WHERE "Home team score" = '9.18 (72)' |
CREATE TABLE table_41791 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" real,
"Goals" real
) | Which Goals have a Name of lee dong-gook? | SELECT MAX("Goals") FROM table_41791 WHERE "Name" = 'lee dong-gook' |
CREATE TABLE table_47613 (
"Date" text,
"Competition" text,
"Winners" text,
"Score" text,
"Runners-up" text
) | Who were the runners-up in the game that was won by Cork City F.C. on 10/05/1998? | SELECT "Runners-up" FROM table_47613 WHERE "Winners" = 'cork city f.c.' AND "Date" = '10/05/1998' |
CREATE TABLE buildings (
id int,
name text,
City text,
Height int,
Stories int,
Status text
)
CREATE TABLE Office_locations (
building_id int,
company_id int,
move_in_year int
)
CREATE TABLE Companies (
id int,
name text,
Headquarters text,
Industry text,
Sales_... | List the number of companies for each building in a bar chart, and show by the the number of name in descending. | SELECT T2.name, COUNT(T2.name) FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T2.name ORDER BY COUNT(T2.name) DESC |
CREATE TABLE table_18797 (
"Player" text,
"Played" real,
"Sets Won" real,
"Sets Lost" real,
"Legs Won" real,
"Legs Lost" real,
"100+" real,
"140+" real,
"180s" real,
"High Checkout" real,
"3-dart Average" text
) | what's the minimum 180s value | SELECT MIN("180s") FROM table_18797 |
CREATE TABLE table_name_49 (
date VARCHAR,
record VARCHAR
) | Which Date has a Record of 7 7 1? | SELECT date FROM table_name_49 WHERE record = "7–7–1" |
CREATE TABLE table_40695 (
"Region" text,
"Host" text,
"Venue" text,
"City" text,
"State" text
) | Mideast region host University of Tennessee is in what state? | SELECT "State" FROM table_40695 WHERE "Region" = 'mideast' AND "Host" = 'university of tennessee' |
CREATE TABLE table_25966 (
"Year" real,
"Host City" text,
"Host School" text,
"Champion" text,
"Second Place" text,
"Third Place" text
) | Who were the champions in years where michigan technological university was in third place? | SELECT "Champion" FROM table_25966 WHERE "Third Place" = 'Michigan Technological University' |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE cost (
costid number,
uniquepi... | have any organisms been found in the first sputum, tracheal specimen, microbiology test of patient 031-17834 since 132 months ago? | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-17834')) AND microlab.culturesite = 'sputum, tracheal specimen' AND DATETI... |
CREATE TABLE table_41635 (
"Driver" text,
"NOR 1" text,
"NOR 2" text,
"ZAN 1" text,
"ZAN 2" text,
"N\u00dcR 1" text,
"N\u00dcR 2" text
) | What is the zan 1 that has 11 as the nor 1? | SELECT "ZAN 1" FROM table_41635 WHERE "NOR 1" = '11' |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | what is the number of divorced patients who have heart valve transplant diagnoses? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "DIVORCED" AND diagnoses.short_title = "Heart valve transplant" |
CREATE TABLE table_name_47 (
markatal INTEGER,
inhabitants_per_km² VARCHAR,
area__in_km²_ VARCHAR
) | What is the sum of Markatal, when Inhabitants Per Km is less than 13, and when Area (in Km ) is 27? | SELECT SUM(markatal) FROM table_name_47 WHERE inhabitants_per_km² < 13 AND area__in_km²_ = 27 |
CREATE TABLE table_name_97 (
score VARCHAR,
opponent VARCHAR
) | Can you tell me the Score that has the Opponent of at edmonton oilers? | SELECT score FROM table_name_97 WHERE opponent = "at edmonton oilers" |
CREATE TABLE table_name_24 (
player VARCHAR,
previous_team VARCHAR
) | Which player was previously on the New York Knicks? | SELECT player FROM table_name_24 WHERE previous_team = "new york knicks" |
CREATE TABLE endowment (
endowment_id number,
school_id number,
donator_name text,
amount number
)
CREATE TABLE budget (
school_id number,
year number,
budgeted number,
total_budget_percent_budgeted number,
invested number,
total_budget_percent_invested number,
budget_invest... | List all the names of schools with an endowment amount smaller than or equal to 10. | SELECT T2.school_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T1.school_id HAVING SUM(T1.amount) <= 10 |
CREATE TABLE table_68025 (
"Year" real,
"Result" text,
"Award" text,
"Category" text,
"Nominated work" text
) | what is the award for the 2009 songwriter of the year? | SELECT "Award" FROM table_68025 WHERE "Year" = '2009' AND "Category" = 'songwriter of the year' |
CREATE TABLE table_name_67 (
date VARCHAR,
home VARCHAR
) | What was the date of the home game for Colorado? | SELECT date FROM table_name_67 WHERE home = "colorado" |
CREATE TABLE table_name_70 (
tournament VARCHAR,
location VARCHAR
) | What tournament is in Arizona? | SELECT tournament FROM table_name_70 WHERE location = "arizona" |
CREATE TABLE table_name_29 (
years_for_jazz VARCHAR,
player VARCHAR
) | What years did Troy Hudson play for the Jazz? | SELECT years_for_jazz FROM table_name_29 WHERE player = "troy hudson" |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
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),
... | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find hire_date and the sum of manager_id bin hire_date by time, and visualize them by a bar chart. | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 |
CREATE TABLE table_name_98 (
loss VARCHAR,
record VARCHAR
) | What was the loss of the Mariners game when they had a record of 21-34? | SELECT loss FROM table_name_98 WHERE record = "21-34" |
CREATE TABLE table_name_67 (
circuit VARCHAR,
winning_team VARCHAR,
fastest_lap VARCHAR
) | What circuit did marlboro team penske win with an unknown fastest lap? | SELECT circuit FROM table_name_67 WHERE winning_team = "marlboro team penske" AND fastest_lap = "unknown" |
CREATE TABLE Products (
Product_Type_Code VARCHAR,
Product_Price INTEGER
) | Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000. | SELECT Product_Type_Code FROM Products WHERE Product_Price > 4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price < 3000 |
CREATE TABLE table_23384 (
"Ballpark" text,
"Location" text,
"Team" text,
"Opened" real,
"Closed" real,
"Demod" real,
"Current Status" text
) | How many locations have been used for ballparks named Memorial Stadium? | SELECT COUNT("Location") FROM table_23384 WHERE "Ballpark" = 'Memorial Stadium' |
CREATE TABLE table_name_22 (
finish VARCHAR,
franchise VARCHAR,
year VARCHAR,
league VARCHAR,
percentage VARCHAR
) | What was the Finish when NL was the League, the Percentage was under 0.726, the Year was larger than 1897, and the Franchies was the Pittsburgh Pirates? | SELECT finish FROM table_name_22 WHERE league = "nl" AND percentage < 0.726 AND year > 1897 AND franchise = "pittsburgh pirates" |
CREATE TABLE table_train_253 (
"id" int,
"pregnancy_or_lactation" bool,
"pre_eclampsia" bool,
"acute_ischemia" bool,
"pre_gestational_hypertension" bool,
"diabetic" string,
"smoking" bool,
"coronary_artery_disease_cad" bool,
"NOUSE" float
) | pregnant female with pre _ gestational hypertension. | SELECT * FROM table_train_253 WHERE pregnancy_or_lactation = 1 AND pre_gestational_hypertension = 1 |
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE medication (
medi... | is the respiration in patient 021-246447 normal on 12/15/2104? | 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 = '021-246447')) AND vitalperiodic.respiration BETWEEN respiration_lowe... |
CREATE TABLE swimmer (
id number,
name text,
nationality text,
meter_100 number,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
time text
)
CREATE TABLE stadium (
id number,
name text,
capacity number,
city tex... | Find the names of all swimmers, sorted by their 100 meter scores in ascending order. | SELECT name FROM swimmer ORDER BY meter_100 |
CREATE TABLE table_41933 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) | What is the highest Points in Position 2 with more than 3 Drawn games? | SELECT MAX("Points") FROM table_41933 WHERE "Position" = '2' AND "Drawn" > '3' |
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 (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | what is gender and drug code of subject id 2560? | SELECT demographic.gender, prescriptions.formulary_drug_cd FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.subject_id = "2560" |
CREATE TABLE department (
dept_code text,
dept_name text,
school_code text,
emp_num number,
dept_address text,
dept_extension text
)
CREATE TABLE class (
class_code text,
crs_code text,
class_section text,
class_time text,
class_room text,
prof_num number
)
CREATE TABLE... | How many credits does course CIS-220 have, and what its description? | SELECT crs_credit, crs_description FROM course WHERE crs_code = 'CIS-220' |
CREATE TABLE table_name_87 (
pick INTEGER,
nfl_club VARCHAR,
round VARCHAR
) | What is the highest pick of the houston oilers NFL club, which has a round greater than 10? | SELECT MAX(pick) FROM table_name_87 WHERE nfl_club = "houston oilers" AND round > 10 |
CREATE TABLE table_47962 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | Which round has more than 79 overall and a position of QB? | SELECT "Round" FROM table_47962 WHERE "Position" = 'qb' AND "Overall" > '79' |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
hig... | are there any flights next monday morning from PITTSBURGH to SAN FRANCISCO | 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 ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 21 AND date_day.month_number = ... |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name var... | list the flights from HOUSTON to ST. PAUL | 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 = 'HOUSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. PA... |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | Graph: Unanswered questions by Length. | SELECT t.range AS "score_range", COUNT(*) AS "number_of_occurences" FROM (SELECT CASE WHEN LENGTH(Body) BETWEEN 0 AND 100 THEN ' 0-100' WHEN LENGTH(Body) BETWEEN 101 AND 200 THEN '101-200' WHEN LENGTH(Body) BETWEEN 201 AND 300 THEN '201-300' WHEN LENGTH(Body) BETWEEN 301 AND 400 THEN '301-400' WHEN LENGTH(Body) BETWEEN... |
CREATE TABLE table_78987 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
) | What is the total number of goals for when the drawn is less than 7, less than 21 games have been lost, and there are 1 of 33 points? | SELECT COUNT("Goals For") FROM table_78987 WHERE "Drawn" < '7' AND "Lost" < '21' AND "Points 1" = '33' |
CREATE TABLE table_2562572_26 (
dominant_religion__2002_ VARCHAR,
settlement VARCHAR
) | What is the dominant religion in Gornji Tavankut? | SELECT dominant_religion__2002_ FROM table_2562572_26 WHERE settlement = "Gornji Tavankut" |
CREATE TABLE table_name_79 (
outcome VARCHAR,
partnering VARCHAR,
date VARCHAR
) | Name the outcome for jordan kerr july 19, 2004 | SELECT outcome FROM table_name_79 WHERE partnering = "jordan kerr" AND date = "july 19, 2004" |
CREATE TABLE movie (
movie_id number,
title text,
year number,
director text,
budget_million number,
gross_worldwide number
)
CREATE TABLE culture_company (
company_name text,
type text,
incorporated_in text,
group_equity_shareholding number,
book_club_id text,
movie_id ... | How many books fall into each category? | SELECT category, COUNT(*) FROM book_club GROUP BY category |
CREATE TABLE table_name_22 (
apps INTEGER,
season VARCHAR,
goals VARCHAR
) | What is the most apps that a has a total season and 3 goals? | SELECT MAX(apps) FROM table_name_22 WHERE season = "total" AND goals > 3 |
CREATE TABLE table_204_302 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | which is the only nation to win a gold medal and nothing else ? | SELECT "nation" FROM table_204_302 WHERE "gold" = 1 AND "silver" = 0 AND "bronze" = 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.