Applying SQL to Real-World Problems
Use SQL on a movie rental database: locate data through system tables, map an ERD, create and change records, and write queries others can read.
Answering a business question with SQL often starts before the first query: you have to work out which tables hold the data, how they connect, and how to leave code a colleague can follow. The practice database belongs to a fictional movie rental company, large enough that locating the right table is a real task. Along the way you also create and change data, so the work goes beyond reading query results.
What You Will Achieve
- Query system tables to list every table and column in an unfamiliar database
- Build an entity relationship diagram and use it to join several tables, for example to find the most rented films
- Build your own tables and views, and update or remove selected records
- Rework a confusing query so a colleague can tell at a glance what it is meant to return
Program Overview
Essential SQL Review
A refresher on frequently used commands, then practice transforming numeric and string values and summarizing results with aggregate functions.
- Review of everyday SQL commands
- Numeric and string transformations
- Aggregate functions on finances and strings
Find and Manage Your Data
Use system tables and a view of all columns to see what the database holds, join the right tables, then store, update and delete data.
- System tables and a reusable column view
- Complex joins and an ERD of the schema
- Tables vs views for storing data
- Updates based on other tables and deleting records
Best Practices for Writing SQL
Ways to make a script’s purpose obvious and its layout easy for others to follow, with exercises that fix unclear queries.
- Conveying intent in a query
- Readable formatting
- Common mistakes to avoid
Certificate Awarded (Paid)
Job Outlook
SQL work of this kind is used wherever teams keep business records in relational databases, such as reporting, analytics and the day-to-day upkeep of tables that other people query.
Good for: Analysts who want SQL practice on one sizable database, covering how to locate data, change it and write queries that colleagues can follow.
Keep in mind: The first chapter is a review of familiar commands, and every exercise uses one fictional movie rental database, so applying the methods to your own schema is up to you.
Bottom line: Useful SQL practice on one sizable database, with system tables, an entity relationship diagram, data changes and a closing chapter on readable code.
Frequently Asked Questions
What database do the exercises use?
All of them run against the database of a fictional movie rental company. Its many tables and the links between them make finding and joining data a genuine part of each task.
How does the course help me find data in an unfamiliar database?
You query system tables to see which tables and columns exist, save that list as a view you can reuse, and then build an entity relationship diagram that shows how the tables connect for complex joins.
Which kinds of data changes do the exercises include?
You store new data in tables you create, compare tables with views, update rental prices, run updates that draw on other tables, and delete either every row in a table or only selected records.
How much of the course is about readable SQL?
The whole final chapter. It looks at making a query's intent clear, laying code out so others can read it, and the common mistakes to avoid, with exercises that ask you to fix and tidy existing queries.


There are no reviews yet.