context
stringlengths
11
9.12k
question
stringlengths
0
1.06k
SQL
stringlengths
2
4.44k
source
stringclasses
28 values
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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!'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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-%'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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' )
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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' )
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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 categories ) "differenct BETWEEN arts-books and arts-design"
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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-%'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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' )
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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' )
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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-%'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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%')
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
What is the least common category?
SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) ASC LIMIT 1
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
What is the longest review?
SELECT title FROM reviews ORDER BY LENGTH(content) DESC LIMIT 1
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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' )
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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%' )
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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' )
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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!'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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%'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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' )
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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' )
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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-%'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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
bird
CREATE TABLE music_platform_2 (run_at text, max_rowid integer, reviews_added integer, podcast_id text, itunes_id integer, slug text, itunes_url text, title text, podcast_id text, title text, content text, rating integer, author_id text, created_at text, podcast_id text, category text)
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'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
What is the ranking system ID of the award criteria?
SELECT ranking_system_id FROM ranking_criteria WHERE criteria_name = 'Award'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
How many state universities are there?
SELECT COUNT(*) FROM university WHERE university_name LIKE '%State%'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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 )
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
How many criteria belong to ranking system ID 3?
SELECT COUNT(id) FROM ranking_criteria WHERE ranking_system_id = 3
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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_name = 'Australia' ORDER BY T2.score DESC LIMIT 1
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Which country is the University of Oxford located?
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'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
How many times did the Yale University achieve a score of no less than 10 in the Quality of Education Rank?
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'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
What are the names of the criteria under Center for World University Rankings?
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'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
List the names of all the universities that have no less than 50,000 students in the year 2012.
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Between 2011 to 2016, in which countries can you find the universities where at least 50% of its students are international students?
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
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.
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
What are the names of the top 5 universities with the highest number of international students?
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
What is the university ID of the university with the largest student staff ratio?
SELECT university_id FROM university_year ORDER BY student_staff_ratio DESC LIMIT 1
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Give the year where a university had the lowest number of students.
SELECT year FROM university_year ORDER BY num_students ASC LIMIT 1
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Compute the average percentage of female students.
SELECT AVG(pct_female_students) FROM university_year
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Provide the number of international students and number of students in 2013 in university ID 20.
SELECT pct_international_students * num_students, num_students FROM university_year WHERE year = 2013 AND university_id = 20
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
What is the university ID of Harvard University?
SELECT id FROM university WHERE university_name = 'Harvard University'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
List the university ID of the university that scored 100 in 2011.
SELECT university_id FROM university_ranking_year WHERE score = 100 AND year = 2011
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Provide the ranking system of the ranking criteria named Quality of Education Rank.
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'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
What is the student staff ratio of Harvard University in 2012?
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
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Give the location of the university ID 112.
SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T1.id = 112
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Calculate the total number of students in universities located in Sweden.
SELECT SUM(T2.num_students) 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 T3.country_name = 'Sweden'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
What is the ranking criteria ID of Brown University in 2014?
SELECT T1.ranking_criteria_id FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Brown University' AND T1.year = 2014
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
List the name of universities located in Spain.
SELECT T1.university_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Spain'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
What is the criteria name of the university ID 32 in 2015?
SELECT T1.criteria_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id WHERE T2.university_id = 32 AND T2.year = 2015
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Compute the average score of the university located in Brazil.
SELECT AVG(T2.score) FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'Brazil'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
In which country does the most populated university in 2014 located ?
SELECT T2.country_id FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2014 ORDER BY T1.num_students DESC LIMIT 1
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Give the score and number of international students in university ID 100 in 2015.
SELECT CAST(T1.num_students * T1.pct_international_students AS REAL) / 100, T2.score FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.year = 2015 AND T1.university_id = 100
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
What is the student population of the university that scored 98 in 2013?
SELECT SUM(T1.num_students) FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.score = 98 AND T1.year = 2013
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
List the criteria names under the ranking system called Center for World University Ranking.
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'
bird
CREATE TABLE university (id integer, country_name text, id integer, system_name text, id integer, ranking_system_id integer, criteria_name text, id integer, country_id integer, university_name text, university_id integer, ranking_criteria_id integer, year integer, score integer, university_id integer, year integer, num_students integer, student_staff_ratio real, pct_international_students integer, pct_female_students integer)
Provide the country name of universities with the number of students greater than 98% of the average student population of all universities in 2013.
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.year = 2013 AND T2.num_students * 100 > ( SELECT AVG(num_students) FROM university_year ) * 98
bird