answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND procedures.long_title = "Radical cystectomy" | calculate the total number of patients belonging to white-russian ethnic origin amongst those who had radical cystectomy | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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
) |
SELECT COUNT(record) FROM table_25461946_5 WHERE date = "November 27" | How many games were played on november 27? | CREATE TABLE table_25461946_5 (record VARCHAR, date VARCHAR) |
SELECT player FROM table_name_75 WHERE nationality = "canada" AND pick = "199" | Who is the player from Canada with a 199 pick? | CREATE TABLE table_name_75 (player VARCHAR, nationality VARCHAR, pick VARCHAR) |
SELECT COUNT(draws) FROM table_name_38 WHERE losses = 10 AND wins > 6 | How many draws occured with a record of 10 losses, and 6 wins? | CREATE TABLE table_name_38 (
draws VARCHAR,
losses VARCHAR,
wins VARCHAR
) |
SELECT pole_position FROM table_25459168_2 WHERE supporting = "USAC National Midget Series" | Who got the pole position if the supporting is USAC National Midget Series? | CREATE TABLE table_25459168_2 (pole_position VARCHAR, supporting VARCHAR) |
SELECT college_junior_club_team FROM table_name_59 WHERE pick = "196" | Which college or team has a pick of 196? | CREATE TABLE table_name_59 (college_junior_club_team VARCHAR, pick VARCHAR) |
SELECT "Type" FROM table_60275 WHERE "Model" = '6cm' | What type of car has the model 6cm? | CREATE TABLE table_60275 (
"Model" text,
"Year" text,
"Type" text,
"Engine" text,
"Displacement cc" text
) |
SELECT fastest_lap FROM table_25459168_2 WHERE pole_position = "Anders Krohn" | Who won the fastest lap if Anders Krohn won the pole position? | CREATE TABLE table_25459168_2 (fastest_lap VARCHAR, pole_position VARCHAR) |
SELECT pick FROM table_name_52 WHERE player = "ray giroux" | What is the pick number for Ray Giroux? | CREATE TABLE table_name_52 (pick VARCHAR, player VARCHAR) |
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(DEPARTMENT_ID) | For all employees who have the letters D or S in their first name, give me the comparison about the average of department_id over the hire_date bin hire_date by weekday by a bar chart, sort by the y axis from low to high 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 employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
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 regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
) |
SELECT COUNT(round) FROM table_25459168_2 WHERE fastest_lap = "João Victor Horto" | How many rounds did João Victor Horto achieved the fastest lap? | CREATE TABLE table_25459168_2 (round VARCHAR, fastest_lap VARCHAR) |
SELECT MIN(pick__number) FROM table_name_15 WHERE mls_team = "columbus crew" | Tell me the lowest pick number for columbus crew | CREATE TABLE table_name_15 (pick__number INTEGER, mls_team VARCHAR) |
SELECT Draft_Class, Draft_Pick_Number FROM match_season WHERE Position = "Defender" ORDER BY Draft_Class | what are the draft pick numbers and draft classes for players who play the Defender position?, rank by the X in ascending. | CREATE TABLE match_season (
Season real,
Player text,
Position text,
Country int,
Team int,
Draft_Pick_Number int,
Draft_Class text,
College text
)
CREATE TABLE country (
Country_id int,
Country_name text,
Capital text,
Official_native_language text
)
CREATE TABLE player (
Player_ID int,
Player text,
Years_Played text,
Total_WL text,
Singles_WL text,
Doubles_WL text,
Team int
)
CREATE TABLE team (
Team_id int,
Name text
) |
SELECT circuit FROM table_25459168_2 WHERE date = "August 21" | What circuit was used on August 21? | CREATE TABLE table_25459168_2 (circuit VARCHAR, date VARCHAR) |
SELECT COUNT(pick__number) FROM table_name_5 WHERE affiliation = "university of portland" | Tell me the total number of pick for university of portland | CREATE TABLE table_name_5 (pick__number VARCHAR, affiliation VARCHAR) |
SELECT director FROM table_10798928_1 WHERE original_title = "Dulcinea" | Who directed Dulcinea? | CREATE TABLE table_10798928_1 (
director VARCHAR,
original_title VARCHAR
) |
SELECT COUNT(round) FROM table_25459168_2 WHERE fastest_lap = "Alex Ardoin" | How many rounds did Alex Ardoin achieved a fastest lap? | CREATE TABLE table_25459168_2 (round VARCHAR, fastest_lap VARCHAR) |
SELECT MIN(pick__number) FROM table_name_84 WHERE mls_team = "new england revolution" | Tell me the lowest pick number for new england revolution | CREATE TABLE table_name_84 (pick__number INTEGER, mls_team VARCHAR) |
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'non-invasive mech vent') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 85131 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) ORDER BY procedures_icd.charttime LIMIT 1 | when in their last hospital visit was the first time patient 85131 received non-invasive mech vent? | CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate 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,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
) |
SELECT design FROM table_25468520_1 WHERE quantity = "5,000,000" | What is the design when quantity is 5,000,000? | CREATE TABLE table_25468520_1 (design VARCHAR, quantity VARCHAR) |
SELECT affiliation FROM table_name_87 WHERE player = "diego walsh" | Tell me the affiliation for diego walsh | CREATE TABLE table_name_87 (affiliation VARCHAR, player VARCHAR) |
SELECT Class, COUNT(Class) FROM captain GROUP BY Class ORDER BY Class DESC | What is the total number of captains with different classes?, sort by the bars in desc. | CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) |
SELECT COUNT(printing_process) FROM table_25468520_1 WHERE theme = "Rotary International : 100 Years in Canada" | How many time is the theme rotary international : 100 years in canada? | CREATE TABLE table_25468520_1 (printing_process VARCHAR, theme VARCHAR) |
SELECT COUNT(pick__number) FROM table_name_78 WHERE affiliation = "university of virginia" | Tell me the total number of pick for university of virginia | CREATE TABLE table_name_78 (pick__number VARCHAR, affiliation VARCHAR) |
SELECT rank__number FROM table_name_90 WHERE attendance = "68,586" | What rank were the Buckeyes when there were 68,586 in attendance? | CREATE TABLE table_name_90 (
rank__number VARCHAR,
attendance VARCHAR
) |
SELECT paper_type FROM table_25468520_1 WHERE date_of_issue = "July 8" | What is the paper type for the date of issue July 8? | CREATE TABLE table_25468520_1 (paper_type VARCHAR, date_of_issue VARCHAR) |
SELECT d3_compatible FROM table_name_76 WHERE availability = "yes" AND name = "wode jukebox" | Tell me the D3 compatible for availability of yes for wode jukebox | CREATE TABLE table_name_76 (d3_compatible VARCHAR, availability VARCHAR, name VARCHAR) |
SELECT date, AVG(cloud_cover) FROM weather ORDER BY AVG(cloud_cover) | For those dates that have the 5 highest cloud cover rates, please bin the date into day of the week interval and compute their average cloud cover, and display y-axis in ascending order. | CREATE TABLE trip (
id INTEGER,
duration INTEGER,
start_date TEXT,
start_station_name TEXT,
start_station_id INTEGER,
end_date TEXT,
end_station_name TEXT,
end_station_id INTEGER,
bike_id INTEGER,
subscription_type TEXT,
zip_code INTEGER
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_dew_point_f INTEGER,
max_humidity INTEGER,
mean_humidity INTEGER,
min_humidity INTEGER,
max_sea_level_pressure_inches NUMERIC,
mean_sea_level_pressure_inches NUMERIC,
min_sea_level_pressure_inches NUMERIC,
max_visibility_miles INTEGER,
mean_visibility_miles INTEGER,
min_visibility_miles INTEGER,
max_wind_Speed_mph INTEGER,
mean_wind_speed_mph INTEGER,
max_gust_speed_mph INTEGER,
precipitation_inches INTEGER,
cloud_cover INTEGER,
events TEXT,
wind_dir_degrees INTEGER,
zip_code INTEGER
)
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE station (
id INTEGER,
name TEXT,
lat NUMERIC,
long NUMERIC,
dock_count INTEGER,
city TEXT,
installation_date TEXT
) |
SELECT theme FROM table_25468520_1 WHERE printing_process = "Litho in 3 cols and intaglio" | What is the theme when the printing process is litho in 3 cols and intaglio? | CREATE TABLE table_25468520_1 (theme VARCHAR, printing_process VARCHAR) |
SELECT pts FROM table_name_96 WHERE div = "glasgow rocks" | Tell me the pts for glasgow rocks | CREATE TABLE table_name_96 (pts VARCHAR, div VARCHAR) |
SELECT "Revenue (millions)" FROM table_38365 WHERE "Population" > '1,499,402' AND "Spending (millions)" = '$13,986' | What is the Revenue of the population of more than 1,499,402, with Spending (millions) of $13,986? | CREATE TABLE table_38365 (
"State" text,
"Revenue (millions)" text,
"Population" real,
"Revenue per capita" text,
"Spending (millions)" text,
"Spending per capita" text,
"Net contribution per capita" text
) |
SELECT COUNT(quantity) FROM table_25468520_1 WHERE theme = "Roadside Attractions: Wawa Goose" | How many times is the theme roadside attractions: wawa goose? | CREATE TABLE table_25468520_1 (quantity VARCHAR, theme VARCHAR) |
SELECT season FROM table_name_97 WHERE play_offs = "quarter-final" AND pos = "4th" | Tell me the season for quarter-final position of 4th | CREATE TABLE table_name_97 (season VARCHAR, play_offs VARCHAR, pos VARCHAR) |
SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.dob_year > "2078" | what is minimum age of patients whose admission type is emergency and year of birth is greater than 2078? | 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
)
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 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) |
SELECT theme FROM table_25468520_1 WHERE date_of_issue = "11 January 2010" | What is the theme when the date of issue is 11 january 2010? | CREATE TABLE table_25468520_1 (theme VARCHAR, date_of_issue VARCHAR) |
SELECT AVG(laps) FROM table_name_51 WHERE grid = 6 | Tell me the average Laps for grid of 6 | CREATE TABLE table_name_51 (laps INTEGER, grid VARCHAR) |
SELECT COUNT(year) FROM table_name_74 WHERE record = "73-65" | How many years have a Record of 73-65? | CREATE TABLE table_name_74 (
year VARCHAR,
record VARCHAR
) |
SELECT date FROM table_25461946_8 WHERE team = "Dayton" | When did they play Dayton? | CREATE TABLE table_25461946_8 (date VARCHAR, team VARCHAR) |
SELECT carburetor FROM table_name_69 WHERE engine = "250-1v i-6" | Tell me the carburetor for engine of 250-1v i-6 | CREATE TABLE table_name_69 (carburetor VARCHAR, engine VARCHAR) |
SELECT visitor FROM table_name_14 WHERE date = "february 21" | Which visitor visited on February 21? | CREATE TABLE table_name_14 (
visitor VARCHAR,
date VARCHAR
) |
SELECT platform FROM table_25474825_1 WHERE software = "GeWorkbench" | What is the platform of Geworkbench? | CREATE TABLE table_25474825_1 (platform VARCHAR, software VARCHAR) |
SELECT bore_ & _stroke FROM table_name_9 WHERE engine = "351-2v cleveland v8" | Tell me the bore and stroke for Engine of 351-2v cleveland v8 | CREATE TABLE table_name_9 (bore_ VARCHAR, _stroke VARCHAR, engine VARCHAR) |
SELECT "Surface" FROM table_55036 WHERE "Opponent" = 'fernando verdasco' | Which surface has an Opponent of fernando verdasco? | CREATE TABLE table_55036 (
"Outcome" text,
"Date" text,
"Surface" text,
"Opponent" text,
"Score" text
) |
SELECT description FROM table_25474825_1 WHERE license = "GNU GPL v2 or Ruby license" | What is the description of the license for GNU GPL v2 or Ruby license? | CREATE TABLE table_25474825_1 (description VARCHAR, license VARCHAR) |
SELECT COUNT(silver) FROM table_name_61 WHERE rank = 2 AND total < 5 | Which country is ranked number 2 and has less than 5 total medals? | CREATE TABLE table_name_61 (silver VARCHAR, rank VARCHAR, total VARCHAR) |
SELECT "Mens Doubles" FROM table_30303 WHERE "Mens Singles" = 'Wang Hao' | Who won the mens doubles when wang hao won the mens singles? | CREATE TABLE table_30303 (
"Year Location" text,
"Mens Singles" text,
"Womens Singles" text,
"Mens Doubles" text,
"Womens Doubles" text
) |
SELECT license FROM table_25474825_1 WHERE description = "Tool for designing and executing workflows" | What is the license that is described as a tool for designing and executing workflows? | CREATE TABLE table_25474825_1 (license VARCHAR, description VARCHAR) |
SELECT time___mt__ FROM table_name_13 WHERE opponent = "kansas city chiefs" AND date = "nov 11" | What is the (MT) time which has kansas city chiefs as an opponent on nov 11? | CREATE TABLE table_name_13 (time___mt__ VARCHAR, opponent VARCHAR, date VARCHAR) |
SELECT "2nd leg" FROM table_41692 WHERE "Team #2" = 'pamesa valencia' | Which 2nd leg has pamesa valencia for team #2? | CREATE TABLE table_41692 (
"Team #1" text,
"Agg." text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
) |
SELECT description FROM table_25474825_1 WHERE software = "IntAct" | What is the description of the intact software? | CREATE TABLE table_25474825_1 (description VARCHAR, software VARCHAR) |
SELECT opponents_in_the_final FROM table_name_27 WHERE outcome = "runner-up" AND surface = "grass" | Tell me the opponents for runner-up and surface of grass | CREATE TABLE table_name_27 (opponents_in_the_final VARCHAR, outcome VARCHAR, surface VARCHAR) |
SELECT AVG("Gold") FROM table_13501 WHERE "Rank" = 'total' AND "Silver" > '20' | what is the average gold when rank is total and silver is more than 20? | CREATE TABLE table_13501 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT user FROM table_25479607_3 WHERE max_demand_charge___rs__kva_ = "1,100" AND unit__kwh__time_range = "H-2: Off-peak (22:30-05:30)" | What user had a max demand charge of 1,100 and a unit/time range of h-2: off-peak (22:30-05:30)? | CREATE TABLE table_25479607_3 (user VARCHAR, max_demand_charge___rs__kva_ VARCHAR, unit__kwh__time_range VARCHAR) |
SELECT venue FROM table_name_88 WHERE opponent = "netherlands" | Name the venue for netherlands opponent | CREATE TABLE table_name_88 (venue VARCHAR, opponent VARCHAR) |
SELECT "Home team" FROM table_56113 WHERE "Home team score" = '12.11 (83)' | Which home team scored 12.11 (83)? | CREATE TABLE table_56113 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT fixed_charge___rs__kwh_ FROM table_25479607_3 WHERE tariff___rs__kwh_ = "11.30" | What is the fixed charge for the user who had a tariff of 11.30? | CREATE TABLE table_25479607_3 (fixed_charge___rs__kwh_ VARCHAR, tariff___rs__kwh_ VARCHAR) |
SELECT opponent FROM table_name_46 WHERE date = "10-04-2007" | Name the opponent for 10-04-2007 | CREATE TABLE table_name_46 (opponent VARCHAR, date VARCHAR) |
SELECT "rider" FROM table_204_214 WHERE "points" = 25 | which rider came in first with 25 points ? | CREATE TABLE table_204_214 (
id number,
"pos" text,
"no." number,
"rider" text,
"manufacturer" text,
"laps" number,
"time/retired" text,
"grid" number,
"points" number
) |
SELECT fixed_charge___rs__kwh_ FROM table_25479607_3 WHERE unit__kwh__time_range = "I-2: Peak (18:30-22:30)" | What is the fixed charge for the user with a unit/time range of i-2: peak (18:30-22:30)? | CREATE TABLE table_25479607_3 (fixed_charge___rs__kwh_ VARCHAR, unit__kwh__time_range VARCHAR) |
SELECT runs__balls_ FROM table_name_9 WHERE wicket = "3rd" AND opponent = "australia" | Name the runs balls for wicket of 3rd for australia opponent | CREATE TABLE table_name_9 (runs__balls_ VARCHAR, wicket VARCHAR, opponent VARCHAR) |
SELECT AVG(attendance) FROM table_name_32 WHERE opponent = "kansas city chiefs" AND week < 13 | What is the attendance for the game against the Kansas City Chiefs earlier than week 13? | CREATE TABLE table_name_32 (
attendance INTEGER,
opponent VARCHAR,
week VARCHAR
) |
SELECT max_demand_charge___rs__kva_ FROM table_25479607_3 WHERE tariff___rs__kwh_ = "8.85" | What was the max demand charge for the user with a tariff of 8.85? | CREATE TABLE table_25479607_3 (max_demand_charge___rs__kva_ VARCHAR, tariff___rs__kwh_ VARCHAR) |
SELECT wicket FROM table_name_59 WHERE date = "19-03-2007" | Name the wicket for 19-03-2007 | CREATE TABLE table_name_59 (wicket VARCHAR, date VARCHAR) |
SELECT place FROM table_name_95 WHERE to_par = "–5" AND player = "nick faldo" | With a To par of 5, what is Nick Faldo's Place? | CREATE TABLE table_name_95 (
place VARCHAR,
to_par VARCHAR,
player VARCHAR
) |
SELECT COUNT(pick__number) FROM table_25518547_2 WHERE affiliation = "University of California NorCal Lamorinda United" | How many picks are there with an affiliation is the University of California Norcal Lamorinda United? | CREATE TABLE table_25518547_2 (pick__number VARCHAR, affiliation VARCHAR) |
SELECT fleet FROM table_name_63 WHERE launched = "july 30, 1961" | Which fleet launched on July 30, 1961? | CREATE TABLE table_name_63 (fleet VARCHAR, launched VARCHAR) |
SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country ORDER BY Country | Show the number of the countries that have managers of age above 50 or below 46, and could you show by the bars from low to high? | CREATE TABLE railway_manage (
Railway_ID int,
Manager_ID int,
From_Year text
)
CREATE TABLE manager (
Manager_ID int,
Name text,
Country text,
Working_year_starts text,
Age int,
Level int
)
CREATE TABLE railway (
Railway_ID int,
Railway text,
Builder text,
Built text,
Wheels text,
Location text,
ObjectNumber text
)
CREATE TABLE train (
Train_ID int,
Train_Num text,
Name text,
From text,
Arrival text,
Railway_ID int
) |
SELECT mls_team FROM table_25518547_2 WHERE player = "Seth Sinovic" | What team does Seth Sinovic play for? | CREATE TABLE table_25518547_2 (mls_team VARCHAR, player VARCHAR) |
SELECT shipyard FROM table_name_72 WHERE laid_down = "april 21, 1962" | Which shipyard has a fleet that was laid down on April 21, 1962? | CREATE TABLE table_name_72 (shipyard VARCHAR, laid_down VARCHAR) |
SELECT "Score" FROM table_43140 WHERE "Home" = 'broadview hawks' | What was the score of the game with the Broadview Hawks as the home team? | CREATE TABLE table_43140 (
"Date" text,
"Time" text,
"Home" text,
"Away" text,
"Score" text,
"Ground" text
) |
SELECT COUNT(player) FROM table_25518547_2 WHERE affiliation = "University of Maryland" | How many players have an affiliation with University of Maryland? | CREATE TABLE table_25518547_2 (player VARCHAR, affiliation VARCHAR) |
SELECT status FROM table_name_9 WHERE commissioned = "july 28, 1963" | What is the status of the fleet that was commissioned on July 28, 1963? | CREATE TABLE table_name_9 (status VARCHAR, commissioned VARCHAR) |
SELECT COUNT("album") FROM table_204_928 WHERE "label" = 'capitol records' | how many total albums did this group have under capitol records ? | CREATE TABLE table_204_928 (
id number,
"year" number,
"album" text,
"territory" text,
"label" text,
"notes" text
) |
SELECT round FROM table_25505246_8 WHERE against = "South Africa" | in what round types did the opponent come from south africa? | CREATE TABLE table_25505246_8 (round VARCHAR, against VARCHAR) |
SELECT launched FROM table_name_23 WHERE commissioned = "august 31, 1964" | Tell me the launched for august 31, 1964 | CREATE TABLE table_name_23 (launched VARCHAR, commissioned VARCHAR) |
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, 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.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'malig neo bladder nos') AND DATETIME(diagnoses_icd.charttime) >= DATETIME(CURRENT_TIME(), '-5 year')) AS t1 JOIN (SELECT admissions.subject_id, procedures_icd.icd9_code, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE DATETIME(procedures_icd.charttime) >= DATETIME(CURRENT_TIME(), '-5 year')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND DATETIME(t2.charttime) BETWEEN DATETIME(t1.charttime) AND DATETIME(t1.charttime, '+2 month') GROUP BY t2.icd9_code) AS t3 WHERE t3.c1 <= 4) | what was the top four most frequent procedures performed since 5 years ago that patients were given within 2 months after the diagnosis of malig neo bladder nos? | CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
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,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
) |
SELECT outcome FROM table_25505246_8 WHERE partner = "Caroline Wozniacki" | How did the match end when she played with caroline wozniacki? | CREATE TABLE table_25505246_8 (outcome VARCHAR, partner VARCHAR) |
SELECT commissioned FROM table_name_12 WHERE launched = "december 30, 1965" | Tell me what was commissioned december 30, 1965 | CREATE TABLE table_name_12 (commissioned VARCHAR, launched VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "RASH" AND prescriptions.route = "IV" | how many patients are diagnosed with primary disease rash and suggested with drug route via iv? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
) |
SELECT MAX(founded) FROM table_255188_1 WHERE joined = 1978 | When was the University founded that joined in 1978? | CREATE TABLE table_255188_1 (founded INTEGER, joined VARCHAR) |
SELECT MIN(episode__number) FROM table_name_29 WHERE demo = "0.7/3" | Which episode with a demo of 0.7/3 was the lowest? | CREATE TABLE table_name_29 (episode__number INTEGER, demo VARCHAR) |
SELECT "Date" FROM table_71400 WHERE "Opponents in the final" = 'akgul amanmuradova nina bratchikova' | Which date has opponents, Akgul Amanmuradova Nina Bratchikova, in the final? | CREATE TABLE table_71400 (
"Date" text,
"Tournament" text,
"Surface" text,
"Tier" text,
"Partner" text,
"Opponents in the final" text,
"Score" text
) |
SELECT MAX(founded) FROM table_255188_1 WHERE institution = "Piedmont College" | When was Piedmont College founded? | CREATE TABLE table_255188_1 (founded INTEGER, institution VARCHAR) |
SELECT air_date FROM table_name_48 WHERE demo = "1.6/5" | When is the air date that demo-ed at 1.6/5? | CREATE TABLE table_name_48 (air_date VARCHAR, demo VARCHAR) |
SELECT MAX("Played") FROM table_34593 WHERE "Difference" = '- 8' AND "Position" > '8' | What is the largest played number when the difference is - 8 and position is more than 8? | CREATE TABLE table_34593 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) |
SELECT MAX(founded) FROM table_255188_1 WHERE nickname = "Avenging Angels" | When were the Avenging Angels founded? | CREATE TABLE table_255188_1 (founded INTEGER, nickname VARCHAR) |
SELECT title FROM table_name_37 WHERE demo = "1.6/5" | For demo 1.6/5, what is the title? | CREATE TABLE table_name_37 (title VARCHAR, demo VARCHAR) |
SELECT MIN("year") FROM table_203_163 WHERE "romanians" < 51000 | what was the first year that the romanian population was less than 51,000 ? | CREATE TABLE table_203_163 (
id number,
"year" number,
"total" number,
"serbs" text,
"hungarians" text,
"germans" text,
"romanians" text,
"slovaks" text
) |
SELECT institution FROM table_255188_1 WHERE joined = 1988 | What institution joined in 1988? | CREATE TABLE table_255188_1 (institution VARCHAR, joined VARCHAR) |
SELECT date FROM table_name_2 WHERE opponent = "gabriela paz-franco" | What date was gabriela paz-franco the opponent? | CREATE TABLE table_name_2 (date VARCHAR, opponent VARCHAR) |
SELECT power__kw_ FROM table_name_72 WHERE frequency = "95.1mhz" | What is the Power (kW) for the station with a frequency of 95.1mhz? | CREATE TABLE table_name_72 (
power__kw_ VARCHAR,
frequency VARCHAR
) |
SELECT location FROM table_255188_3 WHERE nickname = "49ers" | What location is nicknamed the 49ers? | CREATE TABLE table_255188_3 (location VARCHAR, nickname VARCHAR) |
SELECT surface FROM table_name_43 WHERE date = "september 13, 2009" | What surface was the game played on for the September 13, 2009 match? | CREATE TABLE table_name_43 (surface VARCHAR, date VARCHAR) |
SELECT SUM("Frequency MHz") FROM table_69060 WHERE "Class" = 'b1' | What is the total of Frequency MHz with a Class of b1? | CREATE TABLE table_69060 (
"Call sign" text,
"Frequency MHz" real,
"City of license" text,
"ERP W" text,
"Class" text,
"FCC info" text
) |
SELECT location FROM table_255188_3 WHERE institution = "University of North Carolina at Greensboro" | Where is the University of North Carolina at Greensboro located? | CREATE TABLE table_255188_3 (location VARCHAR, institution VARCHAR) |
SELECT track FROM table_name_86 WHERE pole_position = "takashi kogure" | On which track did Takashi Kogure hold pole position? | CREATE TABLE table_name_86 (track VARCHAR, pole_position VARCHAR) |
SELECT "Opponent#" FROM table_50221 WHERE "Result" = 'w24-7' | Who was the opponent when the result was w24-7? | CREATE TABLE table_50221 (
"Date" text,
"Opponent#" text,
"Rank #" text,
"Site" text,
"Result" text,
"Attendance" text
) |
SELECT hypotenuse_0_c FROM table_25519358_1 WHERE vertices = "月山泛 ΔYMF" | Name the hypotenuse for vertices 月山泛 δymf | CREATE TABLE table_25519358_1 (hypotenuse_0_c VARCHAR, vertices VARCHAR) |
SELECT pole_position FROM table_name_33 WHERE team = "arting team impul" AND round = 3 | On round 3 for Arting Team Impul, who held pole position? | CREATE TABLE table_name_33 (pole_position VARCHAR, team VARCHAR, round VARCHAR) |
SELECT SUM("Bronze") FROM table_64829 WHERE "Nation" = 'west germany' | How many bronzes have west germany as the nation? | CREATE TABLE table_64829 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.