db_id
stringclasses
69 values
schema
stringclasses
69 values
m_schema
stringclasses
69 values
question
stringlengths
24
325
sql
stringlengths
23
804
evidence
stringlengths
0
673
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
What are the official languages used in Greece?
SELECT T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T2.name = 'Greece'
official language refers to IsOfficial = 'T'; Greece is a name of country;
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
Give the population of the country where Queimados city belongs.
SELECT T2.Population FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'Queimados'
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
What are the official languages of the country where you can find the city with the least population?
SELECT T2.Language FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.Population ASC LIMIT 1
official language refers to IsOfficial = 'T'; least population refers to MIN(Population);
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
What is the surface area and GNP of the country where Namibe district belongs?
SELECT T2.SurfaceArea, T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.District = 'Namibe'
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
List the names of the country that officially uses English as their language.
SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T1.Language = 'English'
officially uses English as their language refers to `Language` = 'English' AND IsOfficial = 'T';
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
What are the districts that belong to the country with the lowest surface area?
SELECT T1.District FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T2.SurfaceArea ASC LIMIT 1
lowest surface area refers to MIN(SurfaceArea);
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
List down the country names of countries that have a GNP lower than 1000 and have Dutch as their language.
SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GNP < 1000 AND T1.IsOfficial = 'T' AND T1.Language = 'Dutch'
GNP lower than 1000 refers to GNP < 1000; Dutch as their language refers to `Language` = 'Dutch';
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
What is the GNP of the country where district "Entre Rios" belongs?
SELECT T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.District = 'Entre Rios' LIMIT 1
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
What is the local name of the country where "The Valley" city belongs?
SELECT T2.LocalName FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'The Valley'
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
List down the cities belongs to the country that has surface area greater than 7000000.
SELECT T2.Name, T1.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.SurfaceArea > 7000000
surface area greater than 7000000 refers to SurfaceArea > 7000000;
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
What is the life expectancy of the countries that uses Japanese as their language?
SELECT AVG(T2.LifeExpectancy) FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Language = 'Japanese'
uses Japanese as their language refers to `Language` = 'Japanese';
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
How many cities are there in the country with the surface area of 652090?
SELECT T2.Name, COUNT(T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.SurfaceArea = 652090 GROUP BY T2.Name
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
List down the languages of countries with an independence year between 1980 to 1995.
SELECT T2.Name, T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.IndepYear BETWEEN 1980 AND 1995
independence year between 1980 to 1995 refers to IndepYear BETWEEN 1980 AND 1995;
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
What is the life expectancy of the people living in Calama city?
SELECT T2.LifeExpectancy FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'Calama'
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
Provide the language used in the country ruled by Pierre Buyoya.
SELECT T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.HeadOfState = 'Pierre Buyoya'
ruled by Pierre Buyoya refers to HeadOfState = 'Pierre Buyoya';
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
In countries with constitutional monarchy, what is the percentage of cities located in the district of England?
SELECT CAST(SUM(CASE WHEN T1.District = 'England' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GovernmentForm = 'Constitutional Monarchy'
constitutional monarchy refers to GovernmentForm = 'Constitutional Monarchy'; percentage = MULTIPLY(DIVIDE(SUM(GovernmentForm = 'Constitutional Monarchy' WHERE District = 'England'), COUNT(GovernmentForm = 'Constitutional Monarchy')), 100)
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
Among the cities with a population between 140000 and 150000, list the country that has life expectancy greater than 80% life expectancy of all countries.
SELECT T2.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Population BETWEEN 140000 AND 150000 GROUP BY T2.Name, LifeExpectancy HAVING LifeExpectancy < ( SELECT AVG(LifeExpectancy) FROM Country ) * 0.8
life expectancy greater than 80% life expectancy of all countries refers to LifeExpectancy < (MULTIPLY(AVG(LifeExpectancy), 0.8));
world
CREATE TABLE sqlite_sequence(name,seq); CREATE TABLE `City` ( `ID` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `Name` TEXT NOT NULL DEFAULT '', `CountryCode` TEXT NOT NULL DEFAULT '', `District` TEXT NOT NULL DEFAULT '', `Population` INTEGER NOT NULL DEFAULT 0, FOREIGN KEY (`CountryCode`) REFERENCES `Count...
【DB_ID】 world 【Schema】 # Table: main.City [ (ID:INTEGER, Primary Key, Examples: [1, 2, 3]), (Name:TEXT, Examples: [Kabul, Qandahar, Herat]), (CountryCode:TEXT, Examples: [AFG, NLD, ANT]), (District:TEXT, Examples: [Kabol, Qandahar, Herat]), (Population:INTEGER, Examples: [1780000, 237500, 186800]) ] # Table: main.Count...
Among the countries that use Italian as their language, what is the percentage of republic countries?
SELECT CAST(SUM(CASE WHEN T2.GovernmentForm = 'Republic' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Language = 'Italian'
use Italian as their language refers to `Language` = 'Italian'; percentage = MULTIPLY(DIVIDE(SUM(`Language` = 'Italian' WHERE GovernmentForm = 'Republic'), COUNT(`Language` = 'Italian')), 100); use Italian as their language refers to `Language` = 'Italian'; republic countries refers to GovernmentForm = 'Republic';
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
How many podcasts are there in the category which has the most podcasts?
SELECT COUNT(podcast_id) FROM categories WHERE category = ( SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 )
category which has the most podcast refers to the category with Max(count(podcast_id))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the percentage of the podcast that are categorized in four or more categories?
SELECT COUNT(T1.podcast_id) FROM ( SELECT podcast_id FROM categories GROUP BY podcast_id HAVING COUNT(category) >= 4 ) AS T1
categorized in 4 or more refers to Count(category) > 4; percentage = Divide(Count(podcast_id(count(category) > 4)), Count(podcast_id)) * 100
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Provide the itunes id and url for podcast titled 'Brown Suga Diaries'.
SELECT itunes_id, itunes_url FROM podcasts WHERE title = 'Brown Suga Diaries'
url refers to itunes_url; 'Brown Suga Diaries' is the title of podcast
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List all podcast with its itunes url for all title containing the word 'Dream'.
SELECT itunes_url FROM podcasts WHERE title LIKE '%Dream%' GROUP BY itunes_url
containing the word 'Dream' refers to title LIKE '%Dream%'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Name all the categories for podcast titled 'I Heart My Life Show'.
SELECT T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'I Heart My Life Show'
'I Hearty My Life Show' is the title of podcast
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List all the podcast title and its itunes url under the 'society-culture' category.
SELECT T2.title, T2.itunes_url FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'society-culture'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
How many people rated 5 for the podcast which title contains the word 'spoiler' under the 'art' category '?
SELECT COUNT(T3.podcast_id) FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T2.title LIKE '%spoilers%' AND T1.category = 'arts' AND T3.rating = 5
rated 5 refers to rating = 5; contain the word 'spoilers' refers to title like '%spoilers%'; 'art' is the category name;
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List the authors who created review for podcast titled 'Pop Rocket' in 2016 with rating less than 5.
SELECT T2.author_id FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Pop Rocket' AND T2.created_at LIKE '2016-%' AND T2.rating < 5
Pop Rocket' is the title of podcast; in 2016 refers to created_at like'2016%'; rating less than 5 refers to rating < 5; author refers to author_id
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Name all the podcast title and its category with average rating of more than 3.0.
SELECT T2.title, T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id GROUP BY T3.podcast_id HAVING AVG(T3.rating) > 3
average rating of more than 3.0 refers to avg(rating) > 3.0
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List all content reviewed for podcast with the best rating under the 'fiction' category. State the podcast title.
SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T3.rating = 5 AND T1.category = 'fiction'
'fiction' is the category name; best rating refers to rating = 5; content reviewed refers to content
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
State the podcast title, content review and rating for all reviews with titled 'Love it!'
SELECT DISTINCT T1.title, T2.content, T2.rating FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Love it!'
"Love it!" is the title of review; content reviewed refers to content
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Find the author, rating and review creation date of review for podcast title 'In The Thick'.
SELECT T2.author_id, T2.rating, T2.created_at FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'In The Thick' GROUP BY T2.author_id, T2.rating, T2.created_at
"In The Thick" is the title of podcast; author refers to author_id; creation date refers to created_at
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Which podcast was reviewed the latest? State the date of creation, podcast tile and rating.
SELECT T1.podcast_id, T2.created_at, T2.title, T2.rating FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id ORDER BY T2.created_at DESC LIMIT 1
latest refers to Max(created_at); date of creation refers to created_at
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Name the podcast title, rating and review content created by '76A4C24B6038145'.
SELECT T2.title, T2.rating, T2.content FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.author_id = '76A4C24B6038145'
"76A4C24B6038145" is author_id; review content refers to content
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
For all reviews with the worst rating, state the podcast title as well as the review title and content.
SELECT DISTINCT T1.title, T2.title, T2.content FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.rating = 1
worst rating refers to rating = 1
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List all reviews created in May 2019. State the title of podcast and review rating.
SELECT DISTINCT T1.title, T2.rating FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.created_at LIKE '2019-05-%'
created in May 2019 refers to created_at like '2019-05%'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the average rating for the podcast that is most reviewed?
SELECT AVG(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id GROUP BY T1.podcast_id ORDER BY COUNT(T2.content) DESC LIMIT 1
most reviewed refers to Max(Count(reviews.podcast_id)); average rating refers to AVG (rating)
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Which category does the podcast titled 'SciFi Tech Talk' belong to?
SELECT T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'SciFi Tech Talk'
podcast titled 'SciFi Tech Talk' refers to title = 'SciFi Tech Talk'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the name of the podcast in which a commentor left a comment with the title 'Long time listener, calling it quits?' Include the URL of the podcast as well.
SELECT podcast_id, itunes_url FROM podcasts WHERE podcast_id = ( SELECT podcast_id FROM reviews WHERE title = 'Long time listener, calling it quits' )
comment refers to review; 'Long time listener, calling it quits' is the title of review;  name of the podcast refers to title of podcast; URL refers to itunes_url
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List all the names of podcasts under the 'true crime' category.
SELECT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'true-crime'
name of the podcast refers to title of the podcast
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Write all the review content belonging to StormCast: The Official Warhammer Age of Sigmar Podcast.
SELECT content FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'StormCast: The Official Warhammer Age of Sigmar Podcast' )
review content refers to content; 'StormCast: The Official Warhammer Age of Sigmar Podcast' is the title of podcast;
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Write all the review titles and the contents belonging to the podcast 'More Stupider: A 90-Day Fiance Podcast' with a review rating of 1.
SELECT title, content FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'More Stupider: A 90-Day Fiance Podcast' ) AND rating = 1
podcast 'More Stupider: A 90-Day Fiance Podcast'  refers to title = 'More Stupider: A 90-Day Fiance Podcast'; rating of 1 refers to rating = 1
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
How many reviews does 'LifeAfter/The Message' have which were rated below 3?
SELECT COUNT(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'LifeAfter/The Message' AND T2.rating <= 3
LifeAfter/The Message' is the title of podcast; rated below 3 refers to rating < 3
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
The 'More Stupider: A 90-Day Fiance Podcast' belongs to which category and what is the average rating of the podcast?
SELECT AVG(T3.rating) FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T2.title = 'More Stupider: A 90-Day Fiance Podcast'
More Stupider: A 90-Day Fiance Podcast' is the title of podcast; average rating = Divide (Sum(rating), Count(rating))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Of the arts-books and arts-design categories, which one has more podcasts and what is the numerical difference between them?
SELECT ( SELECT category FROM categories WHERE category = 'arts-books' OR category = 'arts-design' GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 ) "has more podcasts" , ( SELECT SUM(CASE WHEN category = 'arts-books' THEN 1 ELSE 0 END) - SUM(CASE WHEN category = 'arts-design' THEN 1 ELSE 0 END) FROM categori...
arts-books' and 'arts-design' are category; numerical difference = Subtract(Count(podcast_id(category = 'arts-books')), Count(podcast_id(category = 'arts-design'))); one has much more podcast refers to Max(Count(podcast_id))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
How many total reviews runned at in June 2022 were added to the podcasts?
SELECT SUM(reviews_added) FROM runs WHERE run_at LIKE '2022-06-%'
run at in June 2022 refers to run_at BETWEEN '2022-06-01 00:00:00' and '2022-06-30 23:59:59'; reviews refers to review_added
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
How many podcast reviews with a rating of 3 were created during the first quarter of 2015?
SELECT COUNT(podcast_id) FROM reviews WHERE rating = 3 AND created_at BETWEEN '2015-01-01T00:00:00-07:00' AND '2015-03-31T23:59:59-07:00'
rating of 3 refers to rating = 3; created during the first quarter of 2015 refers to created_at BETWEEN'2015-01-01T00:00:00-07:00' and '2015-03-31T23:59:59-07:00'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Calculate the percentage of podcasts in the fiction-science-fiction category.
SELECT CAST(SUM(CASE WHEN category = 'fiction-science-fiction' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(podcast_id) OR '%' "percentage" FROM categories
percentage =   Divide (Count(podcast_id(category = 'fiction-science-fiction')), Count(podcast_id)) * 100
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the average rating of all the podcasts with reviews created in 2019?
SELECT AVG(rating) FROM reviews WHERE created_at BETWEEN '2019-01-01T00:00:00-07:00' AND '2019-12-31T23:59:59-07:00'
created in 2019 refers to created_at BETWEEN '2019-01-01T00:00:00' and '2019-12-31T23:59:59'; average rating  = Divide (Sum(rating), Count(podcast_id))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the percentage of reviews added each year of the total reviews added?
SELECT CAST((SUM(CASE WHEN run_at LIKE '2022-%' THEN reviews_added ELSE 0 END) - SUM(CASE WHEN run_at LIKE '2021-%' THEN reviews_added ELSE 0 END)) AS REAL) * 100 / SUM(reviews_added) OR '%' "percentage" FROM runs
review added each year refers to runs_at like '2021%' and runs_at like '2022%'; percentage for 2021 = Divide (Sum(reviews_added(runs_at like '2021%)), Sum(reviews_added)) * 100; percentage of 2022 = Divide (Sum(reviews_added(runs_at like '2022%')), Sum(reviews_added)) * 100
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Indicates the title of all podcasts in the fiction category.
SELECT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'fiction'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the rating and category of the podcast entitled Sitcomadon?
SELECT DISTINCT T3.rating, T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T2.title = 'Sitcomadon'
entitled refers to title; 'Sitcomadon' is the title of podcast
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Indicate the id of the reviewer whose itunes id is 1516665400.
SELECT T2.author_id FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.itunes_id = 1516665400
"151665400" is itunes_id; id of reviewer refers to author_id
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What are the titles of the podcasts whose reviews were created between 2018-08-22T11:53:16-07:00 and 2018-11-20T11:14:20-07:00?
SELECT DISTINCT T1.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.created_at BETWEEN '2018-08-22T11:53:16-07:00' AND '2018-11-20T11:14:20-07:00'
created between 2018-08-22T11:53:16-07:00 and 2018-11-20T11:14:20-07:00 refers to created at BETWEEN '2018-08-22T11:53:16-07:00' and '2018-11-20T11:14:20-07:00'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
To which categories do the podcasts of the reviewer whose id is EFB34EAC8E9397C belong?
SELECT DISTINCT T1.category FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.author_id = 'EFB34EAC8E9397C'
reviewer whose id is EFB34EAC8E9397C refers to author_id = 'EFB34EAC8E9397C'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Indicate the slug and the itunes url of the podcast whose review content was written Can't stop listening.
SELECT slug, itunes_url FROM podcasts WHERE podcast_id IN ( SELECT podcast_id FROM reviews WHERE content = 'Can''t stop listening' )
review content was written Can't stop listening refers to content = 'Can't stop listening'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What dates were the Don't Lie To Your Life Coach podcast reviews created?
SELECT created_at FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'Don''t Lie To Your Life Coach' )
"Don't Lie To Your Life Coach" refers to title of podcast; date refers to created_at
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
In how many categories were podcast reviews created in the last six months of 2016? List them.
SELECT COUNT(DISTINCT T1.category) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.created_at BETWEEN '2016-07-01T00:00:00-07:00' AND '2016-12-31T23:59:59-07:00'
created in last six months of 2016 refers to created_at BETWEEN '2016-07-01T00:00:00-07:00' and '2016-12-31T23:59:59-07:00'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Calculate the average rating of the true crime category.
SELECT AVG(T2.rating) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'true-crime'
average rating = Divide (Sum(rating(category = 'true-crime')), Count(podcast_id(category = 'true-crime')))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List the titles of the art category.
SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts'
art category refers to category = 'arts'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the average rating of all the podcasts in category art?
SELECT AVG(T2.rating) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts'
category art refers to category = 'arts'; average rating = Divide (Sum (rating), Count (podcast_id))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Provide the names of podcasts in the art category in 2018.
SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts' AND T2.created_at LIKE '2018-%'
art category refers to category = 'arts'; in 2018 refers to created_at like '2018%'; name of podcast refers to title
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Write the names of the podcasts in the music category that have a rating greater than 3.
SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'music' AND T2.rating > 3
music category refers to category = 'music'; rating greater than 3 refers to rating > 3; name of the podcast refers to title
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Which titles have the content "love" but the category is art produced between 2018 and 2019.
SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE (T2.created_at LIKE '2018-%' AND T1.category = 'arts' AND T2.content LIKE '%love%') OR (T2.created_at LIKE '2019-%' AND T1.category = 'arts' AND T2.content LIKE '%love%')
content love refers to content = 'love'; 'arts' is the category; produced between 2018 and 2019 refers to year (created_at) BETWEEN 2018 and 2019
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the category and itune url of the title "Scaling Global"?
SELECT T1.category, T2.itunes_url FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Scaling Global'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the average rating of podcasts in comedy category?
SELECT AVG(T2.rating) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'comedy'
comedy category refers to category = 'comedy'; average rating = Divide (Sum(rating), Count(podcast_id))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the least common category?
SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) ASC LIMIT 1
least common category refers to Min(Count(category))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the longest review?
SELECT title FROM reviews ORDER BY LENGTH(content) DESC LIMIT 1
review refers to content; longest review refers to Max(content)
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the review with the title "Hosts bring the show down" for?
SELECT title FROM podcasts WHERE podcast_id = ( SELECT podcast_id FROM reviews WHERE title = 'Hosts bring the show down' )
"Hosts bring the show down" refers to title of review
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Which "music" podcast has the longest title?
SELECT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'music' ORDER BY LENGTH(T2.title) DESC LIMIT 1
music podcasts refers to category = 'music'; longest title refers to title = Max(length(title))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List all the cagetories for all the podcasts with "jessica" in the title.
SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title LIKE '%jessica%' )
podcast with 'jessica' in title refers to title like '%jessica%'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the category for the "Moist Boys" podcast?
SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title = 'Moist Boys' )
"Moist Boys" refers to title of podcast
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List all of the two-star reviews and their categories.
SELECT T1.category FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.rating = 2
two-stars review refers to rating = 2
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List all the podcasts reviewed by a reviewer who has a review titled "Inspired & On Fire!".
SELECT T1.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Inspired & On Fire!'
"Inspired & On Fire" refers to title of review
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What are the titles and categories of all the podcasts with a review that has "Absolutely fantastic" in it?
SELECT T2.title, T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T3.content LIKE '%Absolutely fantastic%'
review refers to content; 'Absolutely fantastic' in it refers to content like '%Absolutely fantastic%'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Which category has the most reviews?
SELECT T1.category FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id GROUP BY T1.category ORDER BY COUNT(T2.podcast_id) DESC LIMIT 1
Most review refers to Max(Count(reviews.podcast_id))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
List the urls for all the "fiction-science-fiction" podcasts.
SELECT itunes_url FROM podcasts WHERE podcast_id IN ( SELECT podcast_id FROM categories WHERE category = 'fiction-science-fiction' )
fiction-science-fiction podcasts refers to category = 'fiction-science-fiction'; urls refers to itunes_url
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the content of the earliest review for the "Stuff You Should Know" podcast?
SELECT T2.content FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Stuff You Should Know' ORDER BY T2.created_at ASC LIMIT 1
"Stuff You Should Know" is the title of podcast; earliest refers to Min(created_at)
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
How many reviews does "Planet Money" have?
SELECT COUNT(T2.podcast_id) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Planet Money'
"Planet Money" is the title of podcast
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the average rating for the "crime-junkie" podcast?
SELECT AVG(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Crime Junkie'
"crime-junkie" podcast refers to title = 'crime-junkie'; average rating = Divide (Sum(rating), Count(rating))
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What percentage of podcasts are "technology" podcasts? List all of them.
SELECT CAST(SUM(CASE WHEN T1.category = 'technology' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.title) OR '%' "percentage" FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id
"technology" podcast refers to category = 'technology'; percentage = Divide (Count (podcast_id (category = 'technology')), Count (podcast_id)) * 100
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the content of the review under the title "really interesting!" and is created on 2018-04-24 at 12:05:16?
SELECT content FROM reviews WHERE title = 'really interesting!' AND created_at = '2018-04-24T12:05:16-07:00'
"really interesting" is the title of review;  created on 2018-04-24 at 12:05:16 refers to created_at = '2018-04-24T12:05:16-07:00'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Which category is the podcast "Scaling Global" under?
SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title = 'Scaling Global' )
"Scaling Global" is the title of podcast
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Please list the titles of all the podcasts under the category "arts-performing-arts".
SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts-performing-arts'
category 'arts-performing-arts' refers to category = 'arts-performing-arts';
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
How many reviews are created for the podcast "Scaling Global" under?
SELECT COUNT(T2.content) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Scaling Global'
"Scaling Global" is the title of podcast
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Among the reviews for the podcast "Please Excuse My Dead Aunt Sally", how many of them are made in the year 2019?
SELECT COUNT(T2.created_at) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Please Excuse My Dead Aunt Sally' AND T2.created_at LIKE '2019-%'
"Please Excuse My Dead Aunt Sally" is the title of podcast; made in the year 2019 refers to created_at like '2019%'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
Please list the titles of the podcasts for which the author whose ID is F7E5A318989779D has written a review.
SELECT T2.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.author_id = 'F7E5A318989779D'
author whose ID is F7E5A318989779D refers to author_id = 'F7E5A318989779D'
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
How many ratings of 5 have been given to the podcast "Please Excuse My Dead Aunt Sally"?
SELECT COUNT(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Please Excuse My Dead Aunt Sally' AND T2.rating = 5
rating of 5 refers to rating = 5; 'Please Excuse My Dead Aunt Sally' is the title of podcast
music_platform_2
CREATE TABLE runs ( run_at text not null, max_rowid integer not null, reviews_added integer not null ); CREATE TABLE podcasts ( podcast_id text primary key, itunes_id integer not null, slug text not null, itunes_url text not null, title text not null ...
【DB_ID】 music_platform_2 【Schema】 # Table: main.categories [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), (category:TEXT, Primary Key, Examples: [arts, arts-performing-arts, music]) ] # Table: main.podcasts [ (podcast_id:TEXT, Primary Key, Examples: [a00018b54eb342567c94dacfb2a3e504]), ...
What is the average rating of the podcast "Please Excuse My Dead Aunt Sally"?
SELECT AVG(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Please Excuse My Dead Aunt Sally'
"Please Excuse My Dead Aunty Sally" is the title of podcast; Average rating = Divide (Sum(rating), Count(rating))
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
How many universities have at least 80,000 students in the year 2011?
SELECT COUNT(*) FROM university_year WHERE num_students > 80000 AND year = 2011
have at least 80,000 students refers to num_students > 8000; year = 2011
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
What is the ranking system ID of the award criteria?
SELECT ranking_system_id FROM ranking_criteria WHERE criteria_name = 'Award'
award criteria refers to criteria_name = 'Award';
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
How many state universities are there?
SELECT COUNT(*) FROM university WHERE university_name LIKE '%State%'
state universities refers to university_name LIKE '%State%';
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
What is the student staff ratio of the university with the highest student staff ratio of all time?
SELECT MAX(student_staff_ratio) FROM university_year WHERE student_staff_ratio = ( SELECT MAX(student_staff_ratio) FROM university_year )
highest student staff ratio refers to max(student_staff_ratio)
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
How many criteria belong to ranking system ID 3?
SELECT COUNT(id) FROM ranking_criteria WHERE ranking_system_id = 3
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
What is the ID of the university that has only 1% of international students between 2011 to 2015?
SELECT university_id FROM university_year WHERE pct_international_students = 1 AND year BETWEEN 2011 AND 2015
has only 1% of international students refers to pct_international_students = 1; between 2011 to 2015 refers to year BETWEEN 2011 AND 2015; ID of university refers to university_id
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
Give the name of the country that has the most universities.
SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id GROUP BY T2.country_name ORDER BY COUNT(T1.university_name) DESC LIMIT 1
has the most universities refers to MAX(COUNT(id)); name of the country refers to country_name
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
What is the name of the university that had the highest number of international students for 6 consecutive years?
SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id ORDER BY T1.pct_international_students DESC LIMIT 1
had the highest number of international students refers to max(pct_international_students); for 6 consecutive years refers to count(SUBTRACT(year, rm)) > = 6; name of university refers to university_name;
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
In 2014, what is the name of the university which was considered a leader in the publications rank?
SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Publications Rank' AND T2.year = 2014 AND T1.id = 17 ORDER BY T2.score DESC LIMIT 1
In 2014 refers to year = 2014; leader refers to MAX(score); in the publications rank refers to criteria_name = 'Publications Rank'; name of university refers to university_name;
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
What is the name of the university that has the lowest number of students of all time?
SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id ORDER BY T1.num_students LIMIT 1
has the lowest number of students refers to min(num_students); name of the university refers to university_name
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
How many universities are there in the United States of America?
SELECT COUNT(*) FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'United States of America'
in the United States of America refers to country_name = 'United States of America';
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
In 2016, what is the name of the university in Australia with the highest score in Citations criteria?
SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id INNER JOIN country AS T4 ON T4.id = T3.country_id WHERE T1.criteria_name = 'Citations' AND T2.year = 2016 AND T1.id = 4 AND T4.country_...
In 2016 refers to year = 2016; name of the university refers to university_name; in Australia refers to country_name = 'Australia'; in Citations criteria refers to criteria_name = 'Citations'; highest score refers to MAX(score)
university
CREATE TABLE country ( id INTEGER not null primary key, country_name TEXT default NULL ); CREATE TABLE ranking_system ( id INTEGER not null primary key, system_name TEXT default NULL ); CREATE TABLE ranking_criteria ( id INTEGER not null ...
【DB_ID】 university 【Schema】 # Table: main.country [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (country_name:TEXT, Examples: [Argentina, Australia, Austria]) ] # Table: main.ranking_criteria [ (id:INTEGER, Primary Key, Examples: [1, 2, 3]), (ranking_system_id:INTEGER, Examples: [1, 2, 3]), (criteria_name:TEXT, Exa...
How many universities scored 0 in Awards between 2005 to 2015?
SELECT COUNT(*) FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id WHERE T1.criteria_name = 'Award' AND T2.year BETWEEN 2005 AND 2015 AND T2.score = 0
between 2005 to 2015 refers to year BETWEEN 2005 AND 2015; scored 0 refers to score = 0; in Awards refers to criteria_name = 'Award'