table stringlengths 33 7.14k | question stringlengths 4 1.06k | output stringlengths 2 4.44k ⌀ |
|---|---|---|
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_nam... | was patient 2536 since 03/2104 prescribed furosemide, vial, or zolpidem tartrate? | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2536) AND prescriptions.drug IN ('furosemide', 'vial', 'zolpidem tartrate') AND STRFTIME('%y-%m', prescriptions.startdate) >= '2104-03' |
CREATE TABLE table_69087 (
"Game" real,
"Date" text,
"Score" text,
"Location" text,
"Time" text,
"Attendance" real
) | What is the number of people who attended the game later than game 6? | SELECT COUNT("Attendance") FROM table_69087 WHERE "Game" > '6' |
CREATE TABLE table_54226 (
"Stage" text,
"Winner" text,
"General classification" text,
"Points classification" text,
"Trofeo Fast Team" text
) | Who was the winner of Stage 12 with a Points Classification of Francesco Moser? | SELECT "Winner" FROM table_54226 WHERE "Points classification" = 'francesco moser' AND "Stage" = '12' |
CREATE TABLE table_14233 (
"Pick" real,
"Player" text,
"Team" text,
"Position" text,
"Hometown/School" text
) | What is the Player from Dayton, Oh with a Pick of 15 or larger? | SELECT "Player" FROM table_14233 WHERE "Pick" > '15' AND "Hometown/School" = 'dayton, oh' |
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE paperdataset (
paperid int,
datasetid int
)
CREATE TABLE author (
authorid int,
authorname varchar
)
CREATE TABLE journal (
journalid int,
journalname varchar
)
CREATE TABLE writes (
paperid int,
authorid int
... | most cited EMNLP 2010 papers | SELECT DISTINCT cite.citedpaperid, COUNT(cite.citedpaperid) FROM cite, paper, venue WHERE paper.paperid = cite.citedpaperid AND paper.year = 2010 AND venue.venueid = paper.venueid AND venue.venuename = 'EMNLP' GROUP BY cite.citedpaperid ORDER BY COUNT(cite.citedpaperid) DESC |
CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(10),
payment_method_description VARCHAR(80)
)
CREATE TABLE Bookings_Services (
Order_ID INTEGER,
Product_ID INTEGER
)
CREATE TABLE Clients (
Client_ID INTEGER,
Address_ID INTEGER,
Customer_Email_Address VARCHAR(255),
Customer_... | Give me a bar chart for the total number of each payment method code, and show in descending by the Y-axis. | SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code ORDER BY COUNT(*) DESC |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number... | what were the three most frequently taken lab tests in 2104 for patients 50s? | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND STRFTIME('%y', lab.labresulttime) = '2104' GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 3 |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id... | Questions with specific tag below question/answer score. | SELECT Q.Id FROM Posts AS Q WHERE Q.PostTypeId = 1 AND Q.Tags LIKE @Pattern AND (Q.Score < @QuestionScore OR (@Accepted = 1 AND Q.AcceptedAnswerId IS NULL) OR NOT EXISTS(SELECT * FROM Posts AS A WHERE A.ParentId = Q.Id AND A.Score >= @AnswerScore)) |
CREATE TABLE table_name_13 (
crowd INTEGER,
away_team VARCHAR
) | What was the largest crowd at a game where Collingwood was the away team? | SELECT MAX(crowd) FROM table_name_13 WHERE away_team = "collingwood" |
CREATE TABLE table_11808 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Round" text,
"Time" text,
"Location" text
) | What was the method used when the opponent was Tyson Griffin? | SELECT "Method" FROM table_11808 WHERE "Opponent" = 'tyson griffin' |
CREATE TABLE table_72330 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
) | Name the losing bonus of 96 points | SELECT "Losing bonus" FROM table_72330 WHERE "Points" = '96' |
CREATE TABLE table_name_89 (
attendance VARCHAR,
week VARCHAR
) | What was the attendance at the week 2 game? | SELECT attendance FROM table_name_89 WHERE week = 2 |
CREATE TABLE table_name_73 (
conference_semifinals VARCHAR,
record VARCHAR
) | Which Conference Semifinals has a Record of 55 27? | SELECT conference_semifinals FROM table_name_73 WHERE record = "55–27" |
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 amount of name over the name , and group by attribute name, and rank bars in asc order please. | SELECT T2.Name, COUNT(T2.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name |
CREATE TABLE table_60378 (
"Date" text,
"Time" text,
"Round" text,
"Opponent" text,
"Ground" text,
"Score" text
) | What opponent has 32 as the round? | SELECT "Opponent" FROM table_60378 WHERE "Round" = '32' |
CREATE TABLE table_name_10 (
round INTEGER,
position VARCHAR,
overall VARCHAR
) | What was the sum of the rounds for the player who had a position of LS and an overall draft pick bigger than 230? | SELECT SUM(round) FROM table_name_10 WHERE position = "ls" AND overall > 230 |
CREATE TABLE table_46145 (
"Date" text,
"Round" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
) | Which Date has a Result of 2 2, and a Venue of H? | SELECT "Date" FROM table_46145 WHERE "Result" = '2–2' AND "Venue" = 'h' |
CREATE TABLE table_19387 (
"Region" text,
"Capital" text,
"Area (km\u00b2)" real,
"Area (sq mi)" real,
"Population" real
) | What is the region where Milan is located? | SELECT "Region" FROM table_19387 WHERE "Capital" = 'Milan' |
CREATE TABLE table_71205 (
"Outcome" text,
"Date" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
) | What is the score in the final with runner-up as the outcome and hard (i) as the surface? | SELECT "Score in the final" FROM table_71205 WHERE "Outcome" = 'runner-up' AND "Surface" = 'hard (i)' |
CREATE TABLE table_75325 (
"NTFA Div 2" text,
"Wins" real,
"Byes" real,
"Losses" real,
"Draws" real,
"Against" real
) | What is the lowest number of draws of the NTFA Div 2 Lilydale? | SELECT MIN("Draws") FROM table_75325 WHERE "NTFA Div 2" = 'lilydale' |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREAT... | when did patient 031-16123 during the last hospital encounter last receive the blood, venipuncture microbiology test? | 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-16123' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... |
CREATE TABLE table_2562572_52 (
cyrillic_name VARCHAR,
settlement VARCHAR
) | What is the cyrillic name when the settlement is a anja? | SELECT cyrillic_name FROM table_2562572_52 WHERE settlement = "Ašanja" |
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
)
... | give me the number of patients whose year of birth is less than 2053 and drug route is ivpca? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2053" AND prescriptions.route = "IVPCA" |
CREATE TABLE ROLES (
role_code VARCHAR,
role_name VARCHAR
)
CREATE TABLE Employees (
employee_id VARCHAR,
role_code VARCHAR
) | Show the employee ids for all employees with role name 'Human Resource' or 'Manager'. | SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Human Resource" OR T2.role_name = "Manager" |
CREATE TABLE table_15475116_1 (
league VARCHAR,
school VARCHAR
) | What league does Delaware Military Academy belong to | SELECT league FROM table_15475116_1 WHERE school = "Delaware Military Academy" |
CREATE TABLE table_name_19 (
Id VARCHAR
) | What shows for 2000 when 2013 shows 3rd? | SELECT 2000 FROM table_name_19 WHERE 2013 = "3rd" |
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... | How many patients are diagnosed with a hemorrhage complicating procedure? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Hemorrhage complic proc" |
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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
... | how many patients had a microbiology fluid received in blood culture bottles test until 2101? | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT microbiologyevents.hadm_id FROM microbiologyevents WHERE microbiologyevents.spec_type_desc = 'fluid received in blood culture bottles' AND STRFTIME('%y', microbiologyevents.charttime) <= '2101') |
CREATE TABLE table_74995 (
"Year" real,
"Date" text,
"Winner" text,
"Result" text,
"Loser" text,
"Location" text
) | What is the name of the Loser when the winner was new england patriots, and a Location of giants stadium, and a Result of 30 28? | SELECT "Loser" FROM table_74995 WHERE "Winner" = 'new england patriots' AND "Location" = 'giants stadium' AND "Result" = '30–28' |
CREATE TABLE table_name_74 (
score VARCHAR,
game VARCHAR
) | What's the Score for the Game of 75? | SELECT score FROM table_name_74 WHERE game = 75 |
CREATE TABLE table_50616 (
"Game" text,
"Day, Date" text,
"Anand" text,
"Gelfand" text,
"Standing" text
) | What is the day and date of game 2? | SELECT "Day, Date" FROM table_50616 WHERE "Game" = '2' |
CREATE TABLE table_682 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text,
"Candidates" text
) | What was the result of the election in which the incumbent was first elected in 1984? | SELECT "Results" FROM table_682 WHERE "First elected" = '1984' |
CREATE TABLE table_33227 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the smallest crowd that Melbourne played for at home? | SELECT MIN("Crowd") FROM table_33227 WHERE "Home team" = 'melbourne' |
CREATE TABLE table_7519 (
"Heat" real,
"Lane" real,
"Name" text,
"Country" text,
"Mark" text
) | What is the highest heat for Ihor Bodrov when the mark is 6.76 and the lane is less than 1? | SELECT MAX("Heat") FROM table_7519 WHERE "Mark" = '6.76' AND "Name" = 'ihor bodrov' AND "Lane" < '1' |
CREATE TABLE table_28947 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Result" text,
"Candidates" text
) | What is the district with the candidates leven powell (f) 63.8% roger west (dr) 36.4%? | SELECT "District" FROM table_28947 WHERE "Candidates" = 'Leven Powell (F) 63.8% Roger West (DR) 36.4%' |
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
)
... | give me the number of patients whose gender is f and diagnoses short title is paralytic ileus? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.short_title = "Paralytic ileus" |
CREATE TABLE Catalog_Contents_Additional_Attributes (
catalog_entry_id INTEGER,
catalog_level_number INTEGER,
attribute_id INTEGER,
attribute_value VARCHAR(255)
)
CREATE TABLE Catalog_Contents (
catalog_entry_id INTEGER,
catalog_level_number INTEGER,
parent_entry_id INTEGER,
previous_en... | Compute how many attributes in each name of the attribute definitions with attribute value 0 Show the result with a bar chart, sort in ascending by the x axis. | SELECT attribute_name, COUNT(attribute_name) FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0 GROUP BY attribute_name ORDER BY attribute_name |
CREATE TABLE table_19481 (
"Pick #" real,
"NFL Team" text,
"Player" text,
"Position" text,
"College" text
) | What college did the defensive back attend? | SELECT "College" FROM table_19481 WHERE "Position" = 'Defensive Back' |
CREATE TABLE table_20434 (
"Result" text,
"Date" text,
"Race" text,
"Venue" text,
"Group" text,
"Distance" text,
"Weight (kg)" text,
"Time" text,
"Jockey" text,
"Winner/2nd" text
) | What is the entry for weight in kilograms of jockey D. Nikolic? | SELECT "Weight (kg)" FROM table_20434 WHERE "Jockey" = 'D. Nikolic' |
CREATE TABLE table_204_208 (
id number,
"year" text,
"title" text,
"role" text,
"episodes" text
) | what title came directly after this morning ? | SELECT "title" FROM table_204_208 WHERE id = (SELECT id FROM table_204_208 WHERE "title" = 'this morning') + 1 |
CREATE TABLE table_name_24 (
lost VARCHAR,
points_difference VARCHAR
) | What is the number of losses for the team with a points difference of -25? | SELECT lost FROM table_name_24 WHERE points_difference = "-25" |
CREATE TABLE table_28803 (
"English" text,
"Galician ( Official )" text,
"Galician ( Reintegrationist )" text,
"Portuguese" text,
"Spanish" text
) | What is the Galician (reintegrationist) word of the Galician (Official) is bo d a / bos d as? | SELECT "Galician ( Reintegrationist )" FROM table_28803 WHERE "Galician ( Official )" = 'Bo día / Bos días' |
CREATE TABLE table_24915874_1 (
placing VARCHAR,
jockey VARCHAR
) | What was the placing when the jockey was Damien Oliver? | SELECT placing FROM table_24915874_1 WHERE jockey = "Damien Oliver" |
CREATE TABLE table_8423 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
) | What is the score of the United States, which has a to par of +5? | SELECT "Score" FROM table_8423 WHERE "Country" = 'united states' AND "To par" = '+5' |
CREATE TABLE table_72529 (
"Player" text,
"Position" text,
"Starter" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
) | Name the number of points for field goals being 1 | SELECT COUNT("Points") FROM table_72529 WHERE "Field goals" = '1' |
CREATE TABLE table_name_83 (
tournament VARCHAR
) | What's the 2012 during Wimbledon and had a Q3 in 2008? | SELECT 2012 FROM table_name_83 WHERE 2008 = "q3" AND tournament = "wimbledon" |
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_cred... | Is it possible to take 560 on Wednesdays and Mondays ? | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.friday = 'N' AND course_offering.monday = 'Y' AND course_offering.thursday = 'N' AND course_offering.tuesday = 'N' AND course_offering.wednesday = 'Y' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND cour... |
CREATE TABLE table_14189 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
) | Which Name has a Number of electorates (2009) greater than 188,799? | SELECT "Name" FROM table_14189 WHERE "Number of electorates (2009)" > '188,799' |
CREATE TABLE table_name_78 (
record VARCHAR,
game VARCHAR
) | What was the record of the game for game 31? | SELECT record FROM table_name_78 WHERE game = 31 |
CREATE TABLE table_67669 (
"Position" text,
"Player" text,
"County team" text,
"Club team(s)" text,
"Team Number" real
) | Which county team has jimmy finn as the player? | SELECT "County team" FROM table_67669 WHERE "Player" = 'jimmy finn' |
CREATE TABLE table_name_71 (
game INTEGER,
november VARCHAR,
record VARCHAR
) | When the record is listed as 2-0-0, and the November date is less than 27, what is the sum of the game? | SELECT SUM(game) FROM table_name_71 WHERE november < 27 AND record = "2-0-0" |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | what is the actual number of patients discharged from a hospital in 2102? | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE NOT patient.hospitaldischargetime IS NULL AND STRFTIME('%y', patient.hospitaldischargetime) = '2102' |
CREATE TABLE table_51817 (
"Tournament" text,
"1968" text,
"1969" text,
"1970" text,
"1971" text,
"1972" text,
"1973" text,
"1974" text,
"1975" text,
"1976" text,
"1977" text,
"1978" text,
"1979" text,
"Career SR" text,
"Career W\u2013L" text,
"Career Win ... | What is theW-L of the tournament listed as A for 1976? | SELECT "Career W\u2013L" FROM table_51817 WHERE "1976" = 'a' |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name te... | how much neo*iv*gentamicin is prescribed the last time the previous month to patient 40435? | SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40435) AND prescriptions.drug = 'neo*iv*gentamicin' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month')... |
CREATE TABLE table_name_63 (
date VARCHAR,
record VARCHAR
) | When was there a record of 13 17 3? | SELECT date FROM table_name_63 WHERE record = "13–17–3" |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE admissions (
row_id num... | until 2104, what are the top five most frequent lab tests ordered for patients in the same month after being diagnosed with tachycardia nos? | SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.i... |
CREATE TABLE table_28750142_1 (
jockey VARCHAR,
name VARCHAR
) | What is the name of the jockey for Pink Gin? | SELECT jockey FROM table_28750142_1 WHERE name = "Pink Gin" |
CREATE TABLE customers (
customer_id number,
customer_first_name text,
customer_middle_initial text,
customer_last_name text,
gender text,
email_address text,
login_name text,
login_password text,
phone_number text,
town_city text,
state_county_province text,
country text... | Show invoice dates and order id and details for all invoices. | SELECT T1.invoice_date, T1.order_id, T2.order_details FROM invoices AS T1 JOIN orders AS T2 ON T1.order_id = T2.order_id |
CREATE TABLE table_22457674_1 (
european_tier VARCHAR,
artist VARCHAR
) | Name the european tier for rick springfield | SELECT european_tier FROM table_22457674_1 WHERE artist = "Rick Springfield" |
CREATE TABLE table_12792876_3 (
drawn VARCHAR,
tries_against VARCHAR
) | What was the drawn when the tries against was 89? | SELECT drawn FROM table_12792876_3 WHERE tries_against = "89" |
CREATE TABLE table_10797 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Which Away team has a Home team score of 7.8 (50)? | SELECT "Away team" FROM table_10797 WHERE "Home team score" = '7.8 (50)' |
CREATE TABLE table_12265 (
"Draft" real,
"Round" text,
"Pick" real,
"Player" text,
"Nationality" text
) | What is the round of player brad winton with a draft before 1983 and a pick less than 132? | SELECT "Round" FROM table_12265 WHERE "Draft" < '1983' AND "Pick" < '132' AND "Player" = 'brad winton' |
CREATE TABLE table_28970 (
"Species" text,
"Common Name" text,
"Protein Name" text,
"Accession Number" text,
"NT Length" text,
"NT Identity" text,
"AA Length" text,
"AA Identity" text,
"E-Value" text
) | What is the protein name when the e-value is 2.50e-41? | SELECT "Protein Name" FROM table_28970 WHERE "E-Value" = '2.50E-41' |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE date_day (
... | please give me flight schedules from BALTIMORE to PHILADELPHIA | SELECT DISTINCT FLIGHT_0.arrival_time, FLIGHT_0.departure_time FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight AS FLIGHT_0, flight AS FLIGHT_1, flight_leg WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND C... |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_... | i would like to fly from BOSTON 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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRA... |
CREATE TABLE table_1346 (
"Num" real,
"Team" text,
"W" real,
"L" real,
"PCT" text,
"PF" real,
"PA" real,
"Last appearance" real,
"Last championship" real,
"HOME games" real,
"Home wins" real,
"Home losses" real,
"Home Win Pct." text,
"ROAD games" real,
"Road w... | Name the maximum mum l is less than 6.0 | SELECT MAX("Num") FROM table_1346 WHERE "L" < '6.0' |
CREATE TABLE table_name_5 (
points INTEGER,
february INTEGER
) | How many Points a February smaller than 1 have? | SELECT MIN(points) FROM table_name_5 WHERE february < 1 |
CREATE TABLE table_name_91 (
completed VARCHAR,
builder VARCHAR,
name VARCHAR
) | When did chatham complete the Hmsmedusa? | SELECT completed FROM table_name_91 WHERE builder = "chatham" AND name = "hmsmedusa" |
CREATE TABLE table_14209245_9 (
nationality VARCHAR,
college_junior_club_team__league_ VARCHAR
) | What is the nationality of the player whose college/junior/club team (league) is Seattle Thunderbirds (WHL)? | SELECT nationality FROM table_14209245_9 WHERE college_junior_club_team__league_ = "Seattle Thunderbirds (WHL)" |
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE plays_games (
stuid number,
gameid number,
hours_played number
)
CREATE TABLE sportsinfo (
stuid number,
sportname text,
... | What is the type of video game Call of Destiny. | SELECT gtype FROM video_games WHERE gname = "Call of Destiny" |
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... | Count different addresses of each school. | SELECT COUNT(DISTINCT dept_address), school_code FROM department GROUP BY school_code |
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,
... | tell me the number of patients diagnosed with polymyalgia rheumatica who are less than 81 years. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "81" AND diagnoses.short_title = "Polymyalgia rheumatica" |
CREATE TABLE table_25887826_17 (
avg VARCHAR
) | How many figures for 08 A points for the team with 1.1863 average? | SELECT COUNT(08 AS _a_pts) FROM table_25887826_17 WHERE avg = "1.1863" |
CREATE TABLE table_name_95 (
tournament VARCHAR,
score VARCHAR,
outcome VARCHAR,
surface VARCHAR
) | Which tournament has an Outcome of runner-up, a Surface of hard, and a Score of 6 4, 6 2? | SELECT tournament FROM table_name_95 WHERE outcome = "runner-up" AND surface = "hard" AND score = "6–4, 6–2" |
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, find name and the sum of code , and group by attribute name, and visualize them by a bar chart, and sort by the Y-axis from high to low. | SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code DESC |
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 the number of patients who were admitted in the emergency room that had a procedure icd9 code of 9672. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.icd9_code = "9672" |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | what are the three most frequently performed procedures for patients who previously received oxygen therapy (40% to 60%) - reduce fio2 as tolerated within 2 months in the previous year? | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'oxygen therapy (40% to 60%) - reduce fio... |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | Return a pie chart on what are the number of rooms for each bed type? | SELECT bedType, COUNT(*) FROM Rooms GROUP BY bedType |
CREATE TABLE broadcast_share (
Channel_ID int,
Program_ID int,
Date text,
Share_in_percent real
)
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... | Plot the total number by grouped by time of day as a bar graph, rank in ascending by the total number. | SELECT Time_of_day, COUNT(*) FROM broadcast GROUP BY Time_of_day ORDER BY COUNT(*) |
CREATE TABLE table_16226 (
"1st players choice" text,
"2nd players choice" text,
"Probability 1st player wins" text,
"Probability 2nd player wins" text,
"Probability of a draw" text
) | In Penney's game what is the probability where the 1st player wins if the probability of a draw is 8.28% and the 2nd player chooses B BR? | SELECT "Probability 1st player wins" FROM table_16226 WHERE "Probability of a draw" = '8.28%' AND "2nd players choice" = 'B BR' |
CREATE TABLE table_14160327_4 (
family_friendly VARCHAR,
decade VARCHAR
) | How many family friendly games are in the 1990s? | SELECT COUNT(family_friendly) FROM table_14160327_4 WHERE decade = "1990s" |
CREATE TABLE table_name_59 (
height VARCHAR,
year VARCHAR,
name VARCHAR
) | What is the Height of Junior Meghan Austin? | SELECT height FROM table_name_59 WHERE year = "junior" AND name = "meghan austin" |
CREATE TABLE table_name_32 (
position VARCHAR,
player VARCHAR
) | What position is Sal Martinez? | SELECT position FROM table_name_32 WHERE player = "sal martinez" |
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 prescriptions (
subject_id text,
hadm_id... | provide the number of patients whose admission year is less than 2167 and procedure icd9 code is 3532? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2167" AND procedures.icd9_code = "3532" |
CREATE TABLE table_55269 (
"Round" text,
"Date" text,
"Matches" real,
"Clubs" text,
"New entries this round" text,
"Prize money" text
) | How many matches were there in the round with 1,000,000 in prize money? | SELECT COUNT("Matches") FROM table_55269 WHERE "Prize money" = '£1,000,000' |
CREATE TABLE table_name_89 (
grid INTEGER,
laps VARCHAR,
rank VARCHAR
) | Name the highest grid for Laps more than 137 and rank is less than 8 | SELECT MAX(grid) FROM table_name_89 WHERE laps > 137 AND rank < 8 |
CREATE TABLE table_name_56 (
role VARCHAR,
festival_organization VARCHAR
) | What role was nominated at the Sydney Film Festival? | SELECT role FROM table_name_56 WHERE festival_organization = "sydney film festival" |
CREATE TABLE table_26688 (
"Episode number Production number" text,
"Title" text,
"Original airdate" text,
"Time of airing" text,
"Total viewers on Hallmark" real,
"Total viewers on Hallmark+1" real,
"Total viewers" real,
"Rank on channel" text
) | Name the rank on channel for pilot | SELECT "Rank on channel" FROM table_26688 WHERE "Title" = 'Pilot' |
CREATE TABLE table_name_64 (
opponent VARCHAR,
time VARCHAR,
ground VARCHAR
) | Who is the Opponent playing at 20:00 GMT at Camp Nou? | SELECT opponent FROM table_name_64 WHERE time = "20:00 gmt" AND ground = "camp nou" |
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm... | how many patients died after being diagnosed with dmii wo cmp nt st uncntr during the same hospital encounter since 6 years ago? | SELECT COUNT(DISTINCT t2.subject_id) FROM (SELECT t1.subject_id, t1.charttime, t1.hadm_id FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FRO... |
CREATE TABLE table_name_94 (
blackpool INTEGER,
draw VARCHAR,
preston_north_end VARCHAR,
competition VARCHAR
) | Which Blackpool has a Preston North End smaller than 46, and a Competition of other, and a Draw larger than 1? | SELECT SUM(blackpool) FROM table_name_94 WHERE preston_north_end < 46 AND competition = "other" AND draw > 1 |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,... | what is patient 006-36108's first urine catheter output time on last month/30? | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-36108')) AND intakeoutput.cellpath LIKE '%output%... |
CREATE TABLE table_name_25 (
record VARCHAR,
home VARCHAR,
decision VARCHAR,
visitor VARCHAR
) | What is the team's record when the NY rangers are at home with atlanta visting and lehtonen getting the decision? | SELECT record FROM table_name_25 WHERE decision = "lehtonen" AND visitor = "atlanta" AND home = "ny rangers" |
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... | when was last the heartrate of patient 030-52327 measured today? | 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 = '030-52327')) AND NOT vitalperiodic.heartrate IS NUL... |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE patient (
uniquepid text,
... | what was the average systemicmean on the last icu visit for patient 031-4987. | SELECT AVG(vitalperiodic.systemicmean) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4987') AND NOT patient.unitdischargetime IS N... |
CREATE TABLE table_16081 (
"Headstamp ID" text,
"Primer Annulus Color" text,
"Bullet Tip Color" text,
"Other Features" text,
"Functional Type" text
) | For the headstamp id of h2, what was the color of the bullet tip? | SELECT "Bullet Tip Color" FROM table_16081 WHERE "Headstamp ID" = 'H2' |
CREATE TABLE table_54456 (
"Episode" text,
"Rating" real,
"Share" real,
"Rating/Share (18-49)" text,
"Viewers (millions)" real,
"Rank (timeslot)" real,
"Rank (night)" real,
"Rank (week)" text
) | what is the rank (night) when the rating is more than 4.3 and the viewers (millions) is more than 10.72? | SELECT AVG("Rank (night)") FROM table_54456 WHERE "Rating" > '4.3' AND "Viewers (millions)" > '10.72' |
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_... | What are the different card types, and how many cards are there of each, I want to order total number in descending order. | SELECT card_type_code, COUNT(*) FROM Customers_Cards GROUP BY card_type_code ORDER BY COUNT(*) DESC |
CREATE TABLE table_13766 (
"Round" real,
"Pick" real,
"Player" text,
"Nationality" text,
"College/junior/club team" text
) | Which College/junior/club team has a Round of 4? | SELECT "College/junior/club team" FROM table_13766 WHERE "Round" = '4' |
CREATE TABLE table_name_52 (
opponent VARCHAR,
result VARCHAR
) | Tell mem the opponent for result of w 31-21 | SELECT opponent FROM table_name_52 WHERE result = "w 31-21" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.