answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT "Player" FROM table_60735 WHERE "To par" = '–2' AND "Country" = 'wales' | Which Player has a To par of 2, and a Country of wales? | CREATE TABLE table_60735 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
) |
SELECT reverse FROM table_1682865_1 WHERE £1_fraction = "1/480" | What is the reverse when the £1 fraction is 1/480? | CREATE TABLE table_1682865_1 (reverse VARCHAR, £1_fraction VARCHAR) |
SELECT Product_Name, Product_Type_Code FROM Products | What are the names and type codes of products? | CREATE TABLE Products (Product_Name VARCHAR, Product_Type_Code VARCHAR) |
SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20898)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit wt'... | how much was patient 20898's body weight last measured in this month? | CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE icust... |
SELECT MAX(_number_of_seats_won) FROM table_168482_1 | What is the largest number of seats won? | CREATE TABLE table_168482_1 (_number_of_seats_won INTEGER) |
SELECT Product_Price FROM Products WHERE Product_Name = "Dining" OR Product_Name = "Trading Policy" | Show the prices of the products named "Dining" or "Trading Policy". | CREATE TABLE Products (Product_Price VARCHAR, Product_Name VARCHAR) |
SELECT COUNT("Points won") FROM table_3813 WHERE "Player" = 'Flavia Pennetta' | How many different counts for won points does Flavia Pennetta have? | CREATE TABLE table_3813 (
"Sd" real,
"Rk" real,
"Player" text,
"Points" real,
"Points defending" text,
"Points won" real,
"New points" real,
"Status" text
) |
SELECT COUNT(_percentage_of_popular_vote) FROM table_168482_1 WHERE election = 1983 | How many percentages are listed for the election in 1983? | CREATE TABLE table_168482_1 (_percentage_of_popular_vote VARCHAR, election VARCHAR) |
SELECT AVG(Product_Price) FROM Products | What is the average price for products? | CREATE TABLE Products (Product_Price INTEGER) |
SELECT Document_Date, COUNT(Document_Date) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code | How many documents are created in each day? Bin the document date by year interval with a line chart. | CREATE TABLE Documents_with_Expenses (
Document_ID INTEGER,
Budget_Type_Code CHAR(15),
Document_Details VARCHAR(255)
)
CREATE TABLE Ref_Document_Types (
Document_Type_Code CHAR(15),
Document_Type_Name VARCHAR(255),
Document_Type_Description VARCHAR(255)
)
CREATE TABLE Statements (
Statemen... |
SELECT place FROM table_168482_1 WHERE _percentage_of_popular_vote = "0.86%" | What place did the party finish in the year when they earned 0.86% of the vote? | CREATE TABLE table_168482_1 (place VARCHAR, _percentage_of_popular_vote VARCHAR) |
SELECT Product_Name FROM Products ORDER BY Product_Price DESC LIMIT 1 | What is the name of the product with the highest price? | CREATE TABLE Products (Product_Name VARCHAR, Product_Price VARCHAR) |
SELECT "Started" FROM table_46421 WHERE "Country" = 'eng' AND "Loan Club" = 'sunderland' AND "End Source" = 'south wales echo' | When was the loan started when the coutry is eng, the loan club is sunderland and the end source is south wales echo? | CREATE TABLE table_46421 (
"Name" text,
"Country" text,
"Loan Club" text,
"Started" text,
"Ended" text,
"Start Source" text,
"End Source" text
) |
SELECT ncbi_accession_number__mrna_protein_ FROM table_16849531_2 WHERE length__bp_aa_ = "5304bp/377aa" | What is the NCBI Accession Number for the length of 5304bp/377aa? | CREATE TABLE table_16849531_2 (ncbi_accession_number__mrna_protein_ VARCHAR, length__bp_aa_ VARCHAR) |
SELECT Product_Type_Code, COUNT(*) FROM Products GROUP BY Product_Type_Code | Show different type codes of products and the number of products with each type code. | CREATE TABLE Products (Product_Type_Code VARCHAR) |
SELECT "Title" FROM table_25663 WHERE "Viewers (millions)" = '5.60' | what is the name of the episode when the number of spectators was 5.60 millions? | CREATE TABLE table_25663 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. code" text,
"Viewers (millions)" text
) |
SELECT ncbi_accession_number__mrna_protein_ FROM table_16849531_2 WHERE species = "Homo sapiens" | What is the NCBI Accession Number of the Homo Sapiens species? | CREATE TABLE table_16849531_2 (ncbi_accession_number__mrna_protein_ VARCHAR, species VARCHAR) |
SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1 | Show the most common type code across products. | CREATE TABLE Products (Product_Type_Code VARCHAR) |
SELECT "Original air date" FROM table_16360 WHERE "Title" = 'Duet for One' | When did the episode title 'Duet For One' air? | CREATE TABLE table_16360 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Director" text,
"Writer(s)" text,
"Original air date" text,
"Production code" text
) |
SELECT protein_identity FROM table_16849531_2 WHERE length__bp_aa_ = "5304bp/377aa" | What is the protein identity with a length of 5304bp/377aa? | CREATE TABLE table_16849531_2 (protein_identity VARCHAR, length__bp_aa_ VARCHAR) |
SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*) >= 2 | Show the product type codes that have at least two products. | CREATE TABLE Products (Product_Type_Code VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "ACET650R" | how many patients had the drug code acet650r? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title 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
)
... |
SELECT release_date FROM table_16859758_1 WHERE title = "Tell You When" | When was "Tell You When" released? | CREATE TABLE table_16859758_1 (release_date VARCHAR, title VARCHAR) |
SELECT Product_Type_Code FROM Products WHERE Product_Price > 4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price < 3000 | Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000. | CREATE TABLE Products (Product_Type_Code VARCHAR, Product_Price INTEGER) |
SELECT MIN(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22517)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admi... | until 2104, what was the monthly minimum weight of patient 22517? | 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 chart... |
SELECT location FROM table_16864968_7 WHERE game = 62 | Where was game 62 played? | CREATE TABLE table_16864968_7 (location VARCHAR, game VARCHAR) |
SELECT T1.Product_Name, COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name | Show the names of products and the number of events they are in. | CREATE TABLE Products (Product_Name VARCHAR, Product_ID VARCHAR); CREATE TABLE Products_in_Events (Product_ID VARCHAR) |
SELECT decision FROM table_name_90 WHERE home = "montreal" | What was the decision of the game when Montreal was the home team? | CREATE TABLE table_name_90 (
decision VARCHAR,
home VARCHAR
) |
SELECT score FROM table_16864968_7 WHERE opponent = "Columbus Blue Jackets" | What was the final score when the Maple Leafs played the Columbus Blue Jackets? | CREATE TABLE table_16864968_7 (score VARCHAR, opponent VARCHAR) |
SELECT T1.Product_Name, COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name ORDER BY COUNT(*) DESC | Show the names of products and the number of events they are in, sorted by the number of events in descending order. | CREATE TABLE Products (Product_Name VARCHAR, Product_ID VARCHAR); CREATE TABLE Products_in_Events (Product_ID VARCHAR) |
SELECT "2004" FROM table_40489 WHERE "2006" = 'grand slam tournaments' | What is the 2004 that has a of grand slam tournaments in2006 ? | CREATE TABLE table_40489 (
"Tournament" text,
"2004" text,
"2005" text,
"2006" text,
"2007" text
) |
SELECT network FROM table_16884579_1 WHERE host_s_ = "Dré Steemans Ann Van Elsen" | Name the network for dré steemans ann van elsen | CREATE TABLE table_16884579_1 (network VARCHAR, host_s_ VARCHAR) |
SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2 | Show the names of products that are in at least two events. | CREATE TABLE Products (Product_Name VARCHAR, Product_ID VARCHAR); CREATE TABLE Products_in_Events (Product_ID VARCHAR) |
SELECT "Divisions" FROM table_23618 WHERE "Number of winning tickets" = '565' | Which divisions have 565 as the number of winning tickets? | CREATE TABLE table_23618 (
"Divisions" text,
"Prize (EUR)" text,
"Odds of winning (1in)" text,
"Number of winning tickets" real,
"In order to win" text
) |
SELECT seasons_and_winners FROM table_16884579_1 WHERE premiere = "28 January 2007" | Name the seasons and winners that airs 28 january 2007 | CREATE TABLE table_16884579_1 (seasons_and_winners VARCHAR, premiere VARCHAR) |
SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID = T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*) >= 2 ORDER BY T1.Product_Name | Show the names of products that are in at least two events in ascending alphabetical order of product name. | CREATE TABLE Products (Product_Name VARCHAR, Product_ID VARCHAR); CREATE TABLE Products_in_Events (Product_ID VARCHAR) |
WITH counts_cte AS (SELECT LAST_DATE_OF_MONTH(p.CreationDate) AS Cmonth, SUM(Score) AS Score, SUM(ViewCount) AS Views FROM Posts AS p WHERE PostTypeId = 1 GROUP BY LAST_DATE_OF_MONTH(p.CreationDate)) SELECT Cmonth, 100 * (CAST(Score AS FLOAT)) / (CAST(Views AS FLOAT)) AS "score_per_view" FROM counts_cte ORDER BY Cmonth | Average score per hundred views. | CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... |
SELECT host_s_ FROM table_16884579_1 WHERE network = "Prime" | Name the host for prime | CREATE TABLE table_16884579_1 (host_s_ VARCHAR, network VARCHAR) |
SELECT Product_Name FROM Products WHERE NOT Product_ID IN (SELECT Product_ID FROM Products_in_Events) | List the names of products that are not in any event. | CREATE TABLE Products (Product_Name VARCHAR, Product_ID VARCHAR); CREATE TABLE Products_in_Events (Product_Name VARCHAR, Product_ID VARCHAR) |
SELECT budget FROM table_name_28 WHERE film = "the incredibles" | WHAT IS THE BUDGET FOR THE INCREDIBLES? | CREATE TABLE table_name_28 (
budget VARCHAR,
film VARCHAR
) |
SELECT COUNT(judges) FROM table_16884579_1 WHERE host_s_ = "Dré Steemans Ann Van Elsen" | Name the number of judges for dré steemans ann van elsen | CREATE TABLE table_16884579_1 (judges VARCHAR, host_s_ VARCHAR) |
SELECT COUNT(*) FROM artwork | How many artworks are there? | CREATE TABLE artwork (Id VARCHAR) |
SELECT AVG("Year named") FROM table_46408 WHERE "Name" = 'aida-wedo dorsa' AND "Diameter (km)" < '450' | What's the average year for the name aida-wedo dorsa with a diameter less than 450? | CREATE TABLE table_46408 (
"Name" text,
"Latitude" text,
"Longitude" text,
"Diameter (km)" real,
"Year named" real
) |
SELECT website FROM table_1688640_4 WHERE car__number = "92" | Name the website for car number of 92 | CREATE TABLE table_1688640_4 (website VARCHAR, car__number VARCHAR) |
SELECT Name FROM artwork ORDER BY Name | List the name of artworks in ascending alphabetical order. | CREATE TABLE artwork (Name VARCHAR) |
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium, urine') AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 's... | how many patients during this year have received a sodium, urine test? | 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,
insuranc... |
SELECT MAX(year_started) FROM table_1688640_4 WHERE car__number = "55" | Name the year started where car number is 55 | CREATE TABLE table_1688640_4 (year_started INTEGER, car__number VARCHAR) |
SELECT Name FROM artwork WHERE TYPE <> "Program Talent Show" | List the name of artworks whose type is not "Program Talent Show". | CREATE TABLE artwork (Name VARCHAR, TYPE VARCHAR) |
SELECT SUM("Goals for") FROM table_43363 WHERE "Drawn" > '10' | What is the total sum of the goals at competitions with more than 10 draws? | CREATE TABLE table_43363 (
"Competition" text,
"Appearances" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals for" real,
"Goals against" real
) |
SELECT car__number FROM table_1688640_4 WHERE year_started = 1997 | Name the car number for 1997 | CREATE TABLE table_1688640_4 (car__number VARCHAR, year_started VARCHAR) |
SELECT Festival_Name, LOCATION FROM festival_detail | What are the names and locations of festivals? | CREATE TABLE festival_detail (Festival_Name VARCHAR, LOCATION VARCHAR) |
SELECT actors_name FROM table_10236830_4 WHERE nomination = "Best Actor in a Supporting Role" AND country = "Serbia" | Which actor from Serbia was nominated for best actor in a supporting role? | CREATE TABLE table_10236830_4 (
actors_name VARCHAR,
nomination VARCHAR,
country VARCHAR
) |
SELECT COUNT(nickerie) FROM table_16886076_1 WHERE marowijne = "4.7%" | Name the nickerie for marowijne being 4.7% | CREATE TABLE table_16886076_1 (nickerie VARCHAR, marowijne VARCHAR) |
SELECT Chair_Name FROM festival_detail ORDER BY YEAR | What are the names of the chairs of festivals, sorted in ascending order of the year held? | CREATE TABLE festival_detail (Chair_Name VARCHAR, YEAR VARCHAR) |
SELECT written_by FROM table_name_42 WHERE original_airdate = "march 1, 1998" | Who wrote the episode that originally aired on March 1, 1998? | CREATE TABLE table_name_42 (
written_by VARCHAR,
original_airdate VARCHAR
) |
SELECT coronie FROM table_16886076_1 WHERE marowijne = "6.8%" | Name the coronie for marowijne being 6.8% | CREATE TABLE table_16886076_1 (coronie VARCHAR, marowijne VARCHAR) |
SELECT LOCATION FROM festival_detail ORDER BY Num_of_Audience DESC LIMIT 1 | What is the location of the festival with the largest number of audience? | CREATE TABLE festival_detail (LOCATION VARCHAR, Num_of_Audience VARCHAR) |
SELECT number FROM table_name_15 WHERE builder = "baldwin locomotive works" AND works_number = 40864 | With a works number of 40864 for the builder of Baldwin Locomotive Works, the number listed is? | CREATE TABLE table_name_15 (
number VARCHAR,
builder VARCHAR,
works_number VARCHAR
) |
SELECT para FROM table_16886076_1 WHERE commewijne = "1.5%" | Name the para for 1.5% commewijne | CREATE TABLE table_16886076_1 (para VARCHAR, commewijne VARCHAR) |
SELECT Festival_Name FROM festival_detail WHERE YEAR = 2007 | What are the names of festivals held in year 2007? | CREATE TABLE festival_detail (Festival_Name VARCHAR, YEAR VARCHAR) |
SELECT candidates FROM table_1342379_5 WHERE incumbent = "Henry E. Barbour" | Who was the incumbent when henry e. barbour ran? | CREATE TABLE table_1342379_5 (
candidates VARCHAR,
incumbent VARCHAR
) |
SELECT MIN(races) FROM table_16908657_1 WHERE poles = 2 | Name the least amount of races for 2 poles | CREATE TABLE table_16908657_1 (races INTEGER, poles VARCHAR) |
SELECT AVG(Num_of_Audience) FROM festival_detail | What is the average number of audience for festivals? | CREATE TABLE festival_detail (Num_of_Audience INTEGER) |
SELECT Creation, COUNT(Creation) FROM department ORDER BY Creation | Show the number of departments created in different year and bin creation time by year in a line chart, and I want to rank in ascending by the x-axis. | CREATE TABLE head (
head_ID int,
name text,
born_state text,
age real
)
CREATE TABLE management (
department_ID int,
head_ID int,
temporary_acting text
)
CREATE TABLE department (
Department_ID int,
Name text,
Creation text,
Ranking int,
Budget_in_Billions real,
Num... |
SELECT motorcycle FROM table_16908657_1 WHERE season = 2012 | Name the motorcycle for season 2012 | CREATE TABLE table_16908657_1 (motorcycle VARCHAR, season VARCHAR) |
SELECT Festival_Name FROM festival_detail ORDER BY YEAR DESC LIMIT 3 | Show the names of the three most recent festivals. | CREATE TABLE festival_detail (Festival_Name VARCHAR, YEAR VARCHAR) |
SELECT venue FROM table_name_45 WHERE date = "11 february 1996" | Which venue was used 11 february 1996? | CREATE TABLE table_name_45 (
venue VARCHAR,
date VARCHAR
) |
SELECT COUNT(flaps) FROM table_16908657_1 WHERE points = "63" | Name the number of flaps for 63 points | CREATE TABLE table_16908657_1 (flaps VARCHAR, points VARCHAR) |
SELECT T2.Name, T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID | For each nomination, show the name of the artwork and name of the festival where it is nominated. | CREATE TABLE artwork (Name VARCHAR, Artwork_ID VARCHAR); CREATE TABLE nomination (Artwork_ID VARCHAR, Festival_ID VARCHAR); CREATE TABLE festival_detail (Festival_Name VARCHAR, Festival_ID VARCHAR) |
SELECT COUNT("Seat") FROM table_12149 WHERE "Series 4" = 'gavin duffy' | What is the total number of seats with gavin duffy in series 4? | CREATE TABLE table_12149 (
"Seat" real,
"Series 1" text,
"Series 3" text,
"Series 4" text,
"Series 5" text
) |
SELECT MIN(flaps) FROM table_16908657_1 | Name the least flaps | CREATE TABLE table_16908657_1 (flaps INTEGER) |
SELECT DISTINCT T2.Type FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T3.Year = 2007 | Show distinct types of artworks that are nominated in festivals in 2007. | CREATE TABLE nomination (Artwork_ID VARCHAR, Festival_ID VARCHAR); CREATE TABLE festival_detail (Festival_ID VARCHAR, Year VARCHAR); CREATE TABLE artwork (Type VARCHAR, Artwork_ID VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "HYPOXIA" | what is the number of patients whose marital status is single and primary disease is hypoxia? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... |
SELECT COUNT(p_ret) FROM table_16912000_13 WHERE kr_avg = "11.3" | How many p.ret are there when kr avg is 11.3 ? | CREATE TABLE table_16912000_13 (p_ret VARCHAR, kr_avg VARCHAR) |
SELECT T2.Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID ORDER BY T3.Year | Show the names of artworks in ascending order of the year they are nominated in. | CREATE TABLE artwork (Name VARCHAR, Artwork_ID VARCHAR); CREATE TABLE nomination (Artwork_ID VARCHAR, Festival_ID VARCHAR); CREATE TABLE festival_detail (Festival_ID VARCHAR, Year VARCHAR) |
SELECT winning_driver FROM table_1140114_5 WHERE circuit = "Sachsenring" | Which driver won at the Sachsenring circuit? | CREATE TABLE table_1140114_5 (
winning_driver VARCHAR,
circuit VARCHAR
) |
SELECT kr_td FROM table_16912000_13 WHERE mfg_lg = 64 | What is the kr td when mfg lg is 64? | CREATE TABLE table_16912000_13 (kr_td VARCHAR, mfg_lg VARCHAR) |
SELECT T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID WHERE T2.Type = "Program Talent Show" | Show the names of festivals that have nominated artworks of type "Program Talent Show". | CREATE TABLE nomination (Artwork_ID VARCHAR, Festival_ID VARCHAR); CREATE TABLE artwork (Artwork_ID VARCHAR, Type VARCHAR); CREATE TABLE festival_detail (Festival_Name VARCHAR, Festival_ID VARCHAR) |
SELECT Tags.TagName, YEAR(DATE(Posts.CreationDate)) AS year, COUNT(Posts.Id) FROM Tags, PostTags, Posts WHERE Tags.TagName IN ('cassandra') AND Tags.Id = PostTags.TagId AND PostTags.PostId = Posts.Id AND Posts.CreationDate > '2013-01-01' AND Posts.CreationDate < '2021-01-01' GROUP BY Tags.TagName, YEAR(DATE(Posts.Creat... | NoSQL datastore questions by year. | CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange ... |
SELECT player FROM table_16912000_13 WHERE kr_avg = "24.8" | Who's average is 24.8? | CREATE TABLE table_16912000_13 (player VARCHAR, kr_avg VARCHAR) |
SELECT T1.Festival_ID, T3.Festival_Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID HAVING COUNT(*) >= 2 | Show the ids and names of festivals that have at least two nominations for artworks. | CREATE TABLE nomination (Festival_ID VARCHAR, Artwork_ID VARCHAR); CREATE TABLE festival_detail (Festival_Name VARCHAR, Festival_ID VARCHAR); CREATE TABLE artwork (Artwork_ID VARCHAR) |
SELECT COUNT("Opponent") FROM table_2401 WHERE "Sun Devils points" = '41' | How many opponents did the Sun Devils play when they scored 41 points? | CREATE TABLE table_2401 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Sun Devils points" real,
"Opponents" real,
"Record" text
) |
SELECT pr_avg FROM table_16912000_13 WHERE kr_lg = 49 | What is the pr avg, when kr lg is 49? | CREATE TABLE table_16912000_13 (pr_avg VARCHAR, kr_lg VARCHAR) |
SELECT T1.Festival_ID, T3.Festival_Name, COUNT(*) FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID GROUP BY T1.Festival_ID | Show the id, name of each festival and the number of artworks it has nominated. | CREATE TABLE nomination (Festival_ID VARCHAR, Artwork_ID VARCHAR); CREATE TABLE festival_detail (Festival_Name VARCHAR, Festival_ID VARCHAR); CREATE TABLE artwork (Artwork_ID VARCHAR) |
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t4.icd9_code FROM (SELECT t3.icd9_code, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.icd9_code, 100 - SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.chartt... | what was the highest three diagnosis, which had the highest three year mortality rate? | 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 cost (
row_id... |
SELECT population__2010_ FROM table_1691800_2 WHERE municipality = "San Jacinto" | what is the population where municipality is san jacinto? | CREATE TABLE table_1691800_2 (population__2010_ VARCHAR, municipality VARCHAR) |
SELECT TYPE, COUNT(*) FROM artwork GROUP BY TYPE | Please show different types of artworks with the corresponding number of artworks of each type. | CREATE TABLE artwork (TYPE VARCHAR) |
SELECT agg FROM table_name_12 WHERE team_1 = "seba united" | Name the agg for seba united | CREATE TABLE table_name_12 (
agg VARCHAR,
team_1 VARCHAR
) |
SELECT income_class FROM table_1691800_2 WHERE area__km²_ = 75 | what is the income class for area 75? | CREATE TABLE table_1691800_2 (income_class VARCHAR, area__km²_ VARCHAR) |
SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 | List the most common type of artworks. | CREATE TABLE artwork (TYPE VARCHAR) |
SELECT attendance FROM table_name_20 WHERE score = "88-98" | What was the attendance when the score was 88-98? | CREATE TABLE table_name_20 (
attendance VARCHAR,
score VARCHAR
) |
SELECT area__km²_ FROM table_1691800_2 WHERE municipality = "Labrador" | what is th area where the municipaity is labrador? | CREATE TABLE table_1691800_2 (area__km²_ VARCHAR, municipality VARCHAR) |
SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*) > 1 | List the year in which there are more than one festivals. | CREATE TABLE festival_detail (YEAR VARCHAR) |
SELECT "Race Name" FROM table_77933 WHERE "Date" = '16 september' | What is the name of the race on 16 september? | CREATE TABLE table_77933 (
"Race Name" text,
"Circuit" text,
"Date" text,
"Winning driver" text,
"Constructor" text,
"Report" text
) |
SELECT municipality FROM table_1691800_2 WHERE area__km²_ = 73 | what is the municipality where the area is 73? | CREATE TABLE table_1691800_2 (municipality VARCHAR, area__km²_ VARCHAR) |
SELECT Name FROM Artwork WHERE NOT Artwork_ID IN (SELECT Artwork_ID FROM nomination) | List the name of artworks that are not nominated. | CREATE TABLE nomination (Name VARCHAR, Artwork_ID VARCHAR); CREATE TABLE Artwork (Name VARCHAR, Artwork_ID VARCHAR) |
SELECT nationality FROM table_1473672_3 WHERE nhl_team = "Philadelphia Flyers" | Which nationality is the player from the Philadelphia Flyers? | CREATE TABLE table_1473672_3 (
nationality VARCHAR,
nhl_team VARCHAR
) |
SELECT equipment FROM table_16941304_4 WHERE bike_no = 6 | Name the equipment for bike number 6 | CREATE TABLE table_16941304_4 (equipment VARCHAR, bike_no VARCHAR) |
SELECT Num_of_Audience FROM festival_detail WHERE YEAR = 2008 OR YEAR = 2010 | Show the number of audience in year 2008 or 2010. | CREATE TABLE festival_detail (Num_of_Audience VARCHAR, YEAR VARCHAR) |
SELECT MIN("OTL") FROM table_1961 | What was the minimum OTL amount? | CREATE TABLE table_1961 (
"Season" text,
"League" text,
"Division" text,
"GP" real,
"W" real,
"L" real,
"T" real,
"OTL" real,
"SOL" real,
"Pts" real,
"PCT" text,
"GF" real,
"GA" real,
"PIM" real,
"Coach(es)" text,
"Result" text
) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.