Рет қаралды 7,325
Top N is the most frequently presented SQL question in interviews. In this video, I hope to help you understand how to answer questions like, “What are the Top 5 highest-rated movies?” and “What are the Top 3 highest paid employees per department?” I’ll demonstrate the problem using an example, and fill you in on how to modify the query when there are ties in the ranks.
🟢Get all my free data science interview resources
www.emmading.com/get-all-my-f...
🟡 Product Case Interview Cheatsheet www.emmading.com/product-case...
🟠 Statistics Interview Cheatsheet www.emmading.com/statistics-i...
🟣 Behavioral Interview Cheatsheet www.emmading.com/behavioral-i...
🔵 Data Science Resume Checklist www.emmading.com/data-science...
✅ We work with Experienced Data Scientists to help them land their next dream jobs. Apply now: www.emmading.com/coaching
// Comment
Got any questions? Something to add?
Write a comment below to chat.
// Let's connect on LinkedIn:
/ emmading001
====================
Contents of this video:
====================
00:00 Introduction
01:22 Get My Notion Pages!
01:44 Top N Problem
02:15 Sample Questions
02:33 Top N Records
03:02 LIMIT and OFFSET
03:47 Window Functions
05:30 Top N Per Category
07:40 Top N Per Category With Ties
08:50 Topic for Next Video