answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT over_gdp__in__percentage_ FROM table_1618358_1 WHERE standard_stamp_duty = "367" | When the standard stamp duty is 367 what is the percentage over gdp? | CREATE TABLE table_1618358_1 (over_gdp__in__percentage_ VARCHAR, standard_stamp_duty VARCHAR) |
SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first, T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JO... | List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007. | CREATE TABLE player (name_first VARCHAR, name_last VARCHAR, player_id VARCHAR); CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE salary (player_id VARCHAR, team_id VARCHAR, year VARCHAR) |
SELECT "Fourth" FROM table_72843 WHERE "Sixth" = 'Air Traffic' | Who was in 4th when in 6th is Air Traffic? | CREATE TABLE table_72843 (
"Poll Year" text,
"Winner" text,
"Second" text,
"Third" text,
"Fourth" text,
"Fifth" text,
"Sixth" text,
"Seventh" text,
"Eighth" text,
"Ninth" text,
"Tenth" text
) |
SELECT over_gdp__in__percentage_ FROM table_1618358_1 WHERE stamp_duty_reserve_tax = "3,669" | When the stamp duty reserve tax is 3,669 what is the percentage over gdp? | CREATE TABLE table_1618358_1 (over_gdp__in__percentage_ VARCHAR, stamp_duty_reserve_tax VARCHAR) |
SELECT SUM(T1.games) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' AND T1.year BETWEEN 1990 AND 2000 | How many home games did the team Boston Red Stockings play from 1990 to 2000 in total? | CREATE TABLE team (team_id_br VARCHAR, name VARCHAR); CREATE TABLE home_game (games INTEGER, team_id VARCHAR, year VARCHAR) |
SELECT "Share" FROM table_59559 WHERE "Weekly rank" = '8' AND "Date" = '15 june' | Which Share has a weekly Rank of 8 and is dated 15 June? | CREATE TABLE table_59559 (
"Show" text,
"Date" text,
"Official ratings (millions)" real,
"Weekly rank" text,
"Share" text
) |
SELECT year FROM table_1618358_1 WHERE over_total_tax_revenue__in__percentage_ = "0.65" | During what years are the percentage over total tax revenue is 0.65? | CREATE TABLE table_1618358_1 (year VARCHAR, over_total_tax_revenue__in__percentage_ VARCHAR) |
SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance LIMIT 1 | Which team had the least number of attendances in home games in 1980? | CREATE TABLE home_game (team_id VARCHAR, year VARCHAR, attendance VARCHAR); CREATE TABLE team (name VARCHAR, team_id_br VARCHAR) |
SELECT "church" FROM table_203_387 WHERE "church" <> 'our lady of the assumption catholic church' AND "current bldg begun" = (SELECT "current bldg begun" FROM table_203_387 WHERE "church" = 'our lady of the assumption catholic church') | our lady of the assumption catholic church started the same year as what church ? | CREATE TABLE table_203_387 (
id number,
"parish est" number,
"church" text,
"city" text,
"current bldg begun" number,
"weekly collections" text,
"notes" number
) |
SELECT COUNT(at_opponents_venue) FROM table_16201038_3 WHERE missouri_vs = "Oklahoma" | Name the total number of opponets venue for oklahoma | CREATE TABLE table_16201038_3 (at_opponents_venue VARCHAR, missouri_vs VARCHAR) |
SELECT state FROM park GROUP BY state HAVING COUNT(*) > 2 | List the names of states that have more than 2 parks. | CREATE TABLE park (state VARCHAR) |
SELECT "Winnings" FROM table_3897 WHERE "Driver" = 'Jeff Gordon' | how many winnings does jeff gordon have? | CREATE TABLE table_3897 (
"Position" real,
"Driver" text,
"Points" real,
"Winnings" text,
"Series" text
) |
SELECT COUNT(last_5_meetings) FROM table_16201038_3 WHERE missouri_vs = "Texas Tech" | Name the total number of last 5 meetings for texas tech | CREATE TABLE table_16201038_3 (last_5_meetings VARCHAR, missouri_vs VARCHAR) |
SELECT COUNT(*) FROM team_franchise WHERE active = 'Y' | How many team franchises are active, with active value 'Y'? | CREATE TABLE team_franchise (active VARCHAR) |
SELECT "Time" FROM table_31826 WHERE "Team" = 'triumph' AND "Rank" < '4' | What is the time/s of team Triumph in those races in which Triumph ranked higher than 4? | CREATE TABLE table_31826 (
"Rank" real,
"Rider" text,
"Team" text,
"Speed" text,
"Time" text
) |
SELECT COUNT(series_sorted) FROM table_1620397_2 WHERE released = "April 2010" | Name the total number of series sorted for when released is april 2010 | CREATE TABLE table_1620397_2 (series_sorted VARCHAR, released VARCHAR) |
SELECT city FROM park GROUP BY city HAVING COUNT(*) BETWEEN 2 AND 4 | Which cities have 2 to 4 parks? | CREATE TABLE park (city VARCHAR) |
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 = 24268) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND outputevents.itemid IN (SELECT... | did patient 24268 excreted any of his urine . on the first icu visit? | 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_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE procedures_icd (
... |
SELECT author FROM table_1620397_2 WHERE series_sorted = "6Y/AE" | Name the author for 6y/ae | CREATE TABLE table_1620397_2 (author VARCHAR, series_sorted VARCHAR) |
SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id = T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1 | Which park had most attendances in 2008? | CREATE TABLE park (park_name VARCHAR, park_id VARCHAR); CREATE TABLE home_game (park_id VARCHAR, year VARCHAR, attendance VARCHAR) |
SELECT "Deloria & Boas" FROM table_6745 WHERE "University of Minnesota" = 'ṭ' | University of Minnesota of had what Deloria & Boas? | CREATE TABLE table_6745 (
"Buechel & Manhart spelling (pronunciation)" text,
"Ullrich" text,
"Brandon University" text,
"Deloria & Boas" text,
"Dakota Mission" text,
"Rood & Taylor" text,
"Riggs" text,
"Williamson" text,
"University of Minnesota" text,
"White Hat" text
) |
SELECT author FROM table_1620397_2 WHERE featuring = "Peri" AND released = "April 2010" | Name the author for peri and april 2010 | CREATE TABLE table_1620397_2 (author VARCHAR, featuring VARCHAR, released VARCHAR) |
SELECT COUNT(*) FROM camera_lens WHERE focal_length_mm > 15 | How many camera lenses have a focal length longer than 15 mm? | CREATE TABLE camera_lens (focal_length_mm INTEGER) |
SELECT site FROM table_name_20 WHERE attendance = "45,000" | What Site had an Attendance of 45,000? | CREATE TABLE table_name_20 (
site VARCHAR,
attendance VARCHAR
) |
SELECT released FROM table_1620397_2 WHERE author = "Pat Mills" | Name the released for pat mills | CREATE TABLE table_1620397_2 (released VARCHAR, author VARCHAR) |
SELECT brand, name FROM camera_lens ORDER BY max_aperture DESC | Find the brand and name for each camera lens, and sort in descending order of maximum aperture. | CREATE TABLE camera_lens (brand VARCHAR, name VARCHAR, max_aperture VARCHAR) |
SELECT "Celebrity" FROM table_6581 WHERE "Exited" = 'day 19' AND "Famous for" = 'ex busted member and tv presenter' | Which celebrity who was famous for being the ex busted member and TV presenter exited on day 19? | CREATE TABLE table_6581 (
"Celebrity" text,
"Famous for" text,
"Entered" text,
"Exited" text,
"Finished" text
) |
SELECT featuring FROM table_1620397_2 WHERE author = "Pat Mills" | Name the featuring for pat mills | CREATE TABLE table_1620397_2 (featuring VARCHAR, author VARCHAR) |
SELECT id, color, name FROM photos | List the id, color scheme, and name for all the photos. | CREATE TABLE photos (id VARCHAR, color VARCHAR, name VARCHAR) |
SELECT * FROM Posts WHERE ParentId IN (SELECT Id FROM Posts WHERE FavoriteCount > 2 AND NOT AcceptedAnswerId IS NULL AND Id IN (SELECT PostId FROM PostTags WHERE TagId IN (SELECT Id FROM Tags WHERE TagName LIKE '%delphi%'))) | Answers to Delphi Posts with Accepted Answer and Fav Count>2. Enter Query Description | CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TAB... |
SELECT last_5_meetings FROM table_16201038_5 WHERE overall_record = "UM, 2-1" | What are the outcomes of the last 5 meetings where the overall record is UM, 2-1? | CREATE TABLE table_16201038_5 (last_5_meetings VARCHAR, overall_record VARCHAR) |
SELECT MAX(height), AVG(height) FROM mountain | What are the maximum and average height of the mountains? | CREATE TABLE mountain (height INTEGER) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "POSA200L" AND lab.fluid = "Urine" | give the number of patients whose drug code is posa200l and lab test fluid is urine? | 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
)
... |
SELECT overall_record FROM table_16201038_5 WHERE at_opponents_venue = "UF, 1-0" | What is the record of wins/losses that were played at opponents venue (uf, 1-0) | CREATE TABLE table_16201038_5 (overall_record VARCHAR, at_opponents_venue VARCHAR) |
SELECT AVG(prominence) FROM mountain WHERE country = 'Morocco' | What are the average prominence of the mountains in country 'Morocco'? | CREATE TABLE mountain (prominence INTEGER, country VARCHAR) |
SELECT MIN("Attendance") FROM table_41737 WHERE "Week" = '15' | What was the lowest attendance at a week 15 game? | CREATE TABLE table_41737 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
) |
SELECT missouri_vs FROM table_16201038_5 WHERE overall_record = "MU, 3-1" | Who are the opponents of Missouri that have an overall record of MU, 3-1? | CREATE TABLE table_16201038_5 (missouri_vs VARCHAR, overall_record VARCHAR) |
SELECT name, height, prominence FROM mountain WHERE range <> 'Aberdare Range' | What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'? | CREATE TABLE mountain (name VARCHAR, height VARCHAR, prominence VARCHAR, range VARCHAR) |
SELECT "Date" FROM table_76887 WHERE "Location" = 'fleetcenter' AND "Game" < '9' AND "Score" = '104-94' | On what date did Fleetcenter have a game lower than 9 with a score of 104-94? | CREATE TABLE table_76887 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Record" text
) |
SELECT at_columbia FROM table_16201038_5 WHERE overall_record = "MU, 3-1" | What is the record at Columbia for the team overall record of MU, 3-1? | CREATE TABLE table_16201038_5 (at_columbia VARCHAR, overall_record VARCHAR) |
SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.height > 4000 | What are the id and name of the photos for mountains? | CREATE TABLE photos (mountain_id VARCHAR); CREATE TABLE mountain (id VARCHAR, name VARCHAR, height INTEGER) |
SELECT DISTINCT instructor.name FROM instructor, course, course_offering, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course_offering.offering_id = offering_instructor.offering_id AND instructor.instructor_id = offering_instructor.instructor_id AND NOT instr... | Are there certain professors who do not teach any classes with labs ? | 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... |
SELECT COUNT(length_feet) FROM table_16226584_1 WHERE length_meters = "106.1" | How many feet in length are there when the length is 106.1 meters? | CREATE TABLE table_16226584_1 (length_feet VARCHAR, length_meters VARCHAR) |
SELECT T1.id, T1.name FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id GROUP BY T1.id HAVING COUNT(*) >= 2 | What are the id and name of the mountains that have at least 2 photos? | CREATE TABLE mountain (id VARCHAR, name VARCHAR); CREATE TABLE photos (mountain_id VARCHAR) |
SELECT podiums FROM table_name_11 WHERE races = "1" AND final_placing = "5th" | Which Podium has 1 Race and a Final Place of 5th? | CREATE TABLE table_name_11 (
podiums VARCHAR,
races VARCHAR,
final_placing VARCHAR
) |
SELECT MIN(length_feet) FROM table_16226584_1 WHERE km_from_kingston = "105.4" | When the kilometers from kingston is 105.4 what is the minimum amount of length in feet? | CREATE TABLE table_16226584_1 (length_feet INTEGER, km_from_kingston VARCHAR) |
SELECT T2.name FROM photos AS T1 JOIN camera_lens AS T2 ON T1.camera_lens_id = T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 1 | What are the names of the cameras that have taken picture of the most mountains? | CREATE TABLE camera_lens (name VARCHAR, id VARCHAR); CREATE TABLE photos (camera_lens_id VARCHAR) |
SELECT dept_name, MIN(salary) FROM instructor GROUP BY dept_name ORDER BY MIN(salary) | Find the minimum salary for the departments whose average salary is above the average payment of all instructors Plot them as bar chart, display in ascending by the Y-axis. | CREATE TABLE prereq (
course_id varchar(8),
prereq_id varchar(8)
)
CREATE TABLE advisor (
s_ID varchar(5),
i_ID varchar(5)
)
CREATE TABLE section (
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
building varchar(15),
room_number varchar(7),
... |
SELECT parish FROM table_16226584_1 WHERE length_meters = "51.8" | Which parishes have a railroad length of 51.8 meters? | CREATE TABLE table_16226584_1 (parish VARCHAR, length_meters VARCHAR) |
SELECT T1.name FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' | What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'? | CREATE TABLE photos (camera_lens_id VARCHAR); CREATE TABLE camera_lens (name VARCHAR, id VARCHAR, brand VARCHAR) |
SELECT AVG(death_year - birth_year) FROM player | What is the average lifespan of a baseball player? | CREATE TABLE salary (
year number,
team_id text,
league_id text,
player_id text,
salary number
)
CREATE TABLE player (
player_id text,
birth_year text,
birth_month text,
birth_day text,
birth_country text,
birth_state text,
birth_city text,
death_year text,
death... |
SELECT mi_from_kingston FROM table_16226584_1 WHERE length_feet = 362 | When the railroad length is 362 feet how many miles is it from kingston? | CREATE TABLE table_16226584_1 (mi_from_kingston VARCHAR, length_feet VARCHAR) |
SELECT COUNT(DISTINCT brand) FROM camera_lens | How many different kinds of lens brands are there? | CREATE TABLE camera_lens (brand VARCHAR) |
SELECT "Tournament" FROM table_34849 WHERE "1984" = '1r' | Which Tournament has a 1984 of 1r? | CREATE TABLE table_34849 (
"Tournament" text,
"1981" text,
"1982" text,
"1983" text,
"1984" text,
"1985" text,
"1986" text,
"1987" text,
"1988" text,
"1989" text
) |
SELECT parish FROM table_16226584_1 WHERE name = "Highworth" | Which parishes have the highworth railroad? | CREATE TABLE table_16226584_1 (parish VARCHAR, name VARCHAR) |
SELECT COUNT(*) FROM camera_lens WHERE NOT id IN (SELECT camera_lens_id FROM photos) | How many camera lenses are not used in taking any photos? | CREATE TABLE photos (id VARCHAR, camera_lens_id VARCHAR); CREATE TABLE camera_lens (id VARCHAR, camera_lens_id VARCHAR) |
SELECT Grape, COUNT(*) FROM wine GROUP BY Grape ORDER BY Grape | How many wines are there for each grape, and I want to display by the X in ascending. | CREATE TABLE grapes (
ID INTEGER,
Grape TEXT,
Color TEXT
)
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area TEXT,
isAVA TEXT
)
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TE... |
SELECT name FROM table_16226584_1 WHERE km_from_kingston = "112.6" | Which railroad is 112.6 kilometers from kingston? | CREATE TABLE table_16226584_1 (name VARCHAR, km_from_kingston VARCHAR) |
SELECT COUNT(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id WHERE T1.country = 'Ethiopia' | How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'? | CREATE TABLE mountain (id VARCHAR, country VARCHAR); CREATE TABLE photos (camera_lens_id VARCHAR, mountain_id VARCHAR) |
SELECT MIN(bronze) FROM table_name_7 WHERE rank = "3" AND silver < 2 | Which Bronze is the lowest one that has a Rank of 3, and a Silver smaller than 2? | CREATE TABLE table_name_7 (
bronze INTEGER,
rank VARCHAR,
silver VARCHAR
) |
SELECT MAX(_number) FROM table_16227492_1 WHERE opponent = "New England Blazers" | Name the most number for new england blazers | CREATE TABLE table_16227492_1 (_number INTEGER, opponent VARCHAR) |
SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.range = 'Toubkal Atlas' INTERSECT SELECT T3.brand FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T1.rang... | List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif' | CREATE TABLE mountain (id VARCHAR, range VARCHAR); CREATE TABLE photos (mountain_id VARCHAR, camera_lens_id VARCHAR); CREATE TABLE camera_lens (brand VARCHAR, id VARCHAR) |
SELECT EMAIL, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL DESC | For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of email and manager_id in a bar chart, display by the bar in descending please. | CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
... |
SELECT MAX(attendance) FROM table_16227492_1 | Name the most attendance | CREATE TABLE table_16227492_1 (attendance INTEGER) |
SELECT name, prominence FROM mountain EXCEPT SELECT T1.name, T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id = T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id = T3.id WHERE T3.brand = 'Sigma' | Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'. | CREATE TABLE camera_lens (id VARCHAR, brand VARCHAR); CREATE TABLE mountain (name VARCHAR, prominence VARCHAR, id VARCHAR); CREATE TABLE photos (mountain_id VARCHAR, camera_lens_id VARCHAR); CREATE TABLE mountain (name VARCHAR, prominence VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "RUQ PAIN" AND demographic.dob_year < "2041" | provide the number of patients whose primary disease is ruq pain and year of birth is less than 2041? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... |
SELECT MAX(attendance) FROM table_16227492_1 WHERE _number = 4 | Name the most attendance for number 4 | CREATE TABLE table_16227492_1 (attendance INTEGER, _number VARCHAR) |
SELECT name FROM camera_lens WHERE name LIKE "%Digital%" | List the camera lens names containing substring "Digital". | CREATE TABLE camera_lens (name VARCHAR) |
SELECT rank FROM table_name_46 WHERE athletes = "manuel cortina martínez" | What is the rank of Manuel Cortina Mart nez? | CREATE TABLE table_name_46 (
rank VARCHAR,
athletes VARCHAR
) |
SELECT preliminary_average FROM table_16268026_3 WHERE semifinal_average = "8.834 (3)" | What is the preliminary average when the semifinal average is 8.834 (3) ? | CREATE TABLE table_16268026_3 (preliminary_average VARCHAR, semifinal_average VARCHAR) |
SELECT T1.name, COUNT(*) FROM camera_lens AS T1 JOIN photos AS T2 ON T1.id = T2.camera_lens_id GROUP BY T1.id ORDER BY COUNT(*) | What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos. | CREATE TABLE photos (camera_lens_id VARCHAR); CREATE TABLE camera_lens (name VARCHAR, id VARCHAR) |
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.short_title = "Preterm NEC 2000-2499g" AND prescriptions.route = "IH" | how many patients had a diagnosis short title preterm nec 2000-2499g and ih as the drug route? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... |
SELECT interview FROM table_16268026_3 WHERE preliminary_average = "8.662 (3)" | What is the interview when preliminary average is 8.662 (3) ? | CREATE TABLE table_16268026_3 (interview VARCHAR, preliminary_average VARCHAR) |
SELECT name FROM channel WHERE OWNER <> 'CCTV' | Find the names of channels that are not owned by CCTV. | CREATE TABLE channel (name VARCHAR, OWNER VARCHAR) |
SELECT Party, COUNT(*) FROM representative GROUP BY Party | Pie. what are the different parties of representative? Show the party name and the number of representatives in each party. | CREATE TABLE election (
Election_ID int,
Representative_ID int,
Date text,
Votes real,
Vote_Percent real,
Seats real,
Place real
)
CREATE TABLE representative (
Representative_ID int,
Name text,
State text,
Party text,
Lifespan text
) |
SELECT state FROM table_16268026_3 WHERE semifinal_average = "8.538 (8)" | What state has a semifinal average of 8.538 (8) ? | CREATE TABLE table_16268026_3 (state VARCHAR, semifinal_average VARCHAR) |
SELECT name FROM channel ORDER BY rating_in_percent DESC | List all channel names ordered by their rating in percent from big to small. | CREATE TABLE channel (name VARCHAR, rating_in_percent VARCHAR) |
SELECT "Party" FROM table_18113 WHERE "First elected" = '1994' | Which party does the incumbent first elected in 1994 belong to? | CREATE TABLE table_18113 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text,
"Candidates" text
) |
SELECT state FROM table_16268026_3 WHERE interview = "8.313 (8)" | What state has an interview of 8.313 (8) ? | CREATE TABLE table_16268026_3 (state VARCHAR, interview VARCHAR) |
SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1 | What is the owner of the channel that has the highest rating ratio? | CREATE TABLE channel (OWNER VARCHAR, rating_in_percent VARCHAR) |
SELECT place FROM table_name_92 WHERE date = "22 august 2004" | What is the Place that has a Date of 22 august 2004? | CREATE TABLE table_name_92 (
place VARCHAR,
date VARCHAR
) |
SELECT semifinal_average FROM table_16268026_3 WHERE preliminary_average = "9.084 (1)" | What is the semifinal average where the preliminary average is 9.084 (1) ? | CREATE TABLE table_16268026_3 (semifinal_average VARCHAR, preliminary_average VARCHAR) |
SELECT COUNT(*) FROM program | how many programs are there? | CREATE TABLE program (Id VARCHAR) |
SELECT COUNT(*) FROM campuses WHERE county = "Los Angeles" | How many campuses exist are in the county of LA? | CREATE TABLE degrees (
year number,
campus number,
degrees number
)
CREATE TABLE faculty (
campus number,
year number,
faculty number
)
CREATE TABLE enrollments (
campus number,
year number,
totalenrollment_ay number,
fte_ay number
)
CREATE TABLE discipline_enrollments (
c... |
SELECT swimsuit FROM table_16268026_3 WHERE evening_gown = "8.774 (6)" | What is the swimsuit when evening gown is 8.774 (6) ? | CREATE TABLE table_16268026_3 (swimsuit VARCHAR, evening_gown VARCHAR) |
SELECT name FROM program ORDER BY launch | list all the names of programs, ordering by launch time. | CREATE TABLE program (name VARCHAR, launch VARCHAR) |
SELECT winner FROM table_name_97 WHERE course = "rome to teramo" | Who was the winner for the Rome to Teramo course? | CREATE TABLE table_name_97 (
winner VARCHAR,
course VARCHAR
) |
SELECT pop_density__per_km²_ FROM table_16278602_1 WHERE english_name = "Capital Region of Denmark" | What is the population density of the Capital Region of Denmark? | CREATE TABLE table_16278602_1 (pop_density__per_km²_ VARCHAR, english_name VARCHAR) |
SELECT name, origin, OWNER FROM program | List the name, origin and owner of each program. | CREATE TABLE program (name VARCHAR, origin VARCHAR, OWNER VARCHAR) |
SELECT MAX(losses) FROM table_26200568_16 WHERE club = "Central Blues" | How many losses does Central Blues have? | CREATE TABLE table_26200568_16 (
losses INTEGER,
club VARCHAR
) |
SELECT seat_of_administration FROM table_16278602_1 WHERE largest_city = "Roskilde" | In the region where Roskilde is the largest city, what is the seat of administration? | CREATE TABLE table_16278602_1 (seat_of_administration VARCHAR, largest_city VARCHAR) |
SELECT name FROM program ORDER BY launch DESC LIMIT 1 | find the name of the program that was launched most recently. | CREATE TABLE program (name VARCHAR, launch VARCHAR) |
SELECT MIN("Year") FROM table_68767 WHERE "Competition" = 'european championships' | What is the first year of the European Championships competition? | CREATE TABLE table_68767 (
"Year" real,
"Competition" text,
"Venue" text,
"Position" text,
"Notes" text
) |
SELECT MIN(population__january_1), _2008_ FROM table_16278602_1 WHERE largest_city = "Roskilde" | What is the minimum population of the region in which Roskilde is the largest city? | CREATE TABLE table_16278602_1 (_2008_ VARCHAR, population__january_1 INTEGER, largest_city VARCHAR) |
SELECT SUM(Share_in_percent) FROM channel WHERE OWNER = 'CCTV' | find the total percentage share of all channels owned by CCTV. | CREATE TABLE channel (Share_in_percent INTEGER, OWNER VARCHAR) |
SELECT MIN(meas_num) FROM table_256286_23 WHERE description = "Tax Supervising and Conservation Bill" | What is the number of the tax supervising and conservation bill? | CREATE TABLE table_256286_23 (
meas_num INTEGER,
description VARCHAR
) |
SELECT COUNT(language_s_) FROM table_16254861_1 WHERE year__ceremony_ = "2001 (74th)" | How many languages for the 2001 (74th) awards? | CREATE TABLE table_16254861_1 (language_s_ VARCHAR, year__ceremony_ VARCHAR) |
SELECT t1.name FROM channel AS t1 JOIN broadcast AS t2 ON t1.channel_id = t2.channel_id WHERE t2.time_of_day = 'Morning' | Find the names of the channels that are broadcast in the morning. | CREATE TABLE channel (name VARCHAR, channel_id VARCHAR); CREATE TABLE broadcast (channel_id VARCHAR, time_of_day VARCHAR) |
SELECT player FROM table_name_61 WHERE touchdowns > 1 AND extra_points = 0 AND points < 50 | What Player has more than 1 Touchdowns with 0 Extra Points and less than 50 Points? | CREATE TABLE table_name_61 (
player VARCHAR,
points VARCHAR,
touchdowns VARCHAR,
extra_points VARCHAR
) |
SELECT result FROM table_16254861_1 WHERE year__ceremony_ = "2009 (82nd)" | What was the result for the 2009 (82nd) awards? | CREATE TABLE table_16254861_1 (result VARCHAR, year__ceremony_ VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.