answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1 | Which winery is the wine that has the highest score from? | CREATE TABLE WINE (Winery VARCHAR, SCORE VARCHAR) |
SELECT Location, COUNT(Location) FROM shop GROUP BY Location | Create a bar chart showing how many location across location | CREATE TABLE stock (
Shop_ID int,
Device_ID int,
Quantity int
)
CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
Software_Platform text
)
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Dat... |
SELECT operator FROM table_18333678_2 WHERE arrival = "13.39" | what is the operator of trains arriving at 13.39 | CREATE TABLE table_18333678_2 (operator VARCHAR, arrival VARCHAR) |
SELECT Name FROM WINE WHERE YEAR = "2008" | Find the names of all wines produced in 2008. | CREATE TABLE WINE (Name VARCHAR, YEAR VARCHAR) |
SELECT CONCAT(YEAR(P.CreationDate), '-', MONTH(P.CreationDate)) AS YearMonth, 'MongoDB' AS TagName, COUNT(*) AS PostCount FROM Posts AS P INNER JOIN PostTags AS PT ON (P.Id = PT.PostId) INNER JOIN Tags AS T ON (PT.TagId = T.Id) WHERE T.TagName LIKE 'mongodb%' GROUP BY YEAR(P.CreationDate), MONTH(P.CreationDate) ORDER B... | DBA - Total Posts by Database Server Per Month - MongoDB. | 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 PostsWithDeleted (
Id number,
PostTypeId number,
Acc... |
SELECT arrival FROM table_18333678_2 WHERE departure = "11.35" | when does the train departuring at 11.35 arrive | CREATE TABLE table_18333678_2 (arrival VARCHAR, departure VARCHAR) |
SELECT Grape, Appelation FROM WINE | List the grapes and appelations of all wines. | CREATE TABLE WINE (Grape VARCHAR, Appelation VARCHAR) |
SELECT launch_date FROM table_245801_1 WHERE crew = "Vladimir Lyakhov , Aleksandr Pavlovich Aleksandrov" | Name the launch date for vladimir lyakhov , aleksandr pavlovich aleksandrov | CREATE TABLE table_245801_1 (
launch_date VARCHAR,
crew VARCHAR
) |
SELECT departure FROM table_18333678_2 WHERE going_to = "Bourne" AND arrival = "11.45" | when does the train arriving at bourne at 11.45 departure | CREATE TABLE table_18333678_2 (departure VARCHAR, going_to VARCHAR, arrival VARCHAR) |
SELECT Name, Score FROM WINE | List the names and scores of all wines. | CREATE TABLE WINE (Name VARCHAR, Score VARCHAR) |
SELECT "Date" FROM table_38927 WHERE "Opponent" = 'at seattle mariners' | When has an Opponent of at Seattle mariners? | CREATE TABLE table_38927 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Save" text
) |
SELECT departure FROM table_18333678_2 WHERE arrival = "11.45" AND going_to = "Stamford East" | when does the train arriving at stamford east at 11.45 departure | CREATE TABLE table_18333678_2 (departure VARCHAR, arrival VARCHAR, going_to VARCHAR) |
SELECT Area, County FROM APPELLATIONS | List the area and county of all appelations. | CREATE TABLE APPELLATIONS (Area VARCHAR, County VARCHAR) |
SELECT COUNT(DISTINCT services) FROM station | How many different services are provided by all stations? | CREATE TABLE station (
id number,
network_name text,
services text,
local_authority text
)
CREATE TABLE train (
id number,
train_number number,
name text,
origin text,
destination text,
time text,
interval text
)
CREATE TABLE weekly_weather (
station_id number,
day_... |
SELECT clubs_remaining FROM table_18328569_1 WHERE winners_from_previous_round = "4" | How many clubs are remaining when the winners from the previous round totals 4? | CREATE TABLE table_18328569_1 (clubs_remaining VARCHAR, winners_from_previous_round VARCHAR) |
SELECT Price FROM WINE WHERE YEAR < 2010 | What are the prices of wines produced before the year of 2010? | CREATE TABLE WINE (Price VARCHAR, YEAR INTEGER) |
SELECT density__inhabitants_km_2__ FROM table_1449176_1 WHERE common_of = "Chieri" | The common of Chieri has what population density? | CREATE TABLE table_1449176_1 (
density__inhabitants_km_2__ VARCHAR,
common_of VARCHAR
) |
SELECT round FROM table_18328569_1 WHERE winners_from_previous_round = "8" | What is the round where winners from the previous round totals 8? | CREATE TABLE table_18328569_1 (round VARCHAR, winners_from_previous_round VARCHAR) |
SELECT Name FROM WINE WHERE score > 90 | List the names of all distinct wines that have scores higher than 90. | CREATE TABLE WINE (Name VARCHAR, score INTEGER) |
SELECT MAX("Area (msr)") FROM table_12824 WHERE "Area (sq.deg.)" < '291.045' AND "Family" = 'per' AND "Rank" > '78' | What is the largest Area (msr) that has an Area less than 291.045, is part of the Per family, and has a rank higher than 78? | CREATE TABLE table_12824 (
"Rank" real,
"Family" text,
"Abbre\u00adviation" text,
"Constellation" text,
"Area (sq.deg.)" real,
"Area (msr)" real,
"Per\u00adcent\u00adage" text,
"Right ascension (hm)" real,
"Decli\u00adnation (dm)" text,
"Quad" text
) |
SELECT MIN(clubs_remaining) FROM table_18328569_1 WHERE round = "Fourth round" | How many clubs remain in the fourth round? | CREATE TABLE table_18328569_1 (clubs_remaining INTEGER, round VARCHAR) |
SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" | List the names of all distinct wines that are made of red color grape. | CREATE TABLE GRAPES (Grape VARCHAR, Color VARCHAR); CREATE TABLE WINE (Name VARCHAR, Grape VARCHAR) |
SELECT team FROM table_25318033_1 WHERE points = "137" | What team has 137 points? | CREATE TABLE table_25318033_1 (
team VARCHAR,
points VARCHAR
) |
SELECT new_entries_this_round FROM table_18328569_1 WHERE winners_from_previous_round = "32" | How many new entries started in the round where winners from the previous round is 32? | CREATE TABLE table_18328569_1 (new_entries_this_round VARCHAR, winners_from_previous_round VARCHAR) |
SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "North Coast" | Find the names of all distinct wines that have appellations in North Coast area. | CREATE TABLE APPELLATIONs (Appelation VARCHAR, Area VARCHAR); CREATE TABLE WINE (Name VARCHAR, Appelation VARCHAR) |
SELECT attendance FROM table_name_99 WHERE date = "august 15" | What is the Attendance on august 15? | CREATE TABLE table_name_99 (
attendance VARCHAR,
date VARCHAR
) |
SELECT new_entries_this_round FROM table_18328569_1 WHERE round = "Quarter finals" | How many new entries started in the quarter finals? | CREATE TABLE table_18328569_1 (new_entries_this_round VARCHAR, round VARCHAR) |
SELECT COUNT(*) FROM WINE WHERE Winery = "Robert Biale" | How many wines are produced at Robert Biale winery? | CREATE TABLE WINE (Winery VARCHAR) |
SELECT COUNT("Game") FROM table_44155 WHERE "Team" = '@ new york' | What is the total of the game that the team was @ new york? | CREATE TABLE table_44155 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT new_entries_this_round FROM table_18328569_1 WHERE winners_from_previous_round = "16" | How many new entries started in the round where winners from the previous round is 16? | CREATE TABLE table_18328569_1 (new_entries_this_round VARCHAR, winners_from_previous_round VARCHAR) |
SELECT COUNT(*) FROM APPELLATIONS WHERE County = "Napa" | How many appelations are in Napa Country? | CREATE TABLE APPELLATIONS (County VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "BOWEL OBSTRUCTION" AND demographic.age < "56" | how many patients aged below 56 years had bowel obstruction as the primary disease? | 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,
... |
SELECT operator FROM table_18365784_3 WHERE departure = "11.02" | Who was the train operator when the train departed at 11.02 in 1922? | CREATE TABLE table_18365784_3 (operator VARCHAR, departure VARCHAR) |
SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Sonoma" | Give me the average prices of wines that are produced by appelations in Sonoma County. | CREATE TABLE WINE (Price INTEGER, Appelation VARCHAR); CREATE TABLE APPELLATIONS (Appelation VARCHAR, County VARCHAR) |
SELECT time FROM table_name_43 WHERE notes = "fb" AND country = "canada" | What is the time with FB notes for Canada? | CREATE TABLE table_name_43 (
time VARCHAR,
notes VARCHAR,
country VARCHAR
) |
SELECT going_to FROM table_18365784_3 WHERE calling_at = "Boston, Sleaford, Nottingham Victoria" | What was the train destination when it has a calling at Boston, Sleaford, Nottingham Victoria? | CREATE TABLE table_18365784_3 (going_to VARCHAR, calling_at VARCHAR) |
SELECT T2.Name, T2.Score FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" | What are the names and scores of wines that are made of white color grapes? | CREATE TABLE GRAPES (Grape VARCHAR, Color VARCHAR); CREATE TABLE WINE (Name VARCHAR, Score VARCHAR, Grape VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND prescriptions.route = "ED" | how many black/haitian patients had the drug route ed? | 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
)
C... |
SELECT departure FROM table_18365784_3 WHERE going_to = "Boston" | What was the departure time of the train going to Boston? | CREATE TABLE table_18365784_3 (departure VARCHAR, going_to VARCHAR) |
SELECT MAX(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.Area = "Central Coast" AND T2.year < 2005 | Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005. | CREATE TABLE APPELLATIONS (Appelation VARCHAR, Area VARCHAR); CREATE TABLE WINE (Price INTEGER, Appelation VARCHAR, year VARCHAR) |
SELECT name FROM people WHERE height > 200 OR height < 190 | find the names of people who are taller than 200 or lower than 190. | CREATE TABLE candidate (
candidate_id number,
people_id number,
poll_source text,
date text,
support_rate number,
consider_rate number,
oppose_rate number,
unsure_rate number
)
CREATE TABLE people (
people_id number,
sex text,
name text,
date_of_birth text,
height nu... |
SELECT arrival FROM table_18365784_3 WHERE departure = "18.16" | What was the arrival time of the train that departed at 18.16? | CREATE TABLE table_18365784_3 (arrival VARCHAR, departure VARCHAR) |
SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "White" AND T2.score > 90 | Find the the grape whose white color grapes are used to produce wines with scores higher than 90. | CREATE TABLE GRAPES (Grape VARCHAR, Color VARCHAR); CREATE TABLE WINE (Grape VARCHAR, score VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.insurance = "Government" | what is the number of patients whose gender is m and insurance is government? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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,
... |
SELECT departure FROM table_18365784_3 WHERE arrival = "21.26" | What was the departure time of the train that arrived at 21.26? | CREATE TABLE table_18365784_3 (departure VARCHAR, arrival VARCHAR) |
SELECT T2.Name FROM Grapes AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape WHERE T1.Color = "Red" AND T2.price > 50 | What are the wines that have prices higher than 50 and made of Red color grapes? | CREATE TABLE WINE (Name VARCHAR, Grape VARCHAR, price VARCHAR); CREATE TABLE Grapes (Grape VARCHAR, Color VARCHAR) |
SELECT "Name" FROM table_59699 WHERE "Transfer fee" = 'free' AND "Moving to" = 'retired' | WHAT NAME HAS A FREE TRANSFER FREE AND RETIRED? | CREATE TABLE table_59699 (
"Nat." text,
"Name" text,
"Moving to" text,
"Type" text,
"Transfer window" text,
"Transfer fee" text,
"Source" text
) |
SELECT calling_at FROM table_18365784_3 WHERE departure = "18.16" | What was the 'calling at' station of the train that departed on 18.16? | CREATE TABLE table_18365784_3 (calling_at VARCHAR, departure VARCHAR) |
SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.price < 50 | What are the wines that have prices lower than 50 and have appelations in Monterey county? | CREATE TABLE APPELLATIONS (Appelation VARCHAR, County VARCHAR); CREATE TABLE WINE (Name VARCHAR, Appelation VARCHAR, price VARCHAR) |
SELECT "Score" FROM table_79682 WHERE "Date" = '1/10/1974' | What was the score on 1/10/1974? | CREATE TABLE table_79682 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Record" text
) |
SELECT original_air_date FROM table_18335117_5 WHERE director = "Barnaby Southcomb" AND writer = "Charlie Martin" | Name the original air date for barnaby southcomb for charlie martin | CREATE TABLE table_18335117_5 (original_air_date VARCHAR, director VARCHAR, writer VARCHAR) |
SELECT COUNT(*), Grape FROM WINE GROUP BY Grape | What are the numbers of wines for different grapes? | CREATE TABLE WINE (Grape VARCHAR) |
SELECT SUM(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney" | Tell me the total quantity of products bought by the customer called 'Rodrick Heaney'. | CREATE TABLE products (
product_id number,
product_details text
)
CREATE TABLE customer_addresses (
customer_id number,
address_id number,
date_address_from time,
address_type text,
date_address_to time
)
CREATE TABLE customers (
customer_id number,
payment_method text,
custome... |
SELECT MIN(no_in_series) FROM table_18335117_5 WHERE no_overall = 38 | Name the number in series for number 38 | CREATE TABLE table_18335117_5 (no_in_series INTEGER, no_overall VARCHAR) |
SELECT AVG(Price), YEAR FROM WINE GROUP BY YEAR | What are the average prices of wines for different years? | CREATE TABLE WINE (YEAR VARCHAR, Price INTEGER) |
SELECT record FROM table_name_9 WHERE visitor = "vancouver" | What was the record when Vancouver was the visitor? | CREATE TABLE table_name_9 (
record VARCHAR,
visitor VARCHAR
) |
SELECT original_air_date FROM table_18367694_2 WHERE production_code = 1115 | What is the original air date of the episode with the production code 1115? | CREATE TABLE table_18367694_2 (original_air_date VARCHAR, production_code VARCHAR) |
SELECT DISTINCT Name FROM WINE WHERE Price > (SELECT MIN(Price) FROM wine WHERE Winery = "John Anthony") | Find the distinct names of all wines that have prices higher than some wines from John Anthony winery. | CREATE TABLE wine (Name VARCHAR, Price INTEGER, Winery VARCHAR); CREATE TABLE WINE (Name VARCHAR, Price INTEGER, Winery VARCHAR) |
SELECT jun FROM table_name_28 WHERE jul = "84 °f / 28.9 °c" | Name the june when it has july of 84 f / 28.9 c | CREATE TABLE table_name_28 (
jun VARCHAR,
jul VARCHAR
) |
SELECT directed_by FROM table_18367694_2 WHERE original_air_date = "November 22, 1989" | who directed the episode with the original air date of November 22, 1989? | CREATE TABLE table_18367694_2 (directed_by VARCHAR, original_air_date VARCHAR) |
SELECT DISTINCT Name FROM WINE ORDER BY Name | List the names of all distinct wines in alphabetical order. | CREATE TABLE WINE (Name VARCHAR) |
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(SALARY) | For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, find hire_date and the average of salary bin hire_date by weekday, and visualize them by a bar chart, I want to order in asc by the Y-axis. | 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 locations (
LOCATION_ID decimal(4,0... |
SELECT mlb_team FROM table_18373863_2 WHERE years_played = "2008" AND fcsl_team = "DeLand" | when deland is the fcsl team and 2008 is the year played who is the mlb team? | CREATE TABLE table_18373863_2 (mlb_team VARCHAR, years_played VARCHAR, fcsl_team VARCHAR) |
SELECT DISTINCT Name FROM WINE ORDER BY price | List the names of all distinct wines ordered by price. | CREATE TABLE WINE (Name VARCHAR, price VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.label = "tacroFK" | Count the number of divorced patients who had tacrofk lab tests done. | 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 ... |
SELECT fcsl_team FROM table_18373863_2 WHERE mlb_team = "Toronto Blue Jays" | When toronto blue jays are the mlb team who are the fscl team? | CREATE TABLE table_18373863_2 (fcsl_team VARCHAR, mlb_team VARCHAR) |
SELECT T1.Area FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING T2.year < 2010 ORDER BY COUNT(*) DESC LIMIT 1 | What is the area of the appelation that produces the highest number of wines before the year of 2010? | CREATE TABLE WINE (Appelation VARCHAR, year VARCHAR); CREATE TABLE APPELLATIONS (Area VARCHAR, Appelation VARCHAR) |
SELECT AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "AORTIC INSUFFICIENCY\RE-DO STERNOTOMY; AORTIC VALVE REPLACEMENT " AND demographic.days_stay = "10" | what is average age of patients whose primary disease is aortic insufficiency\re-do sternotomy; aortic valve replacement and days of hospital stay is 10? | CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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,
... |
SELECT MIN(year_drafted) FROM table_18373863_2 WHERE years_played = "2005" | When 2005 is the year played what is the lowest year drafted? | CREATE TABLE table_18373863_2 (year_drafted INTEGER, years_played VARCHAR) |
SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape = T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1 | What is the color of the grape whose wine products has the highest average price? | CREATE TABLE GRAPES (Color VARCHAR, Grape VARCHAR); CREATE TABLE WINE (Grape VARCHAR) |
SELECT "Winning driver" FROM table_32875 WHERE "Winning constructor" = 'alfa romeo' AND "Name" = 'roussillon grand prix' | Which winning driver of the Roussillon Grand Prix had an Alfa Romeo? | CREATE TABLE table_32875 (
"Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Winning constructor" text,
"Report" text
) |
SELECT COUNT(mlb_team) FROM table_18373863_2 WHERE fcsl_team = "Winter Pines" | When winter pines is the fcsl team how many mlb teams are there? | CREATE TABLE table_18373863_2 (mlb_team VARCHAR, fcsl_team VARCHAR) |
SELECT DISTINCT Name FROM WINE WHERE YEAR < 2000 OR YEAR > 2010 | Find the distinct names of wines produced before the year of 2000 or after the year of 2010. | CREATE TABLE WINE (Name VARCHAR, YEAR VARCHAR) |
SELECT "Purpose" FROM table_50345 WHERE "Freq currently" = '4gld' | What is the Purpose of the Callsign with a Freq currently of 4gld? | CREATE TABLE table_50345 (
"Callsign" text,
"Area served" text,
"Band" text,
"Freq currently" text,
"Purpose" text
) |
SELECT player FROM table_18373863_2 WHERE fcsl_team = "Winter Park" AND years_played = "2006" | When 2006 is the year played and winter park is the fcsl team who is the player? | CREATE TABLE table_18373863_2 (player VARCHAR, fcsl_team VARCHAR, years_played VARCHAR) |
SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100 | Find the distinct winery of wines having price between 50 and 100. | CREATE TABLE WINE (Winery VARCHAR, Price INTEGER) |
SELECT * FROM Users LIMIT 10 | Number of users created per month. | CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate ti... |
SELECT operator FROM table_1837570_1 WHERE genre = "music" | Which operators offer a genre of music? | CREATE TABLE table_1837570_1 (operator VARCHAR, genre VARCHAR) |
SELECT AVG(Price), AVG(Cases) FROM WINE WHERE YEAR = 2009 AND Grape = "Zinfandel" | What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape? | CREATE TABLE WINE (Price INTEGER, Cases INTEGER, YEAR VARCHAR, Grape VARCHAR) |
SELECT "1st leg" FROM table_6141 WHERE "Agg." = '2-1' | What is the 1st leg of the team with a 2-1 agg.? | CREATE TABLE table_6141 (
"Team 1" text,
"Agg." text,
"Team 2" text,
"1st leg" text,
"2nd leg" text
) |
SELECT language FROM table_1837570_1 WHERE coverage_area = "Klang Petaling Jaya Shah Alam" | Which languages are offered in the coverage area of klang petaling jaya shah alam? | CREATE TABLE table_1837570_1 (language VARCHAR, coverage_area VARCHAR) |
SELECT MAX(Price), MAX(Score) FROM WINE WHERE Appelation = "St. Helena" | What are the maximum price and score of wines produced by St. Helena appelation? | CREATE TABLE WINE (Price INTEGER, Score INTEGER, Appelation VARCHAR) |
SELECT Users.Id AS "user_link", MAX(Age) AS Age, MAX(Location) AS Location, MAX(WebsiteUrl) AS Website, MAX(Reputation) AS Rep, COUNT(Answers.Id) AS Answers, SUM(Answers.Score) AS Score, CAST(AVG(CAST(Answers.Score AS FLOAT)) AS FLOAT(6, 1)) AS "avg" FROM Tags JOIN PostTags ON PostTags.TagId = Tags.Id JOIN Posts ON Pos... | top 10 users by post score. | CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
... |
SELECT macedonian FROM table_1841901_1 WHERE french = "il/elle avait entendu" | Name the macedonian for il/elle avait entendu | CREATE TABLE table_1841901_1 (macedonian VARCHAR, french VARCHAR) |
SELECT MAX(Price), MAX(Score), YEAR FROM WINE GROUP BY YEAR | What are the maximum price and score of wines in each year? | CREATE TABLE WINE (YEAR VARCHAR, Price INTEGER, Score INTEGER) |
SELECT participant_id, participant_type_code, participant_details FROM participants | What are all the the participant ids, type code and details? | CREATE TABLE participants (
participant_id number,
participant_type_code text,
participant_details text
)
CREATE TABLE services (
service_id number,
service_type_code text
)
CREATE TABLE events (
event_id number,
service_id number,
event_details text
)
CREATE TABLE participants_in_eve... |
SELECT greek__modern_ FROM table_1841901_1 WHERE polish__extinct_ = "słyszałeś był / słyszałaś była" | Name the greek modern for słyszałeś był / słyszałaś była | CREATE TABLE table_1841901_1 (greek__modern_ VARCHAR, polish__extinct_ VARCHAR) |
SELECT AVG(Price), AVG(Score), Appelation FROM WINE GROUP BY Appelation | What are the average price and score of wines grouped by appelation? | CREATE TABLE WINE (Appelation VARCHAR, Price INTEGER, Score INTEGER) |
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'lorazepam' AND patient.uniquepid = '015-52724' AND DATETIME(medication.drugstarttime) >= DATETIME(CURRENT_TIME(), '-54 mo... | when was patient 015-52724 last prescribed both lorazepam and methylprednisolone at the same time since 54 months ago? | CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime t... |
SELECT bulgarian FROM table_1841901_1 WHERE dutch = "jullie hadden gehoord" | Name the bulgarian for jullie hadden gehoord | CREATE TABLE table_1841901_1 (bulgarian VARCHAR, dutch VARCHAR) |
SELECT Winery FROM WINE GROUP BY Winery HAVING COUNT(*) >= 4 | Find the wineries that have at least four wines. | CREATE TABLE WINE (Winery VARCHAR) |
SELECT district FROM table_1342370_10 WHERE first_elected = 1916 | In what district was the representative first elected in 1916? | CREATE TABLE table_1342370_10 (
district VARCHAR,
first_elected VARCHAR
) |
SELECT english FROM table_1841901_1 WHERE french = "j'avais entendu" | Name the english for j'avais entendu | CREATE TABLE table_1841901_1 (english VARCHAR, french VARCHAR) |
SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation = T2.Appelation GROUP BY T2.Appelation HAVING COUNT(*) <= 3 | Find the country of all appelations who have at most three wines. | CREATE TABLE APPELLATIONS (County VARCHAR, Appelation VARCHAR); CREATE TABLE WINE (Appelation VARCHAR) |
SELECT "Party" FROM table_61823 WHERE "Results" = 're-elected' AND "First elected" < '2002' | What is the party for the representative who was first elected before 2002 and the results were re-elected? | CREATE TABLE table_61823 (
"District" text,
"Incumbent" text,
"Party" text,
"First elected" real,
"Results" text
) |
SELECT us_air_date FROM table_18424435_4 WHERE canadian_viewers__million_ = "1.452" | What was the air date in the U.S. for the episode that had 1.452 million Canadian viewers? | CREATE TABLE table_18424435_4 (us_air_date VARCHAR, canadian_viewers__million_ VARCHAR) |
SELECT Name FROM WINE WHERE YEAR < (SELECT MIN(YEAR) FROM WINE WHERE Winery = "Brander") | What are the names of wines whose production year are before the year of all wines by Brander winery? | CREATE TABLE WINE (Name VARCHAR, YEAR INTEGER, Winery VARCHAR) |
SELECT time___et__ FROM table_14433719_1 WHERE opponent = "at Denver Broncos" | What time in eastern standard time was game held at denver broncos? | CREATE TABLE table_14433719_1 (
time___et__ VARCHAR,
opponent VARCHAR
) |
SELECT no FROM table_18424435_4 WHERE directed_by = "Kelly Makin" AND written_by = "Mark Ellis & Stephanie Morgenstern" | What number episode in the series was directed by Kelly Makin and written by Mark Ellis & Stephanie Morgenstern? | CREATE TABLE table_18424435_4 (no VARCHAR, directed_by VARCHAR, written_by VARCHAR) |
SELECT Name FROM WINE WHERE Price > (SELECT MAX(Price) FROM WINE WHERE YEAR = 2006) | What are the names of wines that are more expensive then all wines made in the year 2006? | CREATE TABLE WINE (Name VARCHAR, Price INTEGER, YEAR VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.