problem
stringlengths
121
422
db_id
stringclasses
69 values
solution
stringlengths
23
804
Write SQL query to solve given problem: In countries with constitutional monarchy, what is the percentage of cities located in the district of England?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world
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'
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
world
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
Write SQL query to solve given problem: Among the countries that use Italian as their language, what is the percentage of republic countries?. Keep the solution inside sql tag ```sql [SQL-Query] ```
world
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'
Write SQL query to solve given problem: How many podcasts are there in the category which has the most podcasts?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT COUNT(podcast_id) FROM categories WHERE category = ( SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 )
Write SQL query to solve given problem: What is the percentage of the podcast that are categorized in four or more categories?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT COUNT(T1.podcast_id) FROM ( SELECT podcast_id FROM categories GROUP BY podcast_id HAVING COUNT(category) >= 4 ) AS T1
Write SQL query to solve given problem: Provide the itunes id and url for podcast titled 'Brown Suga Diaries'.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT itunes_id, itunes_url FROM podcasts WHERE title = 'Brown Suga Diaries'
Write SQL query to solve given problem: List all podcast with its itunes url for all title containing the word 'Dream'.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT itunes_url FROM podcasts WHERE title LIKE '%Dream%' GROUP BY itunes_url
Write SQL query to solve given problem: Name all the categories for podcast titled 'I Heart My Life Show'.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: List all the podcast title and its itunes url under the 'society-culture' category.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: How many people rated 5 for the podcast which title contains the word 'spoiler' under the 'art' category '?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: List the authors who created review for podcast titled 'Pop Rocket' in 2016 with rating less than 5.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: Name all the podcast title and its category with average rating of more than 3.0.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: List all content reviewed for podcast with the best rating under the 'fiction' category. State the podcast title.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: State the podcast title, content review and rating for all reviews with titled 'Love it!'. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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!'
Write SQL query to solve given problem: Find the author, rating and review creation date of review for podcast title 'In The Thick'.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: Which podcast was reviewed the latest? State the date of creation, podcast tile and rating.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: Name the podcast title, rating and review content created by '76A4C24B6038145'.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: For all reviews with the worst rating, state the podcast title as well as the review title and content.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: List all reviews created in May 2019. State the title of podcast and review rating.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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-%'
Write SQL query to solve given problem: What is the average rating for the podcast that is most reviewed?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: Which category does the podcast titled 'SciFi Tech Talk' belong to?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT podcast_id, itunes_url FROM podcasts WHERE podcast_id = ( SELECT podcast_id FROM reviews WHERE title = 'Long time listener, calling it quits' )
Write SQL query to solve given problem: List all the names of podcasts under the 'true crime' category.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'true-crime'
Write SQL query to solve given problem: Write all the review content belonging to StormCast: The Official Warhammer Age of Sigmar Podcast.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT content FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'StormCast: The Official Warhammer Age of Sigmar Podcast' )
Write SQL query to solve given problem: 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.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: How many reviews does 'LifeAfter/The Message' have which were rated below 3?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: The 'More Stupider: A 90-Day Fiance Podcast' belongs to which category and what is the average rating of the podcast?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: Of the arts-books and arts-design categories, which one has more podcasts and what is the numerical difference between them?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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 categories ) "differenct BETWEEN arts-books and arts-design"
Write SQL query to solve given problem: How many total reviews runned at in June 2022 were added to the podcasts?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT SUM(reviews_added) FROM runs WHERE run_at LIKE '2022-06-%'
Write SQL query to solve given problem: How many podcast reviews with a rating of 3 were created during the first quarter of 2015?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: Calculate the percentage of podcasts in the fiction-science-fiction category.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT CAST(SUM(CASE WHEN category = 'fiction-science-fiction' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(podcast_id) OR '%' "percentage" FROM categories
Write SQL query to solve given problem: What is the average rating of all the podcasts with reviews created in 2019?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT AVG(rating) FROM reviews WHERE created_at BETWEEN '2019-01-01T00:00:00-07:00' AND '2019-12-31T23:59:59-07:00'
Write SQL query to solve given problem: What is the percentage of reviews added each year of the total reviews added?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: Indicates the title of all podcasts in the fiction category.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'fiction'
Write SQL query to solve given problem: What is the rating and category of the podcast entitled Sitcomadon?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: Indicate the id of the reviewer whose itunes id is 1516665400.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: 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?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: To which categories do the podcasts of the reviewer whose id is EFB34EAC8E9397C belong?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: Indicate the slug and the itunes url of the podcast whose review content was written Can't stop listening.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT slug, itunes_url FROM podcasts WHERE podcast_id IN ( SELECT podcast_id FROM reviews WHERE content = 'Can''t stop listening' )
Write SQL query to solve given problem: What dates were the Don't Lie To Your Life Coach podcast reviews created?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT created_at FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'Don''t Lie To Your Life Coach' )
Write SQL query to solve given problem: In how many categories were podcast reviews created in the last six months of 2016? List them.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: Calculate the average rating of the true crime category.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: List the titles of the art category.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts'
Write SQL query to solve given problem: What is the average rating of all the podcasts in category art?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT AVG(T2.rating) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts'
Write SQL query to solve given problem: Provide the names of podcasts in the art category in 2018.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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-%'
Write SQL query to solve given problem: Write the names of the podcasts in the music category that have a rating greater than 3.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: Which titles have the content "love" but the category is art produced between 2018 and 2019.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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%')
Write SQL query to solve given problem: What is the category and itune url of the title "Scaling Global"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: What is the average rating of podcasts in comedy category?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT AVG(T2.rating) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'comedy'
Write SQL query to solve given problem: What is the least common category?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) ASC LIMIT 1
Write SQL query to solve given problem: What is the longest review?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT title FROM reviews ORDER BY LENGTH(content) DESC LIMIT 1
Write SQL query to solve given problem: What is the review with the title "Hosts bring the show down" for?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT title FROM podcasts WHERE podcast_id = ( SELECT podcast_id FROM reviews WHERE title = 'Hosts bring the show down' )
Write SQL query to solve given problem: Which "music" podcast has the longest title?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: List all the cagetories for all the podcasts with "jessica" in the title.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title LIKE '%jessica%' )
Write SQL query to solve given problem: What is the category for the "Moist Boys" podcast?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title = 'Moist Boys' )
Write SQL query to solve given problem: List all of the two-star reviews and their categories.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT T1.category FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.rating = 2
Write SQL query to solve given problem: List all the podcasts reviewed by a reviewer who has a review titled "Inspired & On Fire!".. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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!'
Write SQL query to solve given problem: What are the titles and categories of all the podcasts with a review that has "Absolutely fantastic" in it?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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%'
Write SQL query to solve given problem: Which category has the most reviews?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: List the urls for all the "fiction-science-fiction" podcasts.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT itunes_url FROM podcasts WHERE podcast_id IN ( SELECT podcast_id FROM categories WHERE category = 'fiction-science-fiction' )
Write SQL query to solve given problem: What is the content of the earliest review for the "Stuff You Should Know" podcast?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: How many reviews does "Planet Money" have?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: What is the average rating for the "crime-junkie" podcast?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: What percentage of podcasts are "technology" podcasts? List all of them.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: What is the content of the review under the title "really interesting!" and is created on 2018-04-24 at 12:05:16?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT content FROM reviews WHERE title = 'really interesting!' AND created_at = '2018-04-24T12:05:16-07:00'
Write SQL query to solve given problem: Which category is the podcast "Scaling Global" under?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title = 'Scaling Global' )
Write SQL query to solve given problem: Please list the titles of all the podcasts under the category "arts-performing-arts".. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: How many reviews are created for the podcast "Scaling Global" under?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: Among the reviews for the podcast "Please Excuse My Dead Aunt Sally", how many of them are made in the year 2019?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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-%'
Write SQL query to solve given problem: Please list the titles of the podcasts for which the author whose ID is F7E5A318989779D has written a review.. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
SELECT T2.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.author_id = 'F7E5A318989779D'
Write SQL query to solve given problem: How many ratings of 5 have been given to the podcast "Please Excuse My Dead Aunt Sally"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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
Write SQL query to solve given problem: What is the average rating of the podcast "Please Excuse My Dead Aunt Sally"?. Keep the solution inside sql tag ```sql [SQL-Query] ```
music_platform_2
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'
Write SQL query to solve given problem: How many universities have at least 80,000 students in the year 2011?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT COUNT(*) FROM university_year WHERE num_students > 80000 AND year = 2011
Write SQL query to solve given problem: What is the ranking system ID of the award criteria?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT ranking_system_id FROM ranking_criteria WHERE criteria_name = 'Award'
Write SQL query to solve given problem: How many state universities are there?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT COUNT(*) FROM university WHERE university_name LIKE '%State%'
Write SQL query to solve given problem: What is the student staff ratio of the university with the highest student staff ratio of all time?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT MAX(student_staff_ratio) FROM university_year WHERE student_staff_ratio = ( SELECT MAX(student_staff_ratio) FROM university_year )
Write SQL query to solve given problem: How many criteria belong to ranking system ID 3?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT COUNT(id) FROM ranking_criteria WHERE ranking_system_id = 3
Write SQL query to solve given problem: What is the ID of the university that has only 1% of international students between 2011 to 2015?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT university_id FROM university_year WHERE pct_international_students = 1 AND year BETWEEN 2011 AND 2015
Write SQL query to solve given problem: Give the name of the country that has the most universities.. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
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
Write SQL query to solve given problem: What is the name of the university that had the highest number of international students for 6 consecutive years?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
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
Write SQL query to solve given problem: In 2014, what is the name of the university which was considered a leader in the publications rank?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
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
Write SQL query to solve given problem: What is the name of the university that has the lowest number of students of all time?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
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
Write SQL query to solve given problem: How many universities are there in the United States of America?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
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'
Write SQL query to solve given problem: In 2016, what is the name of the university in Australia with the highest score in Citations criteria?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
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_name = 'Australia' ORDER BY T2.score DESC LIMIT 1
Write SQL query to solve given problem: How many universities scored 0 in Awards between 2005 to 2015?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
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
Write SQL query to solve given problem: Which country is the University of Oxford located?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE university_name = 'University of Oxford'
Write SQL query to solve given problem: How many times did the Yale University achieve a score of no less than 10 in the Quality of Education Rank?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT COUNT(*) 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 T3.university_name = 'Yale University' AND T2.score >= 10 AND T1.criteria_name = 'Quality of Education Rank'
Write SQL query to solve given problem: What are the names of the criteria under Center for World University Rankings?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT T2.criteria_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Center for World University Rankings'
Write SQL query to solve given problem: List the names of all the universities that have no less than 50,000 students in the year 2012.. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.num_students > 50000 AND T1.year = 2012
Write SQL query to solve given problem: Between 2011 to 2016, in which countries can you find the universities where at least 50% of its students are international students?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT DISTINCT T3.country_name FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.pct_international_students > 50 AND T2.year BETWEEN 2011 AND 2016
Write SQL query to solve given problem: How many universities have no less than 20,000 female students in 2016? Identify how many of the said universities are located in the United States of America.. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT COUNT(*) , SUM(CASE WHEN T3.country_name = 'United States of America' THEN 1 ELSE 0 END) AS nums_in_usa FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.year = 2016 AND T2.num_students * T2.pct_female_students / 100 > 20000
Write SQL query to solve given problem: What are the names of the top 5 universities with the highest number of international students?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT DISTINCT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id ORDER BY (CAST(T1.num_students * T1.pct_international_students AS REAL) / 100) DESC LIMIT 5
Write SQL query to solve given problem: What is the university ID of the university with the largest student staff ratio?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT university_id FROM university_year ORDER BY student_staff_ratio DESC LIMIT 1
Write SQL query to solve given problem: Give the year where a university had the lowest number of students.. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT year FROM university_year ORDER BY num_students ASC LIMIT 1
Write SQL query to solve given problem: Compute the average percentage of female students.. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT AVG(pct_female_students) FROM university_year
Write SQL query to solve given problem: Provide the number of international students and number of students in 2013 in university ID 20.. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT pct_international_students * num_students, num_students FROM university_year WHERE year = 2013 AND university_id = 20
Write SQL query to solve given problem: What is the university ID of Harvard University?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT id FROM university WHERE university_name = 'Harvard University'
Write SQL query to solve given problem: List the university ID of the university that scored 100 in 2011.. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT university_id FROM university_ranking_year WHERE score = 100 AND year = 2011
Write SQL query to solve given problem: Provide the ranking system of the ranking criteria named Quality of Education Rank.. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT T1.system_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T2.criteria_name = 'Quality of Education Rank'
Write SQL query to solve given problem: What is the student staff ratio of Harvard University in 2012?. Keep the solution inside sql tag ```sql [SQL-Query] ```
university
SELECT T1.student_staff_ratio FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Harvard University' AND T1.year = 2012