Querying Databases with SQL
In this chapter, you’ll learn the essential aspects of databases, starting with a broad overview, then diving deep into the fundamental language of SQL, exploring crucial concepts such as subqueries, JOIN
, CASE WHEN
, window functions, aggregations, and how to tackle complex queries.
Our goal is to provide you with the knowledge and tools necessary to tackle any database-related question in a technical interview effectively. This is crucial for those preparing for a technical interview because understanding databases is a foundational skill for data scientists; equipped with the knowledge shared in these chapters, you’ll be ready to face any database question confidently and proficiently.
So, in this chapter, we will cover the following topics:
- Introducing relational databases
- Mastering SQL basics
- Aggregating with
GROUP BY
andHAVING
- Creating fields with
CASE WHEN
- Analyzing subqueries and CTEs
- Merging tables...