Extra challenges (optional)
Overview
Teaching: 0 min
Exercises: 35 minQuestions
Are there extra challenges to practice translating plain English queries to SQL queries?
Objectives
Extra challenges to practice creating SQL queries.
Extra challenges (optional)
SQL queries help us ask specific questions which we want to answer about our data. The real skill with SQL is to know how to translate our questions into a sensible SQL queries (and subsequently visualise and interpret our results).
Have a look at the following questions; these questions are written in plain English. Can you translate them to SQL queries and give a suitable answer?
Also, if you would like to learn more SQL concepts and try additional challenges, see the Software Carpentry Databases and SQL lesson.
Challenge 1
How many series are there for each
genre
?Solution 1
Challenge 2
How many shows ran for only one season? How many ran for 2 seasons? How many 3? etc?
Solution 2
Challenge 3
How many movies or shows are there from each
country
? Can you make an alias for the number of movies? Can you order the results by number of movies?Solution 3
Challenge 4
How many titles are there for each
age_certification
type, and what is the average imdb_score for thatage_certification
type?Solution 4
Key Points
It takes time and practice to learn how to translate plain English queries into SQL queries.