answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT "Location" FROM table_17255 WHERE "Station Number" = 'C11' | what are all the location where station number is c11 | CREATE TABLE table_17255 (
"Station Number" text,
"District" text,
"Location" text,
"Type" text,
"Appliances" text,
"Registrations" text
) |
SELECT position FROM table_2508633_6 WHERE college = "Delaware" | Name the position for delaware | CREATE TABLE table_2508633_6 (position VARCHAR, college VARCHAR) |
SELECT distance FROM table_28750142_1 WHERE jockey = "Jason Titley" | What is the distance of jockey Jason Titley? | CREATE TABLE table_28750142_1 (distance VARCHAR, jockey 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.long_title = "Abdominal pain, other specified site" AND prescriptions.drug_type = "MAIN" | how many patients diagnosed with abdominal pain,other specified site had drug type as main? | CREATE TABLE procedures (
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
)
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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
) |
SELECT nfl_team FROM table_2508633_6 WHERE player = "Eric Williams" | Name the nfl team for eric williams | CREATE TABLE table_2508633_6 (nfl_team VARCHAR, player VARCHAR) |
SELECT jockey FROM table_28750142_1 WHERE name = "Pink Gin" | What is the name of the jockey for Pink Gin? | CREATE TABLE table_28750142_1 (jockey VARCHAR, name VARCHAR) |
SELECT "Genre" FROM table_70727 WHERE "Release-year of first charted record" = '1968' AND "Country of origin" = 'united states' | What is the Genre, when the Release-year of first charted record is 1968, and when the Country of origin is United States? | CREATE TABLE table_70727 (
"Artist" text,
"Country of origin" text,
"Period active" text,
"Release-year of first charted record" real,
"Genre" text,
"Claimed sales" text
) |
SELECT nfl_team FROM table_2508633_9 WHERE college = "Jackson State" | What NFL team picked a player from Jackson State? | CREATE TABLE table_2508633_9 (nfl_team VARCHAR, college VARCHAR) |
SELECT date FROM table_28768469_10 WHERE location_attendance = "Ford Center 17,021" | The location attendance is ford center 17,021 on what dates? | CREATE TABLE table_28768469_10 (date VARCHAR, location_attendance VARCHAR) |
SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 4401)) AND DATETIME(inputevents_cv.charttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day')) - (SELECT SUM(outputevents.value) 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 = 4401)) AND DATETIME(outputevents.charttime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day')) | what's the difference between the total input and output today for patient 4401? | CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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 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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
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_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title 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 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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
) |
SELECT position FROM table_2508633_9 WHERE college = "Langston" | What position was the draft pick that came from Langston? | CREATE TABLE table_2508633_9 (position VARCHAR, college VARCHAR) |
SELECT COUNT(high_assists) FROM table_28768469_10 WHERE game = 73 | In game 73, what were the total number of high assists? | CREATE TABLE table_28768469_10 (high_assists VARCHAR, game VARCHAR) |
SELECT title, directed_by FROM film WHERE NOT film_id IN (SELECT film_id FROM schedule) | What are the title and director of the films without any schedule? | CREATE TABLE cinema (
cinema_id number,
name text,
openning_year number,
capacity number,
location text
)
CREATE TABLE film (
film_id number,
rank_in_series number,
number_in_season number,
title text,
directed_by text,
original_air_date text,
production_code text
)
CREATE TABLE schedule (
cinema_id number,
film_id number,
date text,
show_times_per_day number,
price number
) |
SELECT COUNT(player) FROM table_2508633_9 WHERE nfl_team = "New England Patriots" AND position = "Running back" | How many players were the running back draft pick for the New England Patriots? | CREATE TABLE table_2508633_9 (player VARCHAR, nfl_team VARCHAR, position VARCHAR) |
SELECT location_attendance FROM table_28768469_2 WHERE date = "October 20" | What is the location for the game on October 20 with it's corresponding attendance? | CREATE TABLE table_28768469_2 (location_attendance VARCHAR, date VARCHAR) |
SELECT COUNT(2 AS nd_leg) FROM table_1061075_1 WHERE aggregate = "7-2" | what is the total number of 2nd leg where aggregate is 7-2 | CREATE TABLE table_1061075_1 (
aggregate VARCHAR
) |
SELECT player FROM table_2508633_9 WHERE nfl_team = "Kansas City Chiefs" | Who was the draft pick for Kansas City Chiefs? | CREATE TABLE table_2508633_9 (player VARCHAR, nfl_team VARCHAR) |
SELECT director FROM table_28785738_1 WHERE no_in_season = 11 | Who directed episode 11 of the season? | CREATE TABLE table_28785738_1 (director VARCHAR, no_in_season VARCHAR) |
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18159) AND prescriptions.drug IN ('albuterol 0.083% neb soln', 'labetalol hcl', 'filgrastim') AND STRFTIME('%y-%m', prescriptions.startdate) = '2105-12' | has patient 18159 been prescribed albuterol 0.083% neb soln, labetalol hcl, or filgrastim in 12/2105. | CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_diagnoses (
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 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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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 d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod 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_items (
row_id number,
itemid number,
label text,
linksto 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
) |
SELECT college FROM table_2508633_9 WHERE nfl_team = "New England Patriots" AND position = "Tight end" | What college did the tight end draft pick for New England Patriots come from? | CREATE TABLE table_2508633_9 (college VARCHAR, nfl_team VARCHAR, position VARCHAR) |
SELECT COUNT(title) FROM table_28802668_3 WHERE no_in_season = 19 | How many episode titles does episode 19 in the season have? | CREATE TABLE table_28802668_3 (title VARCHAR, no_in_season VARCHAR) |
SELECT AVG("Bronze") FROM table_50715 WHERE "Total" = '2' AND "Silver" < '1' AND "Gold" > '1' | What is the average bronze when the total is 2, silver is less than 1 and gold is more than 1? | CREATE TABLE table_50715 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT MIN(cuchumuela_municipality) FROM table_2509112_3 | What is the Cuchumela Municipality minimum? | CREATE TABLE table_2509112_3 (cuchumuela_municipality INTEGER) |
SELECT average FROM table_28798161_3 WHERE bbi = "4/39" | if the bbi is 4/39 what is the average | CREATE TABLE table_28798161_3 (average VARCHAR, bbi VARCHAR) |
SELECT team_nickname FROM table_name_21 WHERE enrollment > 42 OFFSET 326 | Name the team nickname for enrollment more than 42,326 | CREATE TABLE table_name_21 (
team_nickname VARCHAR,
enrollment INTEGER
) |
SELECT language FROM table_2509112_3 WHERE villa_rivero_municipality = 7 | If Villa Rivero Municipality if 7, what is the language? | CREATE TABLE table_2509112_3 (language VARCHAR, villa_rivero_municipality VARCHAR) |
SELECT bbi FROM table_28798161_3 WHERE economy = "3.63" | if the economy is 3.63 what is the bbi | CREATE TABLE table_28798161_3 (bbi VARCHAR, economy VARCHAR) |
SELECT Sex, MIN(Weight) FROM people GROUP BY Sex | What is the minimum weights for people of each sex? Show a bar chart. | 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 real
) |
SELECT COUNT(language) FROM table_2509112_3 WHERE tacachi_municipality = 3 | What is the language total number if the Tacachi Municipality is 3? | CREATE TABLE table_2509112_3 (language VARCHAR, tacachi_municipality VARCHAR) |
SELECT MIN(4 AS wi) FROM table_28798161_3 | in the leage what was the minimum 4wi | CREATE TABLE table_28798161_3 (Id VARCHAR) |
SELECT time_retired FROM table_name_24 WHERE laps = 52 | what is the time/retired when the laps is 52? | CREATE TABLE table_name_24 (
time_retired VARCHAR,
laps VARCHAR
) |
SELECT COUNT(san_benito_municipality) FROM table_2509112_3 WHERE language = "Another native" | If the language is another native, what is the San Benito Municipality total number? | CREATE TABLE table_2509112_3 (san_benito_municipality VARCHAR, language VARCHAR) |
SELECT poor_law_union FROM table_28802165_1 WHERE townland = "Marshalstown" | What is the poor law union on Marshalstown? | CREATE TABLE table_28802165_1 (poor_law_union VARCHAR, townland VARCHAR) |
SELECT AVG(pct) FROM table_name_97 WHERE years = "1905" AND lost > 7 | What is the average percent for the coach from 1905 and more than 7 losses? | CREATE TABLE table_name_97 (
pct INTEGER,
years VARCHAR,
lost VARCHAR
) |
SELECT MIN(vinto_municipality) FROM table_2509113_2 WHERE language = "Spanish" | If the language is Spanish, what is the Vinto Municipality minimum? | CREATE TABLE table_2509113_2 (vinto_municipality INTEGER, language VARCHAR) |
SELECT MAX(s_acre) FROM table_28802165_1 WHERE civil_parish = "Castledermot" | What is the maximum acres in Castledermot? | CREATE TABLE table_28802165_1 (s_acre INTEGER, civil_parish VARCHAR) |
SELECT "Race" FROM table_51654 WHERE "Pole position" = 'alberto ascari' AND "Winning driver" = 'alberto ascari' AND "Fastest lap" = 'luigi villoresi' | Which race did Alberto Ascari have both the Pole position and the win, but Luigi Villoresi set the fastest lap time? | CREATE TABLE table_51654 (
"Race" text,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Constructor" text,
"Tyre" text,
"Report" text
) |
SELECT MAX(quillacollo_municipality) FROM table_2509113_2 WHERE vinto_municipality = 18630 | If the Vinto Municipality is 18630, what is the Quillacollo Municipality? | CREATE TABLE table_2509113_2 (quillacollo_municipality INTEGER, vinto_municipality VARCHAR) |
SELECT civil_parish FROM table_28802165_1 WHERE townland = "Aghafullim" | What is the civil parish of Aghafullim? | CREATE TABLE table_28802165_1 (civil_parish VARCHAR, townland VARCHAR) |
SELECT COUNT("Founded") FROM table_46857 WHERE "League championships" > '0' AND "Club" = 'penn state nittany lions women''s volleyball' | How much Founded has a League championships larger than 0, and a Club of penn state nittany lions women's volleyball? | CREATE TABLE table_46857 (
"Sport" text,
"League" text,
"Club" text,
"Founded" real,
"Venue" text,
"League championships" real,
"Championship years" text
) |
SELECT MIN(sipe_sipe_municipality) FROM table_2509113_2 WHERE language = "Quechua" | What is the Sipe Sipe Municipality minimum if the language is Quechua? | CREATE TABLE table_2509113_2 (sipe_sipe_municipality INTEGER, language VARCHAR) |
SELECT s_acre FROM table_28802165_1 WHERE townland = "Maddenstown Middle" | How many acres is the townland of Maddenstown Middle? | CREATE TABLE table_28802165_1 (s_acre VARCHAR, townland VARCHAR) |
SELECT "Livingstone" FROM table_17718 WHERE "Fitzroy" = '9499' | what's the livingstone with fitzroy being 9499 | CREATE TABLE table_17718 (
"Year" real,
"Total Region" real,
"Rockhampton" real,
"Livingstone" real,
"Fitzroy" real,
"Mt Morgan" real
) |
SELECT MIN(vinto_municipality) FROM table_2509113_2 WHERE language = "Native and Spanish" | If the language is Native and Spanish, what is the Vinto Municipality minimum? | CREATE TABLE table_2509113_2 (vinto_municipality INTEGER, language VARCHAR) |
SELECT COUNT(original_air_date) FROM table_28859177_3 WHERE directed_by = "Bethany Rooney" | How many original air dates did the episode directed by Bethany rooney have? | CREATE TABLE table_28859177_3 (original_air_date VARCHAR, directed_by VARCHAR) |
SELECT state, enr FROM College AS T1 JOIN Tryout AS T2 ON T1.cName = T2.cName WHERE T2.decision = 'yes' ORDER BY state DESC | A bar chart about how many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?, and rank by the state in descending. | CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
)
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
) |
SELECT MIN(vinto_municipality) FROM table_2509113_2 WHERE quillacollo_municipality = 93131 | If the Quillacollo Municipality is 93131, what is the Vinto Municipality minimum? | CREATE TABLE table_2509113_2 (vinto_municipality INTEGER, quillacollo_municipality VARCHAR) |
SELECT production_code FROM table_28859177_3 WHERE original_air_date = "October 15, 2004" | What is the production code for the episode that aired on October 15, 2004? | CREATE TABLE table_28859177_3 (production_code VARCHAR, original_air_date VARCHAR) |
SELECT story_by FROM table_26914076_3 WHERE us_viewers__millions_ = "0.53" | Who wrote the story viewed by 0.53 million viewers? | CREATE TABLE table_26914076_3 (
story_by VARCHAR,
us_viewers__millions_ VARCHAR
) |
SELECT language FROM table_2509350_3 WHERE villa_alcalá_municipality = 1167 | Name the language for villa 1167 | CREATE TABLE table_2509350_3 (language VARCHAR, villa_alcalá_municipality VARCHAR) |
SELECT original_air_date FROM table_28859177_3 WHERE directed_by = "Graeme Clifford" AND written_by = "Lindsay Sturman" | What is the original air date for episode graeme clifford directed and lindsay sturman wrote? | CREATE TABLE table_28859177_3 (original_air_date VARCHAR, directed_by VARCHAR, written_by VARCHAR) |
SELECT year FROM table_name_14 WHERE title = "rio" | What is the Year of Rio? | CREATE TABLE table_name_14 (
year VARCHAR,
title VARCHAR
) |
SELECT MAX(padilla_municipality) FROM table_2509350_3 WHERE language = "Quechua" | Name the most padilla municipality for quechua | CREATE TABLE table_2509350_3 (padilla_municipality INTEGER, language VARCHAR) |
SELECT player FROM table_2886617_6 WHERE nhl_team = "Los Angeles Kings" | Who was the player that was picked by Los Angeles Kings? | CREATE TABLE table_2886617_6 (player VARCHAR, nhl_team VARCHAR) |
SELECT "Highest elevation" FROM table_63629 WHERE "Highest point" = 'schnebelhorn' | What is the highest elevation for the highest point of Schnebelhorn? | CREATE TABLE table_63629 (
"Rank" real,
"Canton" text,
"Highest point" text,
"Highest elevation" text,
"Lowest point" text,
"Lowest elevation" text
) |
SELECT language FROM table_2509350_3 WHERE sopachuy_municipality = 10 | Name the language for sopachuy 10 | CREATE TABLE table_2509350_3 (language VARCHAR, sopachuy_municipality VARCHAR) |
SELECT nationality FROM table_2886617_6 WHERE player = "Peter Slamiar" | What nationality was peter slamiar? | CREATE TABLE table_2886617_6 (nationality VARCHAR, player VARCHAR) |
SELECT COUNT(DISTINCT acc_type) FROM customer | Count the number of different account types. | CREATE TABLE loan (
loan_id text,
loan_type text,
cust_id text,
branch_id text,
amount number
)
CREATE TABLE bank (
branch_id number,
bname text,
no_of_customers number,
city text,
state text
)
CREATE TABLE customer (
cust_id text,
cust_name text,
acc_type text,
acc_bal number,
no_of_loans number,
credit_score number,
branch_id number,
state text
) |
SELECT COUNT(tomina_municipality) FROM table_2509350_3 WHERE villa_alcalá_municipality = 176 | Name the number of tomina for villa alcala for 176 | CREATE TABLE table_2509350_3 (tomina_municipality VARCHAR, villa_alcalá_municipality VARCHAR) |
SELECT college_junior_club_team FROM table_2886617_4 WHERE nhl_team = "New York Rangers" | What team did the New York Rangers recruit a player from? | CREATE TABLE table_2886617_4 (college_junior_club_team VARCHAR, nhl_team VARCHAR) |
SELECT activity_name FROM Activity | What activities do we have? | CREATE TABLE Activity (
activity_name VARCHAR
) |
SELECT MIN(tomina_municipality) FROM table_2509350_3 WHERE el_villar_municipality = 4 | Name the least tomina for el villar being 4 | CREATE TABLE table_2509350_3 (tomina_municipality INTEGER, el_villar_municipality VARCHAR) |
SELECT COUNT(nationality) FROM table_2886617_4 WHERE player = "Marc Savard" | How many countries had players named Marc Savard get picked? | CREATE TABLE table_2886617_4 (nationality VARCHAR, player VARCHAR) |
SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match) | How many schools do not participate in the basketball match? | CREATE TABLE university (
school_id number,
school text,
location text,
founded number,
affiliation text,
enrollment number,
nickname text,
primary_conference text
)
CREATE TABLE basketball_match (
team_id number,
school_id number,
team_name text,
acc_regular_season text,
acc_percent text,
acc_home text,
acc_road text,
all_games text,
all_games_percent number,
all_home text,
all_road text,
all_neutral text
) |
SELECT language FROM table_2509350_3 WHERE el_villar_municipality = 1264 | Name the language for el villar 1264 | CREATE TABLE table_2509350_3 (language VARCHAR, el_villar_municipality VARCHAR) |
SELECT nationality FROM table_2886617_4 WHERE nhl_team = "Vancouver Canucks" | What country does the player who joined the Vancouver Canucks originally hail from? | CREATE TABLE table_2886617_4 (nationality VARCHAR, nhl_team VARCHAR) |
SELECT title FROM table_name_5 WHERE pages > 128 AND vol__number = 5 | What is the title of the edition with more than 128 pages and a volume # of 5? | CREATE TABLE table_name_5 (
title VARCHAR,
pages VARCHAR,
vol__number VARCHAR
) |
SELECT COUNT(games) FROM table_2509505_1 WHERE goals_against = 352 | Name the total number of games for goals against being 352 | CREATE TABLE table_2509505_1 (games VARCHAR, goals_against VARCHAR) |
SELECT COUNT(pick) FROM table_2886617_4 WHERE player = "Alyn McCauley" | How many times did Alyn McCauley get picked? | CREATE TABLE table_2886617_4 (pick VARCHAR, player VARCHAR) |
SELECT MIN("Bronze") FROM table_31794 WHERE "Total" = '3' AND "Silver" > '1' AND "Gold" < '1' | What is the lowest value for bronze with a total of 3 and a value for silver greater than 1 while the value of gold is smaller than 1? | CREATE TABLE table_31794 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT COUNT(games) FROM table_2509505_1 WHERE lost = 41 | Name the total number of games for lost being 41 | CREATE TABLE table_2509505_1 (games VARCHAR, lost VARCHAR) |
SELECT nationality FROM table_2886617_3 WHERE position = "Left Wing" AND college_junior_club_team = "Portland Winterhawks (WHL)" | Which nationality has left wing as the position and college/junior/team is portland winterhawks (whl)? | CREATE TABLE table_2886617_3 (nationality VARCHAR, position VARCHAR, college_junior_club_team VARCHAR) |
SELECT campus FROM table_name_59 WHERE location = "brgy. alangilan, batangas city" | What campus is in Brgy. Alangilan, Batangas City? | CREATE TABLE table_name_59 (
campus VARCHAR,
location VARCHAR
) |
SELECT MAX(goals_for) FROM table_2509505_1 WHERE points = 56 | Name the most goals for 56 points | CREATE TABLE table_2509505_1 (goals_for INTEGER, points VARCHAR) |
SELECT nhl_team FROM table_2886617_3 WHERE player = "Kevin McKay" | Which nhl team has the player kevin mckay? | CREATE TABLE table_2886617_3 (nhl_team VARCHAR, player VARCHAR) |
SELECT CONCAT('https://stackoverflow.com/a/', CAST(Id AS TEXT)) FROM Posts WHERE ParentId IN (SELECT DISTINCT PostId FROM PostTags WHERE TagId = (SELECT Id FROM Tags WHERE TagName = 'data.table')) AND PostTypeId = 2 AND (Body LIKE '%with=F%' OR Body LIKE '%with =F%' OR Body LIKE '%with= F%' OR Body LIKE '%with = F%') AND NOT Body LIKE '%..%' | usage of with in data.table answers. | CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
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
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
) |
SELECT COUNT(won) FROM table_2509505_1 WHERE goals_for = 274 | Name the number of won for goals for being 274 | CREATE TABLE table_2509505_1 (won VARCHAR, goals_for VARCHAR) |
SELECT COUNT(pick) FROM table_2886617_3 WHERE nationality = "Canada" AND player = "Larry Courville" | How many picks have canada as the nationality and larry courville is the player? | CREATE TABLE table_2886617_3 (pick VARCHAR, nationality VARCHAR, player VARCHAR) |
SELECT meter_400, ID FROM swimmer ORDER BY ID | Visualize a bar chart about the distribution of meter_400 and ID , sort in asc by the y axis. | CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE stadium (
ID int,
name text,
Capacity int,
City text,
Country text,
Opening_year int
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
) |
SELECT combaya_municipality FROM table_2509202_2 WHERE quiabaya_municipality = "2" | When the quiabaya municipality is 2 what is the combaya municipality? | CREATE TABLE table_2509202_2 (combaya_municipality VARCHAR, quiabaya_municipality VARCHAR) |
SELECT pick FROM table_2886617_3 WHERE player = "Marko Makinen" | Which pick has marko makinen as the player? | CREATE TABLE table_2886617_3 (pick VARCHAR, player VARCHAR) |
SELECT COUNT("Age") FROM table_2582 WHERE "SP" = '200/1' | How old was the horse when the SP was 200/1? | CREATE TABLE table_2582 (
"Position" text,
"Horse" text,
"Jockey" text,
"Age" real,
"Handicap (st-lb)" text,
"SP" text,
"Distance" text,
"Prize money" text
) |
SELECT guanay_municipality FROM table_2509202_2 WHERE tacacoma_municipality = "4.321" | What is the guanay municipality when the tacacoma municipality is 4.321? | CREATE TABLE table_2509202_2 (guanay_municipality VARCHAR, tacacoma_municipality VARCHAR) |
SELECT college_junior_club_team FROM table_2886617_9 WHERE nhl_team = "Dallas Stars" | What college club team did the Dallas Stars choose their draft pick from? | CREATE TABLE table_2886617_9 (college_junior_club_team VARCHAR, nhl_team VARCHAR) |
SELECT MIN(total) FROM table_name_75 WHERE silver > 0 AND gold = 9 AND bronze < 9 | With a silver greater than 0, gold of 9 and a bronze less than 9, what is the lowest total listed? | CREATE TABLE table_name_75 (
total INTEGER,
bronze VARCHAR,
silver VARCHAR,
gold VARCHAR
) |
SELECT sorata_municipality FROM table_2509202_2 WHERE quiabaya_municipality = "33" | How many people in the sorata municipality when the quiabaya municipality has 33? | CREATE TABLE table_2509202_2 (sorata_municipality VARCHAR, quiabaya_municipality VARCHAR) |
SELECT player FROM table_2886617_9 WHERE nhl_team = "St. Louis Blues" | Who was picked for the draft by St. Louis Blues? | CREATE TABLE table_2886617_9 (player VARCHAR, nhl_team VARCHAR) |
SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID | For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of job_id and the average of manager_id , and group by attribute job_id, order in asc by the JOB_ID. | 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)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
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)
) |
SELECT combaya_municipality FROM table_2509202_2 WHERE quiabaya_municipality = "33" | What is the number for combaya municipality when quiabaya municipality is 33? | CREATE TABLE table_2509202_2 (combaya_municipality VARCHAR, quiabaya_municipality VARCHAR) |
SELECT stadium FROM table_28885977_1 WHERE location = "Adelaide, South Australia" | Which stadium is located in Adelaide, South Australia? | CREATE TABLE table_28885977_1 (stadium VARCHAR, location VARCHAR) |
SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid = T2.gameid JOIN Student AS T3 ON T3.Stuid = T1.Stuid WHERE T3.Lname = "Smith" AND T3.Fname = "Linda" | Show all game names played by Linda Smith | CREATE TABLE Student (
Stuid VARCHAR,
Lname VARCHAR,
Fname VARCHAR
)
CREATE TABLE Video_games (
gameid VARCHAR
)
CREATE TABLE Plays_games (
gameid VARCHAR,
Stuid VARCHAR
) |
SELECT tipuani_municipality FROM table_2509202_2 WHERE tacacoma_municipality = "6" | tipuani municipality when tacacoma municipality is 6? | CREATE TABLE table_2509202_2 (tipuani_municipality VARCHAR, tacacoma_municipality VARCHAR) |
SELECT location FROM table_28885977_1 WHERE built_for = "St Kilda Football Club" | In what location was a stadium built for the St Kilda Football Club? | CREATE TABLE table_28885977_1 (location VARCHAR, built_for VARCHAR) |
SELECT "School" FROM table_2334 WHERE "Enrollment (2005)" = '69' | What school had an enrollment in 2005 of 69? | CREATE TABLE table_2334 (
"School" text,
"Location(s)" text,
"Control" text,
"Type" text,
"Enrollment (2005)" text,
"Founded" real
) |
SELECT guanay_municipality FROM table_2509202_2 WHERE combaya_municipality = "0" | What is the number for the guanay municipality when combaya municipality is 0? | CREATE TABLE table_2509202_2 (guanay_municipality VARCHAR, combaya_municipality VARCHAR) |
SELECT location FROM table_28885977_1 WHERE stadium = "Moorabbin Oval" | What is the location of the Moorabbin Oval stadium? | CREATE TABLE table_28885977_1 (location VARCHAR, stadium VARCHAR) |
SELECT SUM(grid) FROM table_name_98 WHERE driver = "cristiano da matta" AND points < 33 | Which Grid has a Driver of cristiano da matta, and Points smaller than 33? | CREATE TABLE table_name_98 (
grid INTEGER,
driver VARCHAR,
points VARCHAR
) |
SELECT MIN(year) FROM table_251272_4 WHERE location = "Martyrs' Mausoleum, Rangoon, Burma" | What is the first year where the assassination attempt was at Martyrs' Mausoleum, Rangoon, Burma? | CREATE TABLE table_251272_4 (year INTEGER, location VARCHAR) |
SELECT built_for FROM table_28885977_1 WHERE location = "Adelaide, South Australia" | What was the stadium in Adelaide, South Australia built for? | CREATE TABLE table_28885977_1 (built_for VARCHAR, location VARCHAR) |
SELECT "Founded" FROM table_16800 WHERE "House Name" = 'Gongola' | What year was the house named gongola made? | CREATE TABLE table_16800 (
"House Name" text,
"Composition" text,
"Named after" text,
"Founded" real,
"Colours" text
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.