Загрузка...

Build a Priority-Based Hierarchy in SQL. Common Interview Question - Full breakdown.

🎯 Selecting entries based on hierarchy or priority of rules is one of the most common tasks asked in the interview and the one you will likely face during your day-to-day job as a Data Engineer, Data Analyst, or Software Engineer.

In fact, I got the idea to record this video while solving a problem at work.

In that video, we will walk through two practical examples of how to apply the hierarchy and priority of rules to a set of rows and get:
- Top 3 reviews per product
- the best email object

Also, I briefly touch SQL window functions, because they are the main tool that will help us solve these problems, specifically ROW_NUMBER().

Whether you’re preparing for interviews or just sharpening your day-to-day SQL, this is one of those patterns you’ll want to have in your toolbox.

TIMESTAMPS
0:00 Intro
0:36 Problem 1: Select the top 3 relevant reviews per product
8:07 Problem 2: Deduplication of emails
21:27 Conclusion

Source code from the video: https://github.com/eukosh/jad-examples/tree/main/2025/sql-selecting-entries-rules-hierarchy

=========
Hi friend, my name is Eugene and I'm just a dev 👨🏼‍💻
I've been in tech for 5 years, working as a Data Engineer 📊
Join me on this journey, and let’s build an honest, open, supportive, authentic dev community of learners and builders.

Видео Build a Priority-Based Hierarchy in SQL. Common Interview Question - Full breakdown. канала Just a Dev
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять