input stringlengths 122 2.7k | output stringlengths 24 805 |
|---|---|
[INST] Here is a database schema:
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INTEGER ]
LifeExpectancy [ REAL ]
GNP [ REAL ]
GNPOld [ REAL ]
LocalName [ TEXT ]
GovernmentForm [ TEXT ]
HeadOfState [ TEXT ]
Capital [ INTEGER ... | SELECT T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T2.name = 'Greece'; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INT... | SELECT T2.Population FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'Queimados'; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
CountryLanguage :
CountryCode [ TEXT ] CountryLanguage.CountryCode = Country.Code
Language [ TEXT ]
IsOfficial [ TEXT ]
Percentage [ REAL ]
Ple... | SELECT T2.Language FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.Population ASC LIMIT 1; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INT... | SELECT T2.SurfaceArea, T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.District = 'Namibe'; |
[INST] Here is a database schema:
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INTEGER ]
LifeExpectancy [ REAL ]
GNP [ REAL ]
GNPOld [ REAL ]
LocalName [ TEXT ]
GovernmentForm [ TEXT ]
HeadOfState [ TEXT ]
Capital [ INTEGER ... | SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T1.Language = 'English'; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INT... | SELECT T1.District FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T2.SurfaceArea ASC LIMIT 1; |
[INST] Here is a database schema:
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INTEGER ]
LifeExpectancy [ REAL ]
GNP [ REAL ]
GNPOld [ REAL ]
LocalName [ TEXT ]
GovernmentForm [ TEXT ]
HeadOfState [ TEXT ]
Capital [ INTEGER ... | SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GNP < 1000 AND T1.IsOfficial = 'T' AND T1.Language = 'Dutch'; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INT... | SELECT T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.District = 'Entre Rios' LIMIT 1; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INT... | SELECT T2.LocalName FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'The Valley'; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INT... | SELECT T2.Name, T1.Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.SurfaceArea > 7000000; |
[INST] Here is a database schema:
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INTEGER ]
LifeExpectancy [ REAL ]
GNP [ REAL ]
GNPOld [ REAL ]
LocalName [ TEXT ]
GovernmentForm [ TEXT ]
HeadOfState [ TEXT ]
Capital [ INTEGER ... | SELECT AVG(T2.LifeExpectancy) FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Language = 'Japanese'; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INT... | SELECT T2.Name, COUNT(T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.SurfaceArea = 652090 GROUP BY T2.Name; |
[INST] Here is a database schema:
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INTEGER ]
LifeExpectancy [ REAL ]
GNP [ REAL ]
GNPOld [ REAL ]
LocalName [ TEXT ]
GovernmentForm [ TEXT ]
HeadOfState [ TEXT ]
Capital [ INTEGER ... | SELECT T2.Name, T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.IndepYear BETWEEN 1980 AND 1995; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INT... | SELECT T2.LifeExpectancy FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'Calama'; |
[INST] Here is a database schema:
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INTEGER ]
LifeExpectancy [ REAL ]
GNP [ REAL ]
GNPOld [ REAL ]
LocalName [ TEXT ]
GovernmentForm [ TEXT ]
HeadOfState [ TEXT ]
Capital [ INTEGER ... | SELECT T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.HeadOfState = 'Pierre Buyoya'; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INT... | 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'; |
[INST] Here is a database schema:
City :
ID [ INTEGER ] primary_key
Name [ TEXT ]
CountryCode [ TEXT ] City.CountryCode = Country.Code
District [ TEXT ]
Population [ INTEGER ]
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INT... | 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; |
[INST] Here is a database schema:
Country :
Code [ TEXT ] primary_key
Name [ TEXT ]
Continent [ TEXT ]
Region [ TEXT ]
SurfaceArea [ REAL ]
IndepYear [ INTEGER ]
Population [ INTEGER ]
LifeExpectancy [ REAL ]
GNP [ REAL ]
GNPOld [ REAL ]
LocalName [ TEXT ]
GovernmentForm [ TEXT ]
HeadOfState [ TEXT ]
Capital [ INTEGER ... | 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'; |
[INST] Here is a database schema:
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: How many podcasts are there in the category which has the most podcasts? [/INST] [/INST] | SELECT COUNT(podcast_id) FROM categories WHERE category = ( SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 ); |
[INST] Here is a database schema:
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: What is the percentage of the podcast that are categorized in four or more categories? [/INST] [/INST] | SELECT COUNT(T1.podcast_id) FROM ( SELECT podcast_id FROM categories GROUP BY podcast_id HAVING COUNT(category) >= 4 ) AS T1; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
Please write me a SQL statement that answers the following question: Provide the itunes id and url for podcast titled 'Brown Suga Diaries'. [/INST] [/INST] | SELECT itunes_id, itunes_url FROM podcasts WHERE title = 'Brown Suga Diaries'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
Please write me a SQL statement that answers the following question: List all podcast with its itunes url for all title containing the word 'Dream'. [/INST] [/INST] | SELECT itunes_url FROM podcasts WHERE title LIKE '%Dream%' GROUP BY itunes_url; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Name all the categories for podcast titled 'I Heart... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: List all the podcast title and its itunes url under... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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!'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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-%'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Which category does the podcast titled 'SciFi Tech ... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | SELECT podcast_id, itunes_url FROM podcasts WHERE podcast_id = ( SELECT podcast_id FROM reviews WHERE title = 'Long time listener, calling it quits' ); |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: List all the names of podcasts under the 'true crim... | SELECT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'true-crime'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | SELECT content FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'StormCast: The Official Warhammer Age of Sigmar Podcast' ); |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
... | 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'; |
[INST] Here is a database schema:
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Of the arts-books and arts-design categories, which one has more podcasts and what is the numerical difference between them? [/INST] [/INST] | SELECT ( SELECT category FROM categories WHERE category = 'arts-books' OR category = 'arts-design' GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 ) "has more podcasts" , ( SELECT SUM(CASE WHEN category = 'arts-books' THEN 1 ELSE 0 END) - SUM(CASE WHEN category = 'arts-design' THEN 1 ELSE 0 END) FROM categori... |
[INST] Here is a database schema:
runs :
run_at [ TEXT ]
max_rowid [ INTEGER ]
reviews_added [ INTEGER ]
Please write me a SQL statement that answers the following question: How many total reviews runned at in June 2022 were added to the podcasts? [/INST] [/INST] | SELECT SUM(reviews_added) FROM runs WHERE run_at LIKE '2022-06-%'; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the following question: How many podcast reviews with a rating of 3 were created during the first quarter of 2015? [/INS... | 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'; |
[INST] Here is a database schema:
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Calculate the percentage of podcasts in the fiction-science-fiction category. [/INST] [/INST] | SELECT CAST(SUM(CASE WHEN category = 'fiction-science-fiction' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(podcast_id) OR '%' "percentage" FROM categories; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the following question: What is the average rating of all the podcasts with reviews created in 2019? [/INST] [/INST] | SELECT AVG(rating) FROM reviews WHERE created_at BETWEEN '2019-01-01T00:00:00-07:00' AND '2019-12-31T23:59:59-07:00'; |
[INST] Here is a database schema:
runs :
run_at [ TEXT ]
max_rowid [ INTEGER ]
reviews_added [ INTEGER ]
Please write me a SQL statement that answers the following question: What is the percentage of reviews added each year of the total reviews added? [/INST] [/INST] | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Indicates the title of all podcasts in the fiction ... | SELECT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'fiction'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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'; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: To which categories do the podcasts of the re... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | SELECT slug, itunes_url FROM podcasts WHERE podcast_id IN ( SELECT podcast_id FROM reviews WHERE content = 'Can''t stop listening' ); |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | SELECT created_at FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'Don''t Lie To Your Life Coach' ); |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: In how many categories were podcast reviews c... | 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'; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Calculate the average rating of the true crim... | 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'; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: List the titles of the art category. [/INST] ... | SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts'; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: What is the average rating of all the podcast... | SELECT AVG(T2.rating) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts'; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Provide the names of podcasts in the art cate... | 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-%'; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Write the names of the podcasts in the music ... | 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; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Which titles have the content "love" but the ... | 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%'); |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: What is the category and itune url of the title "Sc... | 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'; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: What is the average rating of podcasts in com... | SELECT AVG(T2.rating) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'comedy'; |
[INST] Here is a database schema:
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: What is the least common category? [/INST] [/INST] | SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) ASC LIMIT 1; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the following question: What is the longest review? [/INST] [/INST] | SELECT title FROM reviews ORDER BY LENGTH(content) DESC LIMIT 1; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | SELECT title FROM podcasts WHERE podcast_id = ( SELECT podcast_id FROM reviews WHERE title = 'Hosts bring the show down' ); |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Which "music" podcast has the longest title? [/INST... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: List all the cagetories for all the podcasts with "... | SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title LIKE '%jessica%' ); |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: 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' ); |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: List all of the two-star reviews and their ca... | SELECT T1.category FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.rating = 2; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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!'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
... | 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%'; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Which category has the most reviews? [/INST] ... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: List the urls for all the "fiction-science-fiction"... | SELECT itunes_url FROM podcasts WHERE podcast_id IN ( SELECT podcast_id FROM categories WHERE category = 'fiction-science-fiction' ); |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: What percentage of podcasts are "technology" podcas... | 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; |
[INST] Here is a database schema:
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the following question: What is the content of the review under the title "really interesting!" and is created on 2018-0... | SELECT content FROM reviews WHERE title = 'really interesting!' AND created_at = '2018-04-24T12:05:16-07:00'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Which category is the podcast "Scaling Global" unde... | SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title = 'Scaling Global' ); |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
categories :
podcast_id [ TEXT ]
category [ TEXT ]
Please write me a SQL statement that answers the following question: Please list the titles of all the podcasts under th... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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-%'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | SELECT T2.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.author_id = 'F7E5A318989779D'; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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; |
[INST] Here is a database schema:
podcasts :
podcast_id [ TEXT ] primary_key
itunes_id [ INTEGER ]
slug [ TEXT ]
itunes_url [ TEXT ]
title [ TEXT ]
reviews :
podcast_id [ TEXT ]
title [ TEXT ]
content [ TEXT ]
rating [ INTEGER ]
author_id [ TEXT ]
created_at [ TEXT ]
Please write me a SQL statement that answers the fo... | 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'; |
[INST] Here is a database schema:
university_year :
university_id [ INTEGER ] university_year.university_id = university.id
year [ INTEGER ]
num_students [ INTEGER ]
student_staff_ratio [ REAL ]
pct_international_students [ INTEGER ]
pct_female_students [ INTEGER ]
Please write me a SQL statement that answers the foll... | SELECT COUNT(*) FROM university_year WHERE num_students > 80000 AND year = 2011; |
[INST] Here is a database schema:
ranking_criteria :
id [ INTEGER ] primary_key
ranking_system_id [ INTEGER ] ranking_criteria.ranking_system_id = ranking_system.id
criteria_name [ TEXT ]
Please write me a SQL statement that answers the following question: What is the ranking system ID of the award criteria? [/INST] [... | SELECT ranking_system_id FROM ranking_criteria WHERE criteria_name = 'Award'; |
[INST] Here is a database schema:
university :
id [ INTEGER ] primary_key
country_id [ INTEGER ] university.country_id = country.id
university_name [ TEXT ]
Please write me a SQL statement that answers the following question: How many state universities are there? [/INST] [/INST] | SELECT COUNT(*) FROM university WHERE university_name LIKE '%State%'; |
[INST] Here is a database schema:
university_year :
university_id [ INTEGER ] university_year.university_id = university.id
year [ INTEGER ]
num_students [ INTEGER ]
student_staff_ratio [ REAL ]
pct_international_students [ INTEGER ]
pct_female_students [ INTEGER ]
Please write me a SQL statement that answers the foll... | SELECT MAX(student_staff_ratio) FROM university_year WHERE student_staff_ratio = ( SELECT MAX(student_staff_ratio) FROM university_year ); |
[INST] Here is a database schema:
ranking_criteria :
id [ INTEGER ] primary_key
ranking_system_id [ INTEGER ] ranking_criteria.ranking_system_id = ranking_system.id
criteria_name [ TEXT ]
Please write me a SQL statement that answers the following question: How many criteria belong to ranking system ID 3? [/INST] [/INS... | SELECT COUNT(id) FROM ranking_criteria WHERE ranking_system_id = 3; |
[INST] Here is a database schema:
university_year :
university_id [ INTEGER ] university_year.university_id = university.id
year [ INTEGER ]
num_students [ INTEGER ]
student_staff_ratio [ REAL ]
pct_international_students [ INTEGER ]
pct_female_students [ INTEGER ]
Please write me a SQL statement that answers the foll... | SELECT university_id FROM university_year WHERE pct_international_students = 1 AND year BETWEEN 2011 AND 2015; |
[INST] Here is a database schema:
country :
id [ INTEGER ] primary_key
country_name [ TEXT ]
university :
id [ INTEGER ] primary_key
country_id [ INTEGER ] university.country_id = country.id
university_name [ TEXT ]
Please write me a SQL statement that answers the following question: Give the name of the country that ... | 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; |
[INST] Here is a database schema:
university :
id [ INTEGER ] primary_key
country_id [ INTEGER ] university.country_id = country.id
university_name [ TEXT ]
university_year :
university_id [ INTEGER ] university_year.university_id = university.id
year [ INTEGER ]
num_students [ INTEGER ]
student_staff_ratio [ REAL ]
pc... | 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; |
[INST] Here is a database schema:
ranking_criteria :
id [ INTEGER ] primary_key
ranking_system_id [ INTEGER ] ranking_criteria.ranking_system_id = ranking_system.id
criteria_name [ TEXT ]
university :
id [ INTEGER ] primary_key
country_id [ INTEGER ] university.country_id = country.id
university_name [ TEXT ]
universit... | 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; |
[INST] Here is a database schema:
university :
id [ INTEGER ] primary_key
country_id [ INTEGER ] university.country_id = country.id
university_name [ TEXT ]
university_year :
university_id [ INTEGER ] university_year.university_id = university.id
year [ INTEGER ]
num_students [ INTEGER ]
student_staff_ratio [ REAL ]
pc... | 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; |
[INST] Here is a database schema:
country :
id [ INTEGER ] primary_key
country_name [ TEXT ]
university :
id [ INTEGER ] primary_key
country_id [ INTEGER ] university.country_id = country.id
university_name [ TEXT ]
Please write me a SQL statement that answers the following question: How many universities are there in... | 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'; |
[INST] Here is a database schema:
country :
id [ INTEGER ] primary_key
country_name [ TEXT ]
ranking_criteria :
id [ INTEGER ] primary_key
ranking_system_id [ INTEGER ] ranking_criteria.ranking_system_id = ranking_system.id
criteria_name [ TEXT ]
university :
id [ INTEGER ] primary_key
country_id [ INTEGER ] 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_... |
[INST] Here is a database schema:
ranking_criteria :
id [ INTEGER ] primary_key
ranking_system_id [ INTEGER ] ranking_criteria.ranking_system_id = ranking_system.id
criteria_name [ TEXT ]
university_ranking_year :
university_id [ INTEGER ] university_ranking_year.university_id = university.id
ranking_criteria_id [ INTE... | 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; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.