table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_name_26 (
tickets_sold___available VARCHAR,
gross_revenue__1979_ VARCHAR
) | Which venue has Tickets Sold/ Available with a Gross Revenue (1979) of $665,232? | SELECT tickets_sold___available FROM table_name_26 WHERE gross_revenue__1979_ = "$665,232" |
CREATE TABLE table_76644 (
"Target/Approach" text,
"Candidate Name" text,
"Trial Phase" text,
"Trial Start Date" text,
"Expected End Date" text
) | What is Candidate Name, when Target/Approach is 'vaccine to amyloid-beta'? | SELECT "Candidate Name" FROM table_76644 WHERE "Target/Approach" = 'vaccine to amyloid-beta' |
CREATE TABLE table_40896 (
"Rank" real,
"Name" text,
"Years" text,
"Matches" text,
"Goals" real
) | Can you tell me the Matches that has the Rank smaller than 6, and the Years of 1943-62? | SELECT "Matches" FROM table_40896 WHERE "Rank" < '6' AND "Years" = '1943-62' |
CREATE TABLE table_name_33 (
model VARCHAR,
displacement VARCHAR
) | What model has an engine of 1,868 cc? | SELECT model FROM table_name_33 WHERE displacement = "1,868 cc" |
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,
... | calculate the five year survival rate among the patients who were prescribed protonix after they were diagnosed with hypokalemia - severe ( < 2.8 meq/dl). | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 5 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid... |
CREATE TABLE table_37136 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | What was the location of the bout that lasted 5:00 and led to a 6-2-1 record? | SELECT "Location" FROM table_37136 WHERE "Time" = '5:00' AND "Record" = '6-2-1' |
CREATE TABLE table_name_10 (
active_pixels VARCHAR,
model VARCHAR
) | What are the active pixels of the cantare model? | SELECT active_pixels FROM table_name_10 WHERE model = "cantare" |
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnon... | What tags have the highest percentage of 'rookies' asking questions?. | SELECT t.TagName, COUNT(p.Id) AS question_count, SUM(CASE WHEN u.Reputation <= 10 THEN 1.000 ELSE 0.000 END) AS low_rep, AVG(CASE WHEN u.Reputation <= 10 THEN 1.000 ELSE 0.000 END) AS low_rep_pct FROM Posts AS p INNER JOIN Users AS u ON u.Id = p.OwnerUserId INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags ... |
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org... | what was the name of the drug prescribed to patient 7112, two or more times during this month? | SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7112) AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 m... |
CREATE TABLE table_57881 (
"Season" text,
"Match" text,
"Result" text,
"League" text,
"Date" text
) | What match was on 30 january 1938? | SELECT "Match" FROM table_57881 WHERE "Date" = '30 january 1938' |
CREATE TABLE table_12294557_3 (
canadian_airdate VARCHAR,
us_airdate VARCHAR
) | what are all the Canadian air dates where the u.s. air date is may 1, 2009 | SELECT canadian_airdate FROM table_12294557_3 WHERE us_airdate = "May 1, 2009" |
CREATE TABLE table_2668243_18 (
district VARCHAR,
party VARCHAR
) | Name the district for anti-jacksonian | SELECT district FROM table_2668243_18 WHERE party = "Anti-Jacksonian" |
CREATE TABLE table_name_76 (
representative VARCHAR,
party VARCHAR
) | Name the representative for party of whig | SELECT representative FROM table_name_76 WHERE party = "whig" |
CREATE TABLE table_23793770_2 (
rating VARCHAR,
total_viewers__in_millions_ VARCHAR
) | What was the reating share when the total viewers was 11.49 million? | SELECT rating / SHARE(18 AS –49) FROM table_23793770_2 WHERE total_viewers__in_millions_ = "11.49" |
CREATE TABLE table_name_88 (
name VARCHAR,
cerclis_id VARCHAR
) | Which site has the CERCLIS ID fld004092532? | SELECT name FROM table_name_88 WHERE cerclis_id = "fld004092532" |
CREATE TABLE table_7110 (
"Year" real,
"Conventional plans" text,
"HMOs" text,
"PPOs" text,
"POS plans" text
) | How many years have HMOs been 27% and POS plans 18%? | SELECT COUNT("Year") FROM table_7110 WHERE "HMOs" = '27%' AND "POS plans" = '18%' |
CREATE TABLE table_69840 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Rank" text,
"Wins" real
) | Which team had fewer than 167 points in the 250cc class? | SELECT "Team" FROM table_69840 WHERE "Points" < '167' AND "Class" = '250cc' |
CREATE TABLE table_65492 (
"Team" text,
"Played" real,
"Highest" real,
"Lowest" real,
"Total" real,
"Average" real
) | What is the average for the team with highest less than 13,500 and games played are fewer than 5? | SELECT MIN("Average") FROM table_65492 WHERE "Highest" < '13,500' AND "Played" < '5' |
CREATE TABLE Products (
product_id INTEGER,
product_details VARCHAR(255)
)
CREATE TABLE Customers (
customer_id INTEGER,
payment_method VARCHAR(15),
customer_name VARCHAR(80),
date_became_customer DATETIME,
other_customer_details VARCHAR(255)
)
CREATE TABLE Addresses (
address_id INTEG... | A bar chart for what are the number of the dates when customers with ids between 10 and 20 became customers? | SELECT date_became_customer, COUNT(date_became_customer) FROM Customers WHERE customer_id BETWEEN 10 AND 20 |
CREATE TABLE catalog_contents_additional_attributes (
catalog_entry_id number,
catalog_level_number number,
attribute_id number,
attribute_value text
)
CREATE TABLE attribute_definitions (
attribute_id number,
attribute_name text,
attribute_data_type text
)
CREATE TABLE catalog_contents (
... | Find the attribute data type for the attribute named 'Green'. | SELECT attribute_data_type FROM attribute_definitions WHERE attribute_name = "Green" |
CREATE TABLE table_69934 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) | Who was the opponent on December 17, 1995? | SELECT "Opponent" FROM table_69934 WHERE "Date" = 'december 17, 1995' |
CREATE TABLE table_name_42 (
COUNT VARCHAR,
winner VARCHAR
) | How many events did clay win? | SELECT NOT COUNT AS event FROM table_name_42 WHERE winner = "clay" |
CREATE TABLE table_name_74 (
decile INTEGER,
name VARCHAR
) | What is the avererage decile of Francis Douglas Memorial College? | SELECT AVG(decile) FROM table_name_74 WHERE name = "francis douglas memorial college" |
CREATE TABLE table_name_56 (
cover_model VARCHAR,
pictorials VARCHAR
) | Which Cover model has a Pictorials of brande roderick-pmoy, naked news? | SELECT cover_model FROM table_name_56 WHERE pictorials = "brande roderick-pmoy, naked news" |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | let me know the birth date of patient kelly gallardo. | SELECT demographic.dob FROM demographic WHERE demographic.name = "Kelly Gallardo" |
CREATE TABLE table_63511 (
"Total fat" text,
"Saturated fat" text,
"Monounsaturated fat" text,
"Polyunsaturated fat" text,
"Smoke point" text
) | What is the monounsaturated fat with a smoke point of c (), a total fat of 100g, 11g of polyunsaturated fat, and 14g of saturated fat? | SELECT "Monounsaturated fat" FROM table_63511 WHERE "Smoke point" = '°c ()' AND "Total fat" = '100g' AND "Polyunsaturated fat" = '11g' AND "Saturated fat" = '14g' |
CREATE TABLE table_51951 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
) | What is his record for fights that went over 2 rounds in the Event of raging wolf 6: mayhem in the mist? | SELECT "Record" FROM table_51951 WHERE "Round" > '2' AND "Event" = 'raging wolf 6: mayhem in the mist' |
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... | when did patient 031-19622 until 05/2105 receive bronchial lavage microbiology test for the last time? | SELECT microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-19622')) AND microlab.culturesite = 'bronchial lavage' AND ST... |
CREATE TABLE table_17013 (
"Institution" text,
"Location" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Nickname" text,
"Joined" real,
"Left" real,
"Current Conference" text
) | How many times did anderson university leave? | SELECT COUNT("Left") FROM table_17013 WHERE "Institution" = 'Anderson University' |
CREATE TABLE Invoices (
Invoice_ID INTEGER,
Order_ID INTEGER,
payment_method_code CHAR(15),
Product_ID INTEGER,
Order_Quantity VARCHAR(288),
Other_Item_Details VARCHAR(255),
Order_Item_ID INTEGER
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15),
Workshop_... | A pie chart for what are the number of the names of the workshop groups that have bookings with status code 'stop'? | SELECT Store_Name, COUNT(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" GROUP BY Store_Name |
CREATE TABLE table_1697190_2 (
money_list_rank VARCHAR,
best_finish VARCHAR
) | when Casey Martin's best finish was t-65, where did he land in the money list rankings? | SELECT money_list_rank FROM table_1697190_2 WHERE best_finish = "T-65" |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
cha... | what is the totality of patient 27591's input until 1567 days ago? | SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27591)) AND DATETIME(inputevents_cv.charttime) <= DATETIME(CURRENT_TIME(), '-1567 day') |
CREATE TABLE table_name_79 (
record VARCHAR,
game VARCHAR
) | What is Record, when Game is '36'? | SELECT record FROM table_name_79 WHERE game = 36 |
CREATE TABLE table_dev_53 (
"id" int,
"anemia" bool,
"gender" string,
"hemoglobin_a1c_hba1c" float,
"dyslipidemia" bool,
"hct" int,
"hematocrit_hct" float,
"persistent_macroalbuminuria" bool,
"urine_albumin" int,
"high_density_lipoprotein_cholesterol_hdl_c" int,
"coagulopathy... | anemia ( hemoglobin < 11 g / dl in female , < 12 g / dl in male ) or known coagulopathy | SELECT * FROM table_dev_53 WHERE anemia = 1 OR (hemoglobin_a1c_hba1c < 11 AND gender = 'female') OR (hemoglobin_a1c_hba1c < 12 AND gender = 'male') OR coagulopathy = 1 |
CREATE TABLE table_name_96 (
date_withdrawn VARCHAR,
fleet_numbers VARCHAR
) | What day withdrawn is associated with fleet numbers of 12, 25, 42 46, 50, 70 71, 74 77, 106 107, 129? | SELECT date_withdrawn FROM table_name_96 WHERE fleet_numbers = "12, 25, 42–46, 50, 70–71, 74–77, 106–107, 129" |
CREATE TABLE table_203_497 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | how many countries have one more than 10 gold medals ? | SELECT COUNT("nation") FROM table_203_497 WHERE "gold" > 10 |
CREATE TABLE Residents_Services (
resident_id INTEGER,
service_id INTEGER,
date_moved_in DATETIME,
property_id INTEGER,
date_requested DATETIME,
date_provided DATETIME,
other_details VARCHAR(255)
)
CREATE TABLE Residents (
resident_id INTEGER,
property_id INTEGER,
date_moved_in ... | Bar chart x axis other details y axis resident_id, sort by the bars from low to high please. | SELECT other_details, resident_id FROM Residents ORDER BY other_details |
CREATE TABLE table_name_86 (
year VARCHAR,
location VARCHAR,
date VARCHAR
) | Which Year has a Location of dinas on 13 january? | SELECT year FROM table_name_86 WHERE location = "dinas" AND date = "13 january" |
CREATE TABLE table_34648 (
"Date" text,
"Tournament Name" text,
"Location" text,
"Partner" text,
"Score in Final" text
) | What was the Score in Final on February 19, 1989? | SELECT "Score in Final" FROM table_34648 WHERE "Date" = 'february 19, 1989' |
CREATE TABLE table_28945 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | What is the latest first elected? | SELECT MAX("First elected") FROM table_28945 |
CREATE TABLE document_functional_areas (
document_code text,
functional_area_code text
)
CREATE TABLE images (
image_id number,
image_alt_text text,
image_name text,
image_url text
)
CREATE TABLE document_sections_images (
section_id number,
image_id number
)
CREATE TABLE functional_a... | What document types do have more than 10000 total access number. | SELECT document_type_code FROM documents GROUP BY document_type_code HAVING SUM(access_count) > 10000 |
CREATE TABLE table_14071 (
"Gothic Letter" text,
"Roman" text,
"Sound (phoneme)" text,
"Sound (allophone)" text,
"Proto-Germanic origin" text
) | Which Gothic Letter has Proto-Germanic origin of / /; /b/? | SELECT "Gothic Letter" FROM table_14071 WHERE "Proto-Germanic origin" = '/ɸ/; /b/' |
CREATE TABLE table_name_87 (
round VARCHAR,
position VARCHAR
) | During which round was a Hawkeyes player selected for the defensive back position? | SELECT round FROM table_name_87 WHERE position = "defensive back" |
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, give me the comparison about the average of revenue over the founder , and group by attribute founder. | SELECT Founder, AVG(Revenue) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder |
CREATE TABLE table_name_98 (
rank INTEGER,
react VARCHAR,
time VARCHAR
) | Which Rank has a Reaction time larger than 0.20400000000000001, and a Time larger than 45.56? | SELECT MAX(rank) FROM table_name_98 WHERE react > 0.20400000000000001 AND time > 45.56 |
CREATE TABLE table_69287 (
"D 41" text,
"D 42" text,
"D 43" text,
"D 44" text,
"D 45" text,
"D 46" text,
"D 47" text,
"D 48" text
) | What is the D44 when D43 is R 14? | SELECT "D 44" FROM table_69287 WHERE "D 43" = 'r 14' |
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 (
... | how many patients whose admission location is phys referral/normal deli and admission year is less than 2176? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.admityear < "2176" |
CREATE TABLE table_24975 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
) | Which position is player bernie doan? | SELECT "Position" FROM table_24975 WHERE "Player" = 'Bernie Doan' |
CREATE TABLE table_20328 (
"Year" real,
"Matches" real,
"Wins" real,
"Losses" real,
"No Result" real,
"Tied" real,
"Success Rate" text,
"Position" text,
"Summary" text
) | Name the least tied | SELECT MIN("Tied") FROM table_20328 |
CREATE TABLE table_name_39 (
position INTEGER,
draws INTEGER
) | What is the sum of the position with less than 0 draws? | SELECT SUM(position) FROM table_name_39 WHERE draws < 0 |
CREATE TABLE table_name_41 (
loss VARCHAR,
record VARCHAR
) | Who lost the game with a record of 20-13? | SELECT loss FROM table_name_41 WHERE record = "20-13" |
CREATE TABLE table_71133 (
"Season" text,
"Club" text,
"Country" text,
"Competition" text,
"Apps." real,
"Goals" real
) | What season did he have 7 appearances? | SELECT "Season" FROM table_71133 WHERE "Apps." = '7' |
CREATE TABLE table_17304621_14 (
bandwidth VARCHAR,
downstream VARCHAR,
price_tl VARCHAR
) | What is the bandwidth for downstream of 20 mbit/s for 69 tl? | SELECT bandwidth FROM table_17304621_14 WHERE downstream = "20 Mbit/s" AND price_tl = "69 TL" |
CREATE TABLE table_name_71 (
losses VARCHAR,
goals_for VARCHAR,
points VARCHAR
) | Hiw many losses have 30 for the goals with points greater than 24? | SELECT COUNT(losses) FROM table_name_71 WHERE goals_for = 30 AND points > 24 |
CREATE TABLE table_53617 (
"Subframe #" real,
"Page #" text,
"Name" text,
"Word #" real,
"Bits" text,
"Scale" text,
"Signed" text
) | What is the scale of sv_health with a word number smaller than 4? | SELECT "Scale" FROM table_53617 WHERE "Word #" < '4' AND "Name" = 'sv_health' |
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_p... | Which courses in Readings meet the MDE need ? | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Readings%' OR course.description LIKE '%Readings%' OR course.name LIKE '%Readings%') AND program... |
CREATE TABLE table_45975 (
"Round" real,
"Pick" real,
"Overall" real,
"Name" text,
"Position" text,
"College" text
) | What college did the player who had the position of OT come from who was pick number less than 12 and a overall pick number bigger than 226? | SELECT "College" FROM table_45975 WHERE "Overall" > '226' AND "Pick" < '12' AND "Position" = 'ot' |
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 prescriptions (
subject_id text,
hadm_id... | how many patients whose insurance is medicare and diagnoses short title is preterm nec 2500+g? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.short_title = "Preterm NEC 2500+g" |
CREATE TABLE table_50693 (
"Tournament" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text
) | WHAT IS THE 2011 PERFORMANCE AT THE MIAMI MASTERS? | SELECT "2011" FROM table_50693 WHERE "Tournament" = 'miami masters' |
CREATE TABLE table_9888 (
"Team" text,
"Outgoing manager" text,
"Manner of departure" text,
"Date of vacancy" text,
"Replaced by" text,
"Date of appointment" text
) | What was the date of appointment for Christos Kassianos who belonged to AEK? | SELECT "Date of appointment" FROM table_9888 WHERE "Team" = 'aek' AND "Replaced by" = 'christos kassianos' |
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_i... | what were the three most frequently prescribed drugs for patients who had also been prescribed paroxetine hcl at the same time? | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'paroxetine hcl') AS t1 JOIN (SELECT admissions.subject_id, prescr... |
CREATE TABLE program (
Program_ID int,
Name text,
Origin text,
Launch real,
Owner text
)
CREATE TABLE broadcast (
Channel_ID int,
Program_ID int,
Time_of_day text
)
CREATE TABLE channel (
Channel_ID int,
Name text,
Owner text,
Share_in_percent real,
Rating_in_percen... | Draw a bar chart of owner versus total number of rating in percent, rank X from high to low order. | SELECT Owner, SUM(Rating_in_percent) FROM channel GROUP BY Owner ORDER BY Owner DESC |
CREATE TABLE table_9083 (
"City" text,
"Chinese" text,
"Pinyin" text,
"County" text,
"Population (2010)" real
) | What is taipei's lowest 2010 population? | SELECT MIN("Population (2010)") FROM table_9083 WHERE "City" = 'taipei' |
CREATE TABLE table_26591434_1 (
original_airdate VARCHAR,
writer VARCHAR
) | What is the original air date for the writer tanaka shinichi? | SELECT original_airdate FROM table_26591434_1 WHERE writer = "Tanaka Shinichi" |
CREATE TABLE table_25818630_2 (
votes__cast VARCHAR,
constituency VARCHAR
) | How many votes were cast when the constituency was midlothian? | SELECT votes__cast FROM table_25818630_2 WHERE constituency = "Midlothian" |
CREATE TABLE table_name_52 (
season INTEGER,
score VARCHAR
) | Which Seasonhas a Score of 3 3 aet , 4 3 pen? | SELECT MAX(season) FROM table_name_52 WHERE score = "3 – 3 aet , 4–3 pen" |
CREATE TABLE table_45960 (
"Tournament" text,
"Surface" text,
"Week" text,
"Winner and score" text,
"Finalist" text,
"Semifinalists" text
) | What was the tournament for the week of August 4? | SELECT "Tournament" FROM table_45960 WHERE "Week" = 'august 4' |
CREATE TABLE table_name_68 (
green_rating VARCHAR,
engine_capacity VARCHAR,
manufacturer VARCHAR,
l_100km_urban__cold_ VARCHAR,
mpg_us_urban VARCHAR
) | What is the green rating for the vehicle with L/100km urban (cold) over 10.9, mpg in the US (urban) over 14.1, manufacturer of Volkswagen, and engine capacity under 3189? | SELECT green_rating FROM table_name_68 WHERE l_100km_urban__cold_ > 10.9 AND mpg_us_urban > 14.1 AND manufacturer = "volkswagen" AND engine_capacity < 3189 |
CREATE TABLE projects (
project_id number,
project_details text
)
CREATE TABLE documents (
document_id number,
document_type_code text,
project_id number,
document_date time,
document_name text,
document_description text,
other_details text
)
CREATE TABLE ref_document_types (
d... | Show all account ids and account details. | SELECT account_id, account_details FROM accounts |
CREATE TABLE table_name_68 (
division VARCHAR,
team VARCHAR
) | Which division is the Derbyshire Falcons in? | SELECT division FROM table_name_68 WHERE team = "derbyshire falcons" |
CREATE TABLE table_24322 (
"Draw" real,
"Song" text,
"Artist" text,
"Panel Points" real,
"Televotes" real,
"Televote Points" real,
"Score" real,
"Placing" text
) | Name the artist for 1595 televotes | SELECT "Artist" FROM table_24322 WHERE "Televotes" = '1595' |
CREATE TABLE table_name_74 (
title VARCHAR,
doctor VARCHAR,
published VARCHAR
) | What is the title of the 8th doctor published in January 2003? | SELECT title FROM table_name_74 WHERE doctor = "8th" AND published = "january 2003" |
CREATE TABLE table_72477 (
"Locale" text,
"Skip" text,
"W" real,
"L" real,
"PF" real,
"PA" real,
"Ends Won" real,
"Ends Lost" real,
"Blank Ends" real,
"Stolen Ends" real,
"Shot Pct." real
) | What is the PA when the PF is 77? | SELECT "PA" FROM table_72477 WHERE "PF" = '77' |
CREATE TABLE table_name_26 (
rank VARCHAR,
nation VARCHAR,
total VARCHAR,
bronze VARCHAR
) | Which rank has a total less than 9, less than 2 bronze, and from France? | SELECT rank FROM table_name_26 WHERE total < 9 AND bronze < 2 AND nation = "france" |
CREATE TABLE table_name_80 (
branding VARCHAR,
owner VARCHAR,
frequency VARCHAR
) | What is the branding of the FM 97.7 station owned by the Canadian Broadcasting Corporation? | SELECT branding FROM table_name_80 WHERE owner = "canadian broadcasting corporation" AND frequency = "fm 97.7" |
CREATE TABLE table_name_72 (
country VARCHAR,
to_par VARCHAR
) | What is the Country of the Player with a To par of 4? | SELECT country FROM table_name_72 WHERE to_par = "–4" |
CREATE TABLE table_204_599 (
id number,
"party" text,
"first duma" text,
"second duma" text,
"third duma" text,
"fourth duma" text
) | how long was the first duma on rigtists | SELECT "first duma" FROM table_204_599 WHERE "party" = 'rightists' |
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 (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | give me the number of patients whose admission type is elective and drug name is amiodarone? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND prescriptions.drug = "Amiodarone" |
CREATE TABLE table_name_15 (
draws VARCHAR,
wins VARCHAR,
byes VARCHAR
) | What are the draws when wins are fwewer than 9 and byes fewer than 2? | SELECT COUNT(draws) FROM table_name_15 WHERE wins < 9 AND byes < 2 |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospit... | on the first intensive care unit visit the sao2 of patient 022-151182 was ever greater than 97.0? | 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 = '022-151182') AND NOT patient.unitdischargetime IS NULL ORDER BY pati... |
CREATE TABLE table_1602620_1 (
location VARCHAR,
term_ended VARCHAR
) | What is the location for the office whose term ended December 2, 1976 | SELECT location FROM table_1602620_1 WHERE term_ended = "December 2, 1976" |
CREATE TABLE table_11656 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real
) | What was the original air date of a series number after 78, written by Jenee V. Giles? | SELECT "Original air date" FROM table_11656 WHERE "Series #" > '78' AND "Written by" = 'jenee v. giles' |
CREATE TABLE table_73336 (
"Administrative division" text,
"Area (km\u00b2) 2005" text,
"Population 2010 Census" real,
"Population 2011 SIAK Database" text,
"Population density (/km\u00b2 2010)" real
) | What is the population density of the administrative division with a population in 2010 of 264170 according to the census? | SELECT "Population density (/km\u00b2 2010)" FROM table_73336 WHERE "Population 2010 Census" = '264170' |
CREATE TABLE table_44778 (
"1950" real,
"General 1950" text,
"Senate 1950" text,
"House 1950" text,
"Governors 1950" text
) | What shows for House 1950 with a 1950 less than 1980, and Governors 1950 of governors 1970? | SELECT "House 1950" FROM table_44778 WHERE "1950" < '1980' AND "Governors 1950" = 'governors 1970' |
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE STUDENT (
STU_NUM... | Draw a bar chart for how many sections does each course have? | SELECT CRS_CODE, COUNT(*) FROM CLASS GROUP BY CRS_CODE |
CREATE TABLE trip (
start_station_id VARCHAR
)
CREATE TABLE station (
lat INTEGER,
long INTEGER,
id VARCHAR
) | What is the average latitude and longitude of the starting points of all trips? | SELECT AVG(T1.lat), AVG(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id |
CREATE TABLE table_73589 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
) | What position did he finish in 1987? | SELECT "Position" FROM table_73589 WHERE "Year" = '1987' |
CREATE TABLE table_8971 (
"Name" text,
"Seat" text,
"Population (2011)" real,
"Area (km 2 )" real,
"Density (inhabitants/km 2 )" real
) | What is the lowest population (2011) for the community with an Area of 12,241km2 and a Density (inhabitants/km 2) smaller than 21.1? | SELECT MIN("Population (2011)") FROM table_8971 WHERE "Area (km 2 )" = '12,241' AND "Density (inhabitants/km 2 )" < '21.1' |
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... | Find the number of ethnically white russian patients born before the year 1846. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.dob_year < "1846" |
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,
... | calculate the average age of male patients who died before 2173. | SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.dod_year < "2173.0" |
CREATE TABLE table_78923 (
"Opposing Teams" text,
"Against" real,
"Date" text,
"Venue" text,
"Status" text
) | What is the status when the against is 11? | SELECT "Status" FROM table_78923 WHERE "Against" = '11' |
CREATE TABLE table_30590 (
"Version" text,
"Release" text,
"Release date" text,
"End of maintenance" text,
"Requirement" text
) | What's the release date in the 1.1.10 release? | SELECT "Release date" FROM table_30590 WHERE "Release" = '1.1.10' |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
... | had in the first hospital encounter patient 31088's respiratory rate been greater than 23.0? | SELECT COUNT(*) > 0 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 = 31088 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)) AND chartevents.itemid IN (... |
CREATE TABLE table_51468 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | How many people came to the game at Victoria Park? | SELECT COUNT("Crowd") FROM table_51468 WHERE "Venue" = 'victoria park' |
CREATE TABLE table_1342292_45 (
result VARCHAR,
incumbent VARCHAR
) | In how many districts is the incumbent Dave E. Satterfield, Jr. | SELECT COUNT(result) FROM table_1342292_45 WHERE incumbent = "Dave E. Satterfield, Jr." |
CREATE TABLE table_71948 (
"Rank" real,
"Name" text,
"Height ft (m)" text,
"Floors" real,
"Year" real
) | What is the greatest rank for Fifth third center? | SELECT MAX("Rank") FROM table_71948 WHERE "Name" = 'fifth third center' |
CREATE TABLE table_78839 (
"Outcome" text,
"Year" real,
"Championship" text,
"Opponent in the final" text,
"Score" text
) | What was Shaun Murphy's outcome in the Premier League Snooker championship held before 2010? | SELECT "Outcome" FROM table_78839 WHERE "Championship" = 'premier league snooker' AND "Year" < '2010' |
CREATE TABLE club_rank (
rank number,
club_id number,
gold number,
silver number,
bronze number,
total number
)
CREATE TABLE club (
club_id number,
name text,
region text,
start_year text
)
CREATE TABLE competition_result (
competition_id number,
club_id_1 number,
c... | What are the types of competition and number of competitions for that type? | SELECT competition_type, COUNT(*) FROM competition GROUP BY competition_type |
CREATE TABLE table_27599216_6 (
founded INTEGER,
football_stadium VARCHAR
) | What year was mcmahon stadium founded? | SELECT MAX(founded) FROM table_27599216_6 WHERE football_stadium = "McMahon Stadium" |
CREATE TABLE table_57082 (
"State" text,
"Interview" real,
"Swimsuit" real,
"Evening gown" real,
"Average" real
) | Name the total number of swimsuits when evening gown is 8.329 and average is less than 8.497 | SELECT COUNT("Swimsuit") FROM table_57082 WHERE "Evening gown" = '8.329' AND "Average" < '8.497' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.