answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT obama_percentage FROM table_20524090_1 WHERE mccain_percentage = "55.46%" | What was Obama's percentage in those places where McCain's percentage was 55.46%? | CREATE TABLE table_20524090_1 (
obama_percentage VARCHAR,
mccain_percentage VARCHAR
) |
SELECT player FROM table_name_20 WHERE hometown = "bay city, tx" | Who's from Bay City, TX? | CREATE TABLE table_name_20 (player VARCHAR, hometown VARCHAR) |
SELECT MAX(wickets) FROM table_16570286_4 WHERE player = "Alec Bedser" | How many wickets did Alec bedser have? | CREATE TABLE table_16570286_4 (wickets INTEGER, player VARCHAR) |
SELECT year FROM table_name_37 WHERE genre = "jazz" AND label = "columbia" AND result = "nominated" AND title = "trio jeepy" | Which year's genre was jazz under the columbia label when it was nominated for the title Trio jeepy? | CREATE TABLE table_name_37 (
year VARCHAR,
title VARCHAR,
result VARCHAR,
genre VARCHAR,
label VARCHAR
) |
SELECT nba_draft FROM table_name_61 WHERE player = "labradford smith" | Which NBA Draft had Labradford Smith? | CREATE TABLE table_name_61 (nba_draft VARCHAR, player VARCHAR) |
SELECT cfl_team FROM table_16575609_1 WHERE player = "Dimitri Tsoumpas" | Who picked dimitri tsoumpas? | CREATE TABLE table_16575609_1 (cfl_team VARCHAR, player VARCHAR) |
SELECT district FROM table_12679326_1 WHERE party = "Republican" AND committee = "Appropriations" | What district is represented by a Republican Appropriations Committee? | CREATE TABLE table_12679326_1 (
district VARCHAR,
party VARCHAR,
committee VARCHAR
) |
SELECT MIN(crowd) FROM table_name_77 WHERE venue = "windy hill" | What was the lowest attendance at Windy Hill? | CREATE TABLE table_name_77 (crowd INTEGER, venue VARCHAR) |
SELECT position FROM table_16575609_1 WHERE cfl_team = "Winnipeg Blue Bombers" | What position did the winnipeg blue bombers draft? | CREATE TABLE table_16575609_1 (position VARCHAR, cfl_team VARCHAR) |
SELECT MAX("Points") FROM table_54524 WHERE "Grade" = 'a' | How many points are there, when the grade is A? | CREATE TABLE table_54524 (
"Grade" text,
"Points" real,
"Sit-up (reps)" text,
"Standing Broad Jump (cm)" text,
"Chin-up (reps)" text,
"Shuttle Run (sec)" text,
"2.4km Run (min:sec)" text
) |
SELECT home_team AS score FROM table_name_6 WHERE venue = "princes park" | What was the home team's score at Princes Park? | CREATE TABLE table_name_6 (home_team VARCHAR, venue VARCHAR) |
SELECT MIN(pick__number) FROM table_16575609_1 WHERE player = "Brendon LaBatte" | Where did Brendon Labatte get picked? | CREATE TABLE table_16575609_1 (pick__number INTEGER, player VARCHAR) |
SELECT MAX(number_of_households) FROM table_name_2 WHERE median_household_income = "$54,086" AND population < 231 OFFSET 236 | What is the most households with a median household income of $54,086 with less than 231,236 in population? | CREATE TABLE table_name_2 (
number_of_households INTEGER,
median_household_income VARCHAR,
population VARCHAR
) |
SELECT home_team AS score FROM table_name_50 WHERE home_team = "geelong" | How much did the home team Geelong score? | CREATE TABLE table_name_50 (home_team VARCHAR) |
SELECT cfl_team FROM table_16575609_1 WHERE college = "Weber State" | Who picked a player from Weber State? | CREATE TABLE table_16575609_1 (cfl_team VARCHAR, college VARCHAR) |
SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus = T2.id WHERE T1.year = 2004 AND T2.campus = "San Francisco State University" | How many faculty lines are there at San Francisco State University in 2004? | CREATE TABLE enrollments (
campus number,
year number,
totalenrollment_ay number,
fte_ay number
)
CREATE TABLE campuses (
id number,
campus text,
location text,
county text,
year number
)
CREATE TABLE discipline_enrollments (
campus number,
discipline number,
year numbe... |
SELECT home_team FROM table_name_86 WHERE away_team = "carlton" | What is the name of the home team that played Carlton? | CREATE TABLE table_name_86 (home_team VARCHAR, away_team VARCHAR) |
SELECT position FROM table_16575609_1 WHERE college = "Louisiana-Lafayette" | What position was taken out of Louisiana-Lafayette? | CREATE TABLE table_16575609_1 (position VARCHAR, college VARCHAR) |
SELECT COUNT("Tries") FROM table_10151 WHERE "Conv" < '45' AND "Start" = '19' AND "Pens" < '22' | What is the total of tries for a player with conv smaller than 45, 19 starts and pens fewer than 22? | CREATE TABLE table_10151 (
"Player" text,
"Span" text,
"Start" real,
"Tries" real,
"Conv" real,
"Pens" real,
"Drop" real
) |
SELECT status FROM table_name_54 WHERE builder = "orenstein and koppel" | Name the status with builder of orenstein and koppel | CREATE TABLE table_name_54 (status VARCHAR, builder VARCHAR) |
SELECT college FROM table_16575609_4 WHERE cfl_team = "Calgary Stampeders" | Name the college for calgary stampeders | CREATE TABLE table_16575609_4 (college VARCHAR, cfl_team VARCHAR) |
SELECT home_team AS score FROM table_name_52 WHERE home_team = "north melbourne" | What was the North Melbourne's score when they played as the home team? | CREATE TABLE table_name_52 (
home_team VARCHAR
) |
SELECT builder FROM table_name_60 WHERE name_number = "joffre" | Who was the builder for joffre | CREATE TABLE table_name_60 (builder VARCHAR, name_number VARCHAR) |
SELECT MAX(pick__number) FROM table_16575609_4 WHERE cfl_team = "Edmonton Eskimos" | Name the most pick number for cfl team being edmonton eskimos | CREATE TABLE table_16575609_4 (pick__number INTEGER, cfl_team VARCHAR) |
SELECT "selected\nlatin american\ncountries" FROM table_203_54 ORDER BY "tourism\nincome\n%\ngdp\n2003" LIMIT 1 | which country had the least amount of tourism income in 2003 ? | CREATE TABLE table_203_54 (
id number,
"selected\nlatin american\ncountries" text,
"internl.\ntourism\narrivals\n2010\n(x 1000)" number,
"internl.\ntourism\nreceipts.\n2010\n(usd\n(x1000)" number,
"average\nreceipt\nper visitor\n2009\n(usd/turista)" number,
"tourist\narrivals\nper\n1000 inhab\n(... |
SELECT venue FROM table_name_14 WHERE home_team = "carlton" | Where did Carlton play as the home team? | CREATE TABLE table_name_14 (venue VARCHAR, home_team VARCHAR) |
SELECT COUNT(original_airdate) FROM table_16581695_3 WHERE production_code = 210 | How many days are associated with production code 210? | CREATE TABLE table_16581695_3 (original_airdate VARCHAR, production_code VARCHAR) |
SELECT MIN(laps) FROM table_name_12 WHERE rank = "32" | What is the fewest number of laps completed by a rank 32? | CREATE TABLE table_name_12 (
laps INTEGER,
rank VARCHAR
) |
SELECT home_team FROM table_name_98 WHERE away_team = "melbourne" | Who was the home team when Melbourne was the away team? | CREATE TABLE table_name_98 (home_team VARCHAR, away_team VARCHAR) |
SELECT COUNT(title) FROM table_16581695_3 WHERE production_code = 211 | How many titles have a production code of 211? | CREATE TABLE table_16581695_3 (title VARCHAR, production_code VARCHAR) |
SELECT COUNT(*) FROM geographic, restaurant WHERE geographic.county = 'santa cruz county' AND restaurant.city_name = geographic.city_name AND restaurant.name = 'jamerican cuisine' | how many jamerican cuisine are there in santa cruz county ? | CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rating "decimal
)
CREATE TABLE geographic (
city_name varchar,
county varchar,
region varchar
)
CREATE TABLE location (
restaurant_id int,
house_number int,
street_name varchar,
city_n... |
SELECT result FROM table_name_49 WHERE date = "november 20, 1988" | What was the result on November 20, 1988? | CREATE TABLE table_name_49 (result VARCHAR, date VARCHAR) |
SELECT COUNT(no_in_season) FROM table_16581695_3 WHERE production_code = 204 | How many seasons have a production code of 204? | CREATE TABLE table_16581695_3 (no_in_season VARCHAR, production_code VARCHAR) |
SELECT "Place" FROM table_9812 WHERE "Player" = 'arnold palmer' | What is Place, when Player is 'Arnold Palmer'? | CREATE TABLE table_9812 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) |
SELECT kickoff_[a_] FROM table_name_60 WHERE week = "5" | What time was the kickoff on week 5? | CREATE TABLE table_name_60 (kickoff_ VARCHAR, a_ VARCHAR, week VARCHAR) |
SELECT title FROM table_16581695_3 WHERE written_by = "Matt Wayne" | What title was written by Matt Wayne? | CREATE TABLE table_16581695_3 (title VARCHAR, written_by VARCHAR) |
SELECT COUNT("Rank") FROM table_5180 WHERE "Player" = 'tiger woods' AND "Events" < '21' | Tiger Woods has played less than 21 events and is what rank? | CREATE TABLE table_5180 (
"Rank" real,
"Player" text,
"Country" text,
"Earnings ( $ )" real,
"Events" real,
"Wins" real
) |
SELECT game_site FROM table_name_64 WHERE attendance = "39,889" | Where was the game that had an attendance of 39,889? | CREATE TABLE table_name_64 (game_site VARCHAR, attendance VARCHAR) |
SELECT no_in_series FROM table_16581695_4 WHERE production_code = "303" | What is the series episode number of the episode with production code 303? | CREATE TABLE table_16581695_4 (no_in_series VARCHAR, production_code VARCHAR) |
SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-39354') AND DATETIME(patient.unitadmittime) >= DATETIME(CURRENT_TIME(), '-4 year') ORDER BY patient.unitadmittime DESC LIMIT 1 | what is the last ward id patient 028-39354 got since 4 years ago. | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE intakeoutput (
intakeou... |
SELECT record FROM table_name_95 WHERE attendance = "43,502" | What was the record when the attendance was 43,502? | CREATE TABLE table_name_95 (record VARCHAR, attendance VARCHAR) |
SELECT production_code FROM table_16581695_4 WHERE no_in_season = "15" | What is the production code for episode 15 in season 3? | CREATE TABLE table_16581695_4 (production_code VARCHAR, no_in_season VARCHAR) |
SELECT "D 48 \u221a" FROM table_52302 WHERE "D 46 \u221a" = 'r 33 o' | What is the D 48 with a D 46 with r 33 o? | CREATE TABLE table_52302 (
"D 49 \u221a" text,
"D 48 \u221a" text,
"D 47 \u221a" text,
"D 46 \u221a" text,
"D 45 \u221a" text,
"D 44 \u221a" text,
"D 43 \u221a" text,
"D 42 \u221a" text,
"D 41 \u221a" text
) |
SELECT label FROM table_name_37 WHERE date = "1988" AND format = "cd" | What label released a CD in 1988? | CREATE TABLE table_name_37 (label VARCHAR, date VARCHAR, format VARCHAR) |
SELECT directed_by FROM table_16581695_4 WHERE no_in_season = "12" | Who directed episode 12 in season 3? | CREATE TABLE table_16581695_4 (directed_by VARCHAR, no_in_season VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND procedures.short_title = "Exc/dest hrt lesion open" | what is the number of patients whose admission location is emergency room admit and procedure short title is exc/dest hrt lesion open? | 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... |
SELECT date FROM table_name_86 WHERE region = "united kingdom" AND catalog = "ft 507" | On what date did the United Kingdom have a catalog of FT 507? | CREATE TABLE table_name_86 (date VARCHAR, region VARCHAR, catalog VARCHAR) |
SELECT tree_species FROM table_16577990_1 WHERE total_plant_species = 258 | How many tree species are listed when the total plant species is 258? | CREATE TABLE table_16577990_1 (tree_species VARCHAR, total_plant_species VARCHAR) |
SELECT "Max. torque at rpm" FROM table_75415 WHERE "Displacement" = '2,445 cc' AND "Engine" = 'iveco 8144.61' | What is the maximum torque that has 2,445 CC Displacement, and an Iveco 8144.61 engine? | CREATE TABLE table_75415 (
"Model" text,
"Engine" text,
"Displacement" text,
"Valvetrain" text,
"Fuel system" text,
"Max. power at rpm" text,
"Max. torque at rpm" text
) |
SELECT date FROM table_name_93 WHERE catalog = "ft 507" | On what date was the Catalog FT 507? | CREATE TABLE table_name_93 (date VARCHAR, catalog VARCHAR) |
SELECT COUNT(tree_species) FROM table_16577990_1 WHERE total_plant_species = 113 | How many tree species are there when the total plant species is 113? | CREATE TABLE table_16577990_1 (tree_species VARCHAR, total_plant_species VARCHAR) |
SELECT COUNT("game") FROM table_203_47 WHERE "score" - "score" > 2 | how many games were won by the swarm by over 2 goals ? | CREATE TABLE table_203_47 (
id number,
"game" number,
"date" text,
"opponent" text,
"location" text,
"score" text,
"ot" text,
"attendance" number,
"record" text
) |
SELECT label FROM table_name_47 WHERE date = "1988" AND catalog = "54513" | Which label had a catalog of 54513 in 1988? | CREATE TABLE table_name_47 (label VARCHAR, date VARCHAR, catalog VARCHAR) |
SELECT MIN(size_in_km²) FROM table_16577990_1 WHERE central_forest_reserve = "Itwara" | What is the size of Itwara central forest reserve? | CREATE TABLE table_16577990_1 (size_in_km² INTEGER, central_forest_reserve VARCHAR) |
SELECT JOB_ID, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY SUM(MANAGER_ID) | For all employees who have the letters D or S in their first name, return a bar chart about the distribution of job_id and the sum of manager_id , and group by attribute job_id, could you rank total number of manager id in ascending order please? | CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varcha... |
SELECT date FROM table_name_54 WHERE label = "fantasy records" AND format = "cd" AND catalog = "fcd-4513-2" | On what date did Fantasy Records release a CD format of catalog FCD-4513-2? | CREATE TABLE table_name_54 (date VARCHAR, catalog VARCHAR, label VARCHAR, format VARCHAR) |
SELECT tree_species FROM table_16577990_1 WHERE central_forest_reserve = "Kitechura" | How many tree species are in the kitechura reserve? | CREATE TABLE table_16577990_1 (tree_species VARCHAR, central_forest_reserve VARCHAR) |
SELECT FIRST_NAME, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMPLOYEE_ID | For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of first_name and employee_id , and display by the total number in ascending. | CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40)... |
SELECT COUNT(laps) FROM table_name_21 WHERE driver = "john watson" AND grid < 7 | What was John Watson's total laps with a grid of less than 7? | CREATE TABLE table_name_21 (laps VARCHAR, driver VARCHAR, grid VARCHAR) |
SELECT title FROM table_16617025_1 WHERE us_viewers__millions_ = "17.93" | What episode titles have 17.93 million U.S. viewers? | CREATE TABLE table_16617025_1 (title VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT Sex, SUM(Weight) FROM people GROUP BY Sex | Draw a pie chart about the proportion of Sex and the sum of Weight. | CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... |
SELECT COUNT(laps) FROM table_name_44 WHERE grid = 9 | How many laps were there with #9 grid? | CREATE TABLE table_name_44 (laps VARCHAR, grid VARCHAR) |
SELECT title FROM table_16617025_1 WHERE us_viewers__millions_ = "20.94" | What episode titles have 20.94 million U.S. viewers? | CREATE TABLE table_16617025_1 (title VARCHAR, us_viewers__millions_ VARCHAR) |
SELECT player_name FROM table_10966926_2 WHERE college = "Michigan State" | Which player went to Michigan State? | CREATE TABLE table_10966926_2 (
player_name VARCHAR,
college VARCHAR
) |
SELECT time_retired FROM table_name_29 WHERE laps < 33 AND grid = 14 | What was the time/retired with laps less than 33 and a grid of 14? | CREATE TABLE table_name_29 (time_retired VARCHAR, laps VARCHAR, grid VARCHAR) |
SELECT season__number FROM table_16617025_1 WHERE directed_by = "Kate Woods" | In what seasons did Kate Woods direct Without A Trace? | CREATE TABLE table_16617025_1 (season__number VARCHAR, directed_by VARCHAR) |
SELECT "Cover model" FROM table_20220 WHERE "Centerfold model" = 'Shallan Meiers' | WHO WAS THE COVER MODEL OF PLAYBOY WHERE THE CENTERFOLD MODEL WAS SHALLAN MEIERS? | CREATE TABLE table_20220 (
"Date" text,
"Cover model" text,
"Centerfold model" text,
"Interview subject" text,
"20 Questions" text,
"Pictorials" text
) |
SELECT time_retired FROM table_name_46 WHERE driver = "john watson" | What was John Watson's time/retired? | CREATE TABLE table_name_46 (time_retired VARCHAR, driver VARCHAR) |
SELECT written_by FROM table_16617025_1 WHERE season__number = 8 | Who wrote Season 8? | CREATE TABLE table_16617025_1 (written_by VARCHAR, season__number VARCHAR) |
SELECT COUNT(*) AS CNT FROM Posts WHERE Tags LIKE '%java%' AND Tags LIKE '%collision-detection%' | Count questions tagged with a given tag combination. | CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CRE... |
SELECT player FROM table_name_41 WHERE no_s_ = "14" | What is the player with the no. 14? | CREATE TABLE table_name_41 (player VARCHAR, no_s_ VARCHAR) |
SELECT joined_opec FROM table_166346_1 WHERE production___bbl__day_ = "1,213,000 (21st)" | When did the country that produced 1,213,000 (21st) bbl/day join Opec? | CREATE TABLE table_166346_1 (joined_opec VARCHAR, production___bbl__day_ VARCHAR) |
SELECT course_name, COUNT(*) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name | What is the name of each course and the corresponding number of student enrollment. Show bar chart. | CREATE TABLE Courses (
course_id INTEGER,
author_id INTEGER,
subject_id INTEGER,
course_name VARCHAR(120),
course_description VARCHAR(255)
)
CREATE TABLE Subjects (
subject_id INTEGER,
subject_name VARCHAR(120)
)
CREATE TABLE Student_Course_Enrolment (
registration_id INTEGER,
stud... |
SELECT height_in_ft FROM table_name_2 WHERE school_club_team_country = "benetton treviso, italy" | What is the height of the player from Benetton Treviso, Italy? | CREATE TABLE table_name_2 (height_in_ft VARCHAR, school_club_team_country VARCHAR) |
SELECT MIN(area__km²_) FROM table_166346_1 WHERE production___bbl__day_ = "3,200,000 (12th)" | What was the minimum area in square kilometers that produced 3,200,000 (12th) bbl/day? | CREATE TABLE table_166346_1 (area__km²_ INTEGER, production___bbl__day_ VARCHAR) |
SELECT * FROM table_dev_30 WHERE (serum_creatinine >= 1.3 AND gender = 'female') OR (serum_creatinine >= 1.5 AND gender = 'male') | serum creatinine greater than or equal to 1.3 mg / dl for female , and greater than or equal to 1.5 mg / dl for male | CREATE TABLE table_dev_30 (
"id" int,
"gender" string,
"leukopenia" int,
"cd4_count" int,
"stroke" bool,
"platelets" int,
"hematocrit_hct" float,
"fasting_triglycerides" int,
"coronary_stenosis" int,
"hyperlipidemia" bool,
"lymphopenia" int,
"fasting_ldl_cholesterol" int,... |
SELECT pens FROM table_name_10 WHERE conv = "6" | I want to know the pens with conv of 6 | CREATE TABLE table_name_10 (pens VARCHAR, conv VARCHAR) |
SELECT MAX(population__july_2012_) FROM table_166346_1 WHERE area__km²_ = 2149690 | What is the highest poplulation in July 2012 in the country with an area of 2149690 square kilometers? | CREATE TABLE table_166346_1 (population__july_2012_ INTEGER, area__km²_ VARCHAR) |
SELECT "2005" FROM table_34429 WHERE "2004" = '3–2' | Which 2005 has a 2004 of 3 2? | CREATE TABLE table_34429 (
"Tournament" text,
"2003" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text,
"Win %" real
) |
SELECT pens FROM table_name_38 WHERE tries = "1" AND player = "matt alexander" AND conv = "4" | Which pens has 1 tries and matt alexander as a player with conv of 4? | CREATE TABLE table_name_38 (pens VARCHAR, conv VARCHAR, tries VARCHAR, player VARCHAR) |
SELECT region FROM table_166346_1 WHERE production___bbl__day_ = "1,213,000 (21st)" | Which regions had a production (bbl/day) of 1,213,000 (21st)? | CREATE TABLE table_166346_1 (region VARCHAR, production___bbl__day_ VARCHAR) |
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN... | what are the five most frequent diagnoses of patients with age 30s since 6 years ago? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE pr... |
SELECT venue FROM table_name_12 WHERE conv = "5 players on 20 points" | Name the venue that has conv of 5 players on 20 points | CREATE TABLE table_name_12 (venue VARCHAR, conv VARCHAR) |
SELECT country FROM table_166346_1 WHERE production___bbl__day_ = "2,494,000 (10th)" | Which country had a production (bbl/day) of 2,494,000 (10th)? | CREATE TABLE table_166346_1 (country VARCHAR, production___bbl__day_ VARCHAR) |
SELECT phone_number FROM customers UNION SELECT phone_number FROM staff | Find the phone number of all the customers and staff. | CREATE TABLE staff (
phone_number VARCHAR
)
CREATE TABLE customers (
phone_number VARCHAR
) |
SELECT name FROM table_name_90 WHERE wins < 3 AND matches < 15 | What are the names of those who made less than 3 wins in 15 matches? | CREATE TABLE table_name_90 (name VARCHAR, wins VARCHAR, matches VARCHAR) |
SELECT approved_treatment_s_ FROM table_1661124_1 WHERE target = "CD30" | What are all the approved treatments for the target CD30? | CREATE TABLE table_1661124_1 (approved_treatment_s_ VARCHAR, target VARCHAR) |
SELECT Q.Title, A.* FROM Posts AS A JOIN Posts AS Q ON A.ParentId = Q.Id JOIN PostTags ON PostTags.PostId = Q.Id JOIN Tags ON PostTags.TagId = Tags.Id WHERE A.OwnerUserId = '##UserId##' AND A.PostTypeId = 2 AND Q.PostTypeId = 1 AND TagName = 'algorithm' ORDER BY A.Score DESC | My answers on the algorithm tag. | CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
C... |
SELECT high_points FROM table_name_31 WHERE game < 2 | What is the highest amount of points when the game is less than 2? | CREATE TABLE table_name_31 (high_points VARCHAR, game INTEGER) |
SELECT brand_name FROM table_1661124_1 WHERE antibody = "Brentuximab vedotin" | What is the brand name for the antibody Brentuximab Vedotin? | CREATE TABLE table_1661124_1 (brand_name VARCHAR, antibody VARCHAR) |
SELECT MAX(bronze) FROM table_name_99 WHERE nation = "spain" | Which Bronze has a Nation of spain? | CREATE TABLE table_name_99 (
bronze INTEGER,
nation VARCHAR
) |
SELECT score FROM table_name_3 WHERE date = "april 20" | What was the score on April 20? | CREATE TABLE table_name_3 (score VARCHAR, date VARCHAR) |
SELECT COUNT(target) FROM table_1661124_1 WHERE approval_date = 1997 | How many targets are there with an approval date of 1997? | CREATE TABLE table_1661124_1 (target VARCHAR, approval_date VARCHAR) |
SELECT SUM("Crowd") FROM table_33609 WHERE "Venue" = 'glenferrie oval' | What was the attendance when the VFL played Glenferrie Oval? | CREATE TABLE table_33609 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT surface FROM table_name_70 WHERE date = "june 11, 1995" | Name the surface on june 11, 1995 | CREATE TABLE table_name_70 (surface VARCHAR, date VARCHAR) |
SELECT approved_treatment_s_ FROM table_1661124_1 WHERE antibody = "Bevacizumab" | What are the approved treatments when the antibody is bevacizumab? | CREATE TABLE table_1661124_1 (approved_treatment_s_ VARCHAR, antibody VARCHAR) |
SELECT MIN(year) FROM table_name_22 WHERE wins > 0 AND points = 42 | What is the earliest year associated with 0 wins and 42 points? | CREATE TABLE table_name_22 (
year INTEGER,
wins VARCHAR,
points VARCHAR
) |
SELECT score FROM table_name_34 WHERE date = "september 12, 1993" | Name the score for september 12, 1993 | CREATE TABLE table_name_34 (score VARCHAR, date VARCHAR) |
SELECT target FROM table_1661124_1 WHERE approved_treatment_s_ = "non-Hodgkin lymphoma" | What is the target when the approved treatment is non-hodgkin lymphoma? | CREATE TABLE table_1661124_1 (target VARCHAR, approved_treatment_s_ VARCHAR) |
SELECT "Men's doubles" FROM table_75490 WHERE "Year" < '1960' AND "Men's singles" = 'noel b. radford' | Which Men's doubles have a Year smaller than 1960, and Men's singles of noel b. radford? | CREATE TABLE table_75490 (
"Year" real,
"Men's singles" text,
"Women's singles" text,
"Men's doubles" text,
"Women's doubles" text,
"Mixed doubles" text
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.