For this technical exercise, we used the Sakila database, a model that simulates a movie rental store. The database contains various tables such as 'film', 'actor', 'customer', 'rental', and 'category', among others. They contain information such as ids, titles, categories, length, useful dates, etc. While the data is not real, it serves as an example to practice queries and data analysis within the context of a movie rental store.
Throughout this project, we focused on mastering several key SQL techniques for querying and manipulating data in a relational database. The main areas we worked on include:
Basic Queries & Grouping and Filtering Functions: We started by working with the most basic queries and we will interact with the database by applying filters and group data for more detailed analysis, such as getting the number of rentals per customer or movies from a specific category.
Using JOINs and Unions: We tackled the use of JOINs to combine information from different tables. This enabled us to perform more complex queries by relating multiple tables.
Subqueries and CTEs: Subqueries allowed us to perform queries within other queries, helping to retrieve more specific and complex information. Also, we learned how to implement CTEs (Common Table Expressions), a tool that helps structure and organize more complex queries, improving their readability.
These exercises have helped me improve my SQL skills and have allowed me to deeper understanding of how to perform data analysis on a relational database. Each of these areas presented increasing levels of difficulty, but together they have allowed me to master essential techniques for working with databases.