table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE table_26930 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Wildcats points" real,
"Opponents" real,
"Record" text
) | List all results from the 3-3 scoring game. | SELECT "Result" FROM table_26930 WHERE "Record" = '3-3' |
CREATE TABLE table_name_33 (
laps VARCHAR,
constructor VARCHAR,
grid VARCHAR
) | How many laps did BRM have with a grid of 11? | SELECT COUNT(laps) FROM table_name_33 WHERE constructor = "brm" AND grid = 11 |
CREATE TABLE table_name_64 (
draw VARCHAR,
performer VARCHAR,
points VARCHAR
) | What is the total number of draws for songs performed by Miranda with fewer than 48 points? | SELECT COUNT(draw) FROM table_name_64 WHERE performer = "miranda" AND points < 48 |
CREATE TABLE table_name_49 (
date VARCHAR,
games VARCHAR,
time VARCHAR
) | On what day was the record set at the 2002 Salt Lake City games with a time of 3:57.70? | SELECT date FROM table_name_49 WHERE games = "2002 salt lake city" AND time = "3:57.70" |
CREATE TABLE table_204_211 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
) | how many countries received silver medals ? | SELECT COUNT("nation") FROM table_204_211 WHERE "silver" > 0 |
CREATE TABLE table_name_43 (
opponent VARCHAR,
venue VARCHAR,
date VARCHAR
) | Who played against in venue a on 17 february 1900? | SELECT opponent FROM table_name_43 WHERE venue = "a" AND date = "17 february 1900" |
CREATE TABLE table_203_364 (
id number,
"year" number,
"driver" text,
"nation of citizenship" text,
"racing series" text,
"type of vehicle" text
) | does the united states have more nation of citzenship then united kingdom ? | SELECT (SELECT COUNT(*) FROM table_203_364 WHERE "nation of citizenship" = 'united states') > (SELECT COUNT(*) FROM table_203_364 WHERE "nation of citizenship" = 'united kingdom') |
CREATE TABLE table_203_89 (
id number,
"#" number,
"name\n(birth-death)" text,
"took office" text,
"left office" text,
"monarch" text,
"prime minister" text
) | which governor served for the least number of years ? | SELECT "name\n(birth-death)" FROM table_203_89 ORDER BY "left office" - "took office" LIMIT 1 |
CREATE TABLE Statements (
Statement_ID INTEGER,
Statement_Details VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Other_Details VARCHA... | How many documents for each document type description? Visualize by a pie chart. | SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description |
CREATE TABLE table_4886 (
"Year" text,
"Player" text,
"Nationality" text,
"Position" text,
"Club" text
) | What was the nationality of five-eighth player Darren Lockyer? | SELECT "Nationality" FROM table_4886 WHERE "Player" = 'darren lockyer' AND "Position" = 'five-eighth' |
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... | full PostHistory for a post. | SELECT ph.*, pht.Name FROM PostHistory AS ph LEFT JOIN PostHistoryTypes AS pht ON ph.PostHistoryTypeId = pht.Id WHERE PostId = '##post:int##' ORDER BY ph.Id |
CREATE TABLE table_61731 (
"Result" text,
"Record" text,
"Opponent" text,
"Method" text,
"Location" text
) | Which location has a method of decision and Nikos Tsoukalas for an opponent? | SELECT "Location" FROM table_61731 WHERE "Method" = 'decision' AND "Opponent" = 'nikos tsoukalas' |
CREATE TABLE Person (
name varchar(20),
age INTEGER,
city TEXT,
gender TEXT,
job TEXT
)
CREATE TABLE PersonFriend (
name varchar(20),
friend varchar(20),
year INTEGER
) | A bar chart about what is average age for different job title?, and rank y axis in ascending order. | SELECT job, AVG(age) FROM Person GROUP BY job ORDER BY AVG(age) |
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
)
... | count the number of patients whose language is engl and diagnoses long title is unspecified protein-calorie malnutrition? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.language = "ENGL" AND diagnoses.long_title = "Unspecified protein-calorie malnutrition" |
CREATE TABLE table_1108394_47 (
party VARCHAR,
manhattan VARCHAR
) | How many parties received 29.9% of the vote in Manhattan? | SELECT COUNT(party) FROM table_1108394_47 WHERE manhattan = "29.9_percentage" |
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE paperkeyphrase (
paperid int,
keyphraseid int
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE dataset (
datasetid int,
datase... | Information Extraction publications | SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Information Extraction' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid |
CREATE TABLE table_43502 (
"Tournament" text,
"1978" text,
"1979" text,
"1980" text,
"1982" text,
"1983" text,
"1984" text,
"1985" text,
"1986" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"Career SR" text
) | What is 1987, when 1986 is '1R'? | SELECT "1987" FROM table_43502 WHERE "1986" = '1r' |
CREATE TABLE table_67971 (
"Event" text,
"Time" text,
"Nationality" text,
"Date" text,
"Meet" text,
"Location" text
) | What Event's Time is 4:01.00? | SELECT "Event" FROM table_67971 WHERE "Time" = '4:01.00' |
CREATE TABLE table_name_98 (
venue VARCHAR,
sport VARCHAR
) | Which venue held a basketball team? | SELECT venue FROM table_name_98 WHERE sport = "basketball" |
CREATE TABLE Roles (
role_code VARCHAR(15),
role_description VARCHAR(80)
)
CREATE TABLE Document_Sections (
section_id INTEGER,
document_code VARCHAR(15),
section_sequence INTEGER,
section_code VARCHAR(20),
section_title VARCHAR(80)
)
CREATE TABLE Document_Sections_Images (
section_id ... | Find the number of users in each role. Plot them as bar chart. | SELECT role_code, COUNT(*) FROM Users GROUP BY role_code |
CREATE TABLE table_name_59 (
location VARCHAR,
unit VARCHAR
) | What country is the Jiufotang Formation located in? | SELECT location FROM table_name_59 WHERE unit = "jiufotang formation" |
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... | id-requests to be deleted (q.score<4 and not a single answer scored >=3). | SELECT CONCAT('http://anime.stackexchange.com/questions/', p.Id) FROM Posts AS p JOIN PostTags AS pt ON p.Id = pt.PostId JOIN Tags AS t ON pt.TagId = t.Id WHERE p.PostTypeId = 1 AND t.TagName = 'identification-request' AND p.DeletionDate IS NULL AND p.Score < 4 AND NOT EXISTS(SELECT 1 FROM Posts AS a WHERE a.ParentId =... |
CREATE TABLE table_59553 (
"Rider" text,
"Bike" text,
"Laps" real,
"Time" text,
"Grid" real
) | What is the sum of Grid, when Time is '+16.687'? | SELECT SUM("Grid") FROM table_59553 WHERE "Time" = '+16.687' |
CREATE TABLE table_66006 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) | What is the highest number of bronze medals of west germany, which has more than 0 golds? | SELECT MAX("Bronze") FROM table_66006 WHERE "Nation" = 'west germany' AND "Gold" > '0' |
CREATE TABLE table_204_349 (
id number,
"year" number,
"conservative\ncouncillors" number,
"labour\ncouncillors" number,
"independent\ncouncillors" number,
"liberal\ncouncillors" number
) | why years have no liberal councillors serving ? | SELECT "year" FROM table_204_349 WHERE "liberal\ncouncillors" = 0 |
CREATE TABLE table_67629 (
"Club" text,
"Sport" text,
"League" text,
"Venue" text,
"Championships (Years)" text
) | Which club has a League of american basketball association, and a Venue of tba? | SELECT "Club" FROM table_67629 WHERE "League" = 'american basketball association' AND "Venue" = 'tba' |
CREATE TABLE table_72369 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Status" text,
"Opponent" text
) | What year was incumbent jim mcdermott first elected? | SELECT MIN("First elected") FROM table_72369 WHERE "Incumbent" = 'Jim McDermott' |
CREATE TABLE table_23817012_6 (
gp_gs VARCHAR,
ft_pct VARCHAR
) | in the ft pct .667 what is the number of gp-gs | SELECT COUNT(gp_gs) FROM table_23817012_6 WHERE ft_pct = ".667" |
CREATE TABLE table_47699 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) | In what Weeks is the game against the Tampa Bay Buccaneers with less than 44,506 in Attendance? | SELECT SUM("Week") FROM table_47699 WHERE "Opponent" = 'tampa bay buccaneers' AND "Attendance" < '44,506' |
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_la... | Show each gender code and the corresponding count of guests sorted by the count in descending order by a pie chart. | SELECT gender_code, COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC |
CREATE TABLE table_name_15 (
laps INTEGER,
grid VARCHAR,
driver VARCHAR
) | How many laps did Ricardo Zonta drive with a grid less than 14? | SELECT SUM(laps) FROM table_name_15 WHERE grid < 14 AND driver = "ricardo zonta" |
CREATE TABLE table_66547 (
"Manufacturer" text,
"Transmission" text,
"Engine Capacity" real,
"Fuel Type" text,
"L/100km Urban (Cold)" real,
"L/100km Extra-Urban" real,
"L/100km Combined" real,
"mpg-UK Urban (Cold)" real,
"mpg-UK Extra-Urban" real,
"mpg-UK Combined" real,
"mpg... | What's the average L/km combines when the L/100km Urban is 13.9, the mpg-UK combined is more than 28.5 and the mpg-UK extra urban is less than 38.7? | SELECT AVG("L/100km Combined") FROM table_66547 WHERE "L/100km Urban (Cold)" = '13.9' AND "mpg-UK Combined" > '28.5' AND "mpg-UK Extra-Urban" < '38.7' |
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... | provide the number of patients whose marital status is widowed and procedure long title is percutaneous (endoscopic) jejunostomy [pej]? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "WIDOWED" AND procedures.long_title = "Percutaneous (endoscopic) jejunostomy [PEJ]" |
CREATE TABLE table_14038363_1 (
height VARCHAR,
player VARCHAR
) | How tall is Maksim Botin? | SELECT height FROM table_14038363_1 WHERE player = "Maksim Botin" |
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... | how many patients are diagnosed with polyneuropathy in diabetes and treated with base drug? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Polyneuropathy in diabetes" AND prescriptions.drug_type = "BASE" |
CREATE TABLE table_name_62 (
shoots VARCHAR,
player VARCHAR
) | What shows for shoots for craig peacock a? | SELECT shoots FROM table_name_62 WHERE player = "craig peacock a" |
CREATE TABLE table_32178 (
"Date" text,
"Result" text,
"Score" text,
"Stadium" text,
"City" text,
"Crowd" real
) | What was the date of game with a score of 42-6? | SELECT "Date" FROM table_32178 WHERE "Score" = '42-6' |
CREATE TABLE table_name_62 (
social_sec_leeds VARCHAR,
media_officer VARCHAR,
treasurer VARCHAR
) | What kind of Social Sec Leeds has a Media Officer of jason james and a Treasurer of james davidson? | SELECT social_sec_leeds FROM table_name_62 WHERE media_officer = "jason james" AND treasurer = "james davidson" |
CREATE TABLE table_28803803_1 (
date VARCHAR,
name VARCHAR
) | What are the dates that Falling Angel aired? | SELECT date FROM table_28803803_1 WHERE name = "Falling Angel" |
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... | give me the number of patients whose year of birth is less than 2182 and procedure short title is coronar arteriogr-1 cath? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2182" AND procedures.short_title = "Coronar arteriogr-1 cath" |
CREATE TABLE Course_Authors_and_Tutors (
author_id INTEGER,
author_tutor_ATB VARCHAR(3),
login_name VARCHAR(40),
password VARCHAR(40),
personal_name VARCHAR(80),
middle_name VARCHAR(80),
family_name VARCHAR(80),
gender_mf VARCHAR(1),
address_line_1 VARCHAR(80)
)
CREATE TABLE Courses... | How many completion students in each day? Return a line chart grouping by date of completion, and order by the X-axis in descending please. | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment GROUP BY date_of_completion ORDER BY date_of_completion DESC |
CREATE TABLE claims (
Effective_Date VARCHAR,
claim_id VARCHAR
)
CREATE TABLE settlements (
claim_id VARCHAR,
settlement_amount INTEGER
) | What is the effective date of the claim that has the largest amount of total settlement? | SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id = t2.claim_id GROUP BY t1.claim_id ORDER BY SUM(t2.settlement_amount) DESC LIMIT 1 |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate ti... | retrieve the patient ids who are diagnosed with nonrupt cerebral aneurym since 2105. | SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'nonrupt cerebral aneurym') AND STRFTIME('%y', diagnoses_icd.charttime) >= ... |
CREATE TABLE table_13089 (
"Municipality" text,
"Inhabitants" real,
"Mayor" text,
"Party" text,
"Election" real
) | Which inhabitants have 2009 as the election, with cremona as the municipality? | SELECT "Inhabitants" FROM table_13089 WHERE "Election" = '2009' AND "Municipality" = 'cremona' |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city... | Can you identify the GSIs from last semester for DENTED 605 ? | SELECT DISTINCT student.firstname, student.lastname FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN gsi ON gsi.course_offering_id = course_offering.offering_id INNER JOIN student ON student.student_id = gsi.student_id INNER JOIN semester ON semester.semester_id = course... |
CREATE TABLE table_name_94 (
round VARCHAR,
player VARCHAR
) | What round did Matt Clark play? | SELECT round FROM table_name_94 WHERE player = "matt clark" |
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... | Is MATH 185 available as a Summer class in 2004 ? | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'MATH' AND course.number = 185 AND semester.semester = 'Summer' AND semester.semester_id = course_offering.semester AND semester.year = 2004 |
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Guests (
gue... | Show the facility codes of apartments with more than 4 bedrooms, and count them by a bar chart, display by the Y-axis from high to low. | SELECT facility_code, COUNT(facility_code) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 GROUP BY facility_code ORDER BY COUNT(facility_code) DESC |
CREATE TABLE table_19808 (
"#" real,
"Episode" text,
"Writer" text,
"Director" text,
"Original air date" text,
"Viewing figure" text
) | Which numerical entry corresponds to 'Episode 9'? | SELECT COUNT("#") FROM table_19808 WHERE "Episode" = 'Episode 9' |
CREATE TABLE party_events (
event_id number,
event_name text,
party_id number,
member_in_charge_id number
)
CREATE TABLE party (
party_id number,
minister text,
took_office text,
left_office text,
region_id number,
party_name text
)
CREATE TABLE region (
region_id number,
... | Show the minister who took office after 1961 or before 1959. | SELECT minister FROM party WHERE took_office > 1961 OR took_office < 1959 |
CREATE TABLE table_204_334 (
id number,
"opposition" text,
"matches" number,
"won" number,
"drawn" number,
"lost" number,
"for" number,
"against" number,
"win%" text
) | how many teams did the comets win 2 matches against ? | SELECT COUNT("opposition") FROM table_204_334 WHERE "won" = 2 |
CREATE TABLE table_name_62 (
city___state VARCHAR,
series VARCHAR
) | In what City/State did the ATCC Round 4 series take place? | SELECT city___state FROM table_name_62 WHERE series = "atcc round 4" |
CREATE TABLE Customer_Address_History (
customer_id INTEGER,
address_id INTEGER,
date_from DATETIME,
date_to DATETIME
)
CREATE TABLE Order_Items (
order_item_id INTEGER,
order_id INTEGER,
product_id INTEGER,
order_quantity VARCHAR(80)
)
CREATE TABLE Contacts (
contact_id INTEGER,
... | Show the product name and total order quantity for each product. Show bar chart. | SELECT T1.product_name, AVG(SUM(T2.order_quantity)) FROM Products AS T1 JOIN Order_Items AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name |
CREATE TABLE table_60828 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" real
) | How much Played has a Position of 7, and a Drawn smaller than 7? | SELECT SUM("Played") FROM table_60828 WHERE "Position" = '7' AND "Drawn" < '7' |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid... | what are the ways to consume guaifenesin? | SELECT DISTINCT prescriptions.route FROM prescriptions WHERE prescriptions.drug = 'guaifenesin' |
CREATE TABLE table_name_67 (
gran_hamada VARCHAR,
block_a VARCHAR
) | Which Gran Hamada has a Block A of tatsuhito takaiwa? | SELECT gran_hamada FROM table_name_67 WHERE block_a = "tatsuhito takaiwa" |
CREATE TABLE domain_conference (
cid int,
did int
)
CREATE TABLE cite (
cited int,
citing int
)
CREATE TABLE domain_keyword (
did int,
kid int
)
CREATE TABLE domain_publication (
did int,
pid int
)
CREATE TABLE domain_author (
aid int,
did int
)
CREATE TABLE domain (
did... | return me the number of papers in VLDB conference in ' University of Michigan ' . | SELECT COUNT(DISTINCT (publication.title)) FROM author, conference, organization, publication, writes WHERE conference.name = 'VLDB' AND organization.name = 'University of Michigan' AND organization.oid = author.oid AND publication.cid = conference.cid AND writes.aid = author.aid AND writes.pid = publication.pid |
CREATE TABLE route (
train_id int,
station_id int
)
CREATE TABLE train (
id int,
train_number int,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE weekly_weather (
station_id int,
day_of_week text,
high_temperature int,
low_temperat... | A bar graph listing the local authorities and how many local authorities provided by all stations, could you display X from high to low order? | SELECT local_authority, COUNT(local_authority) FROM station GROUP BY local_authority ORDER BY local_authority DESC |
CREATE TABLE table_61462 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
) | Where did the player who won in 1991 finish? | SELECT "Finish" FROM table_61462 WHERE "Year(s) won" = '1991' |
CREATE TABLE table_name_31 (
weight VARCHAR,
number VARCHAR
) | How much does number 26 weigh? | SELECT weight FROM table_name_31 WHERE number = "26" |
CREATE TABLE table_41853 (
"Team" text,
"Match" real,
"Points" real,
"Draw" real,
"Lost" real
) | Which team has 10 losses? | SELECT "Team" FROM table_41853 WHERE "Lost" = '10' |
CREATE TABLE table_48303 (
"Rank" real,
"Company" text,
"Headquarters" text,
"Industry" text,
"Sales (billion $)" real,
"Profits (billion $)" real,
"Assets (billion $)" real,
"Market Value (billion $)" real
) | What is the highest market value in billions of the company with profits of 20.96 billions and 166.99 billions in assets? | SELECT MAX("Market Value (billion $)") FROM table_48303 WHERE "Profits (billion $)" = '20.96' AND "Assets (billion $)" > '166.99' |
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 medication (
medication... | when was the last time patient 027-165214 had the minimum systemicdiastolic on the current intensive care unit visit. | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-165214') AND patient.unitdischargetime IS NULL)... |
CREATE TABLE table_25595209_1 (
loa__metres_ VARCHAR,
yacht VARCHAR
) | What is the LOA of Brindabella? | SELECT loa__metres_ FROM table_25595209_1 WHERE yacht = "Brindabella" |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_... | what are the top three most common specimen tests performed since 2 years ago? | SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE DATETIME(microbiologyevents.charttime) >= DATETIME(CURRENT_TIME(), '-2 year') GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t1.c1 <= 3 |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE procedures_icd (
... | had patient 3273 excreted urine out ureteral stent #1 when they came to the hospital last time? | SELECT COUNT(*) > 0 FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3273 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)) AND outputevents.item... |
CREATE TABLE table_29292 (
"Season" text,
"Coach" text,
"Conf. Record" text,
"Overall" text,
"Standings" text,
"Postseason" text
) | In what season was the conference record for the Pandas 15-1-1? | SELECT "Season" FROM table_29292 WHERE "Conf. Record" = '15-1-1' |
CREATE TABLE table_60842 (
"Constituency number" real,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Electorates (2011)" real
) | What district has abhayapuri south as the name? | SELECT "District" FROM table_60842 WHERE "Name" = 'abhayapuri south' |
CREATE TABLE table_7771 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What was Tom Kite's to par? | SELECT "To par" FROM table_7771 WHERE "Player" = 'tom kite' |
CREATE TABLE table_name_94 (
rank INTEGER,
country VARCHAR,
total VARCHAR
) | Which Rank is the Country of soviet union with a Total smaller than 19? | SELECT MIN(rank) FROM table_name_94 WHERE country = "soviet union" AND total < 19 |
CREATE TABLE table_25277262_2 (
directed_by VARCHAR,
no_in_season VARCHAR
) | How many people directed episode 3 in the season? | SELECT COUNT(directed_by) FROM table_25277262_2 WHERE no_in_season = 3 |
CREATE TABLE table_dev_20 (
"id" int,
"anemia" bool,
"gender" string,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"platelets" int,
"dyslipidemia" bool,
"renal_disease" bool,
"creatinine_clearance_cl" float,
"neutropenia" int,
"estimated_glomerular_filtrat... | baseline hgb below the lower limits of normal at the local laboratory; lymphopenia ( < 1000 / l ) , neutropenia ( < 1500 / l ) , or thrombocytopenia ( platelets < 100000 / l ) . | SELECT * FROM table_dev_20 WHERE lymphopenia < 1000 AND neutropenia < 1500 OR thrombocytopenia = 1 OR platelets < 100000 |
CREATE TABLE table_203_408 (
id number,
"rd." number,
"grand prix" text,
"date" text,
"location" text,
"pole position" text,
"fastest lap" text,
"winning driver" text,
"constructor" text,
"report" text
) | who was the winning driver after nigel mansell ? | SELECT "winning driver" FROM table_203_408 WHERE "rd." > (SELECT "rd." FROM table_203_408 WHERE "winning driver" = 'nigel mansell') ORDER BY "rd." LIMIT 1 |
CREATE TABLE table_name_11 (
type VARCHAR,
model VARCHAR
) | What type of car has the model 6cm? | SELECT type FROM table_name_11 WHERE model = "6cm" |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number... | what was the last ward identification for patient 49036 since 4 years ago? | SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 49036) AND NOT transfers.wardid IS NULL AND DATETIME(transfers.intime) >= DATETIME(CURRENT_TIME(), '-4 year') ORDER BY transfers.intime DESC LIMIT 1 |
CREATE TABLE table_name_98 (
score VARCHAR,
country VARCHAR
) | What is the player from England's score? | SELECT score FROM table_name_98 WHERE country = "england" |
CREATE TABLE table_2140071_8 (
episode INTEGER,
premier_date VARCHAR
) | Which Maximum episode premiered March 8, 2008? | SELECT MAX(episode) FROM table_2140071_8 WHERE premier_date = "March 8, 2008" |
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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | How many patients are born before 2197 and with procedure icd9 code 309? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2197" AND procedures.icd9_code = "309" |
CREATE TABLE table_name_32 (
acceleration_0_100km_h VARCHAR,
name VARCHAR
) | What is the acceleration 1-100km/h when the name is 1.5 dci? | SELECT acceleration_0_100km_h FROM table_name_32 WHERE name = "1.5 dci" |
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... | give me the number of patients whose primary disease is transient ischemic attack and days of hospital stay is greater than 4? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "TRANSIENT ISCHEMIC ATTACK" AND demographic.days_stay > "4" |
CREATE TABLE table_name_5 (
away VARCHAR,
date VARCHAR
) | Which away game was played on 2008-07-18? | SELECT away FROM table_name_5 WHERE date = "2008-07-18" |
CREATE TABLE table_17319931_1 (
team VARCHAR,
driver VARCHAR
) | What is the team whose driver Jeff Simmons? | SELECT team FROM table_17319931_1 WHERE driver = "Jeff Simmons" |
CREATE TABLE table_20986710_1 (
score_in_final VARCHAR,
runner_up VARCHAR
) | What was the final score when tracy austin was runner up? | SELECT score_in_final FROM table_20986710_1 WHERE runner_up = "Tracy Austin" |
CREATE TABLE table_name_61 (
nba_draft VARCHAR,
player VARCHAR
) | Which NBA Draft had Labradford Smith? | SELECT nba_draft FROM table_name_61 WHERE player = "labradford smith" |
CREATE TABLE table_24015 (
"Player" text,
"Played" real,
"Legs Won" real,
"Legs Lost" real,
"LWAT" real,
"100+" real,
"140+" real,
"180s" real,
"High Checkout" real,
"3-dart Average" text
) | Which player has a 92.58 3-dart average? | SELECT "Player" FROM table_24015 WHERE "3-dart Average" = '92.58' |
CREATE TABLE table_name_95 (
conference_joined VARCHAR,
previous_conference VARCHAR,
mascot VARCHAR
) | Which Conference Joined has a Previous Conference of northwestern, and a Mascot of oilers? | SELECT conference_joined FROM table_name_95 WHERE previous_conference = "northwestern" AND mascot = "oilers" |
CREATE TABLE resultsdata15 (
sample_pk number,
commod text,
commtype text,
lab text,
pestcode text,
testclass text,
concen number,
lod number,
conunit text,
confmethod text,
confmethod2 text,
annotate text,
quantitate text,
mean text,
extract text,
determi... | If sample 6480 is imported, which country is it originally from? | SELECT country FROM sampledata15 WHERE sample_pk = 6480 AND origin = 2 |
CREATE TABLE schedule (
Cinema_ID int,
Film_ID int,
Date text,
Show_times_per_day int,
Price float
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_seaso... | Give me the title and highest price for each film Show bar chart, list from low to high by the Y. | 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 MAX(T1.Price) |
CREATE TABLE table_17204 (
"Round" real,
"Overall" text,
"Player" text,
"Position" text,
"Nationality" text,
"Club team" text
) | What club team did JArrod Maidens play for? | SELECT "Club team" FROM table_17204 WHERE "Player" = 'Jarrod Maidens' |
CREATE TABLE table_15829930_5 (
matches INTEGER,
year VARCHAR
) | Name the least matches for year 2008 | SELECT MIN(matches) FROM table_15829930_5 WHERE year = 2008 |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | Show me about the distribution of All_Road and Team_ID in a bar chart, display by the y-axis in ascending. | SELECT All_Road, Team_ID FROM basketball_match ORDER BY Team_ID |
CREATE TABLE table_15441 (
"Riding" text,
"Province" text,
"Candidate" text,
"Votes" real,
"Placement" text
) | What is the Placement when the Candidate is Jean-Patrick Berthiaume? | SELECT "Placement" FROM table_15441 WHERE "Candidate" = 'jean-patrick berthiaume' |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Bod... | Questions I have answered where asker has accepted another answer. Lists all questions I have proposed an answer to, and, sadly, the original asker accepted a different answer. | SELECT p.Id AS "post_link", a.Score, a.CreationDate FROM Posts AS a, Posts AS p WHERE a.OwnerUserId = '##UserId##' AND a.PostTypeId = 2 AND p.Id = a.ParentId AND p.AcceptedAnswerId != a.Id ORDER BY a.Score, a.CreationDate |
CREATE TABLE table_777 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | How many winners were there in the race of 1922 | SELECT COUNT("Incumbent") FROM table_777 WHERE "First elected" = '1922' |
CREATE TABLE table_15431251_1 (
title VARCHAR,
no_in_season VARCHAR
) | What is the title for episode number 7 in the season? | SELECT COUNT(title) FROM table_15431251_1 WHERE no_in_season = 7 |
CREATE TABLE table_72981 (
"Outcome" text,
"Edition" real,
"Round" text,
"Opponent Team" text,
"Surface" text,
"Opponent" text,
"Score" text
) | What was the score when the opponent was Dominika Cibulkov ? | SELECT "Score" FROM table_72981 WHERE "Opponent" = 'Dominika Cibulková' |
CREATE TABLE table_4876 (
"Place" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real
) | How many goals scored against the opposing team occurred with more than 7 losses, less than 27 goals scored for the team and drawn more than 1? | SELECT COUNT("Goals Against") FROM table_4876 WHERE "Lost" > '7' AND "Goals For" < '27' AND "Drawn" > '1' |
CREATE TABLE table_8435 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | What is the score for Billy Andrade? | SELECT "Score" FROM table_8435 WHERE "Player" = 'billy andrade' |
CREATE TABLE table_70544 (
"Production year" text,
"2001" real,
"2002" real,
"2003" real,
"2004" real,
"2005" real,
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real,
"2011" real
) | What is the average 2002 value for Sunflower, which had a 2010 value less than 5587 and a 2007 value greater than 546? | SELECT AVG("2002") FROM table_70544 WHERE "2010" < '5587' AND "Production year" = 'sunflower' AND "2007" > '546' |
CREATE TABLE table_27700530_15 (
high_points VARCHAR,
date VARCHAR
) | Who had the most points and how many did they have on April 22? | SELECT high_points FROM table_27700530_15 WHERE date = "April 22" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.