SQL Window Functions: The Key to Succeeding in Data Science Interviews

preview_player
Показать описание
Window functions are a part of SQL that is useful on a daily basis for data scientists. This video will give you an overview of SQL window functions by explaining:
- When are window functions
- Syntax of window function
- How to define a window
- How to select a function

🟢Get all my free data science interview resources

// Comment
Got any questions? Something to add?
Write a comment below to chat.

// Let's connect on LinkedIn:

====================
Contents of this video:
====================
00:00 What is a Window Function
02:28 Syntax of Window Functions
03:23 Define a Window Frame using Over Clause
04:00 PARTITION BY
04:50 ORDER BY
05:23 ROWS/RANGE
08:35 Aggregate Functions
09:11 Ranking Functions
11:16 Analytic Functions
Рекомендации по теме
Комментарии
Автор

This is the best video about window functions that I have seen so far! Wow! Congrats and thanks!

raquelc.
Автор

WAS FANTASTIC! I've got 4+ years of experience in SQL and I needed a quick refresher for window functions and this was exactly what I needed. Thank You!

QuantumImperfections
Автор

stopped in between of the video, the best part about the video is that it explains the difference between group by and window function. This is something not many youtuber do. I was struggling to visualize how it happens. Thanks a lot

krishnamvats
Автор

Thanks Emma for sharing. What you shared helped me comprehend window functions. Most importantly, I applied those window functions to my day to day work, which boosted efficiency. Appreciated :)

danielkoo
Автор

This is the best vedio talking about window fundction on Youtube, thanks Emma! Please keep up the great work!

austinbai
Автор

Your channel is the best on all DS interviews! well organized, clear and short!

xiaomengwu
Автор

This video is so condensed and packed full concise and well explained materials. Thank you for the fantastic content.

alienfunbug
Автор

Super clear and orginised, thank you!!! 👍

LorenzoAnderson-ihke
Автор

This was very helpful. Beautiful content <3

swastikchowdhury
Автор

I have been storing so many CTEs using the WITH statement lol. I think these window functions could make my queries less verbose.

Great content!

FelipeCampelo
Автор

Emma luv u. Your explanations are very elaborative and succinct at the same time.

sw
Автор

Very clear, detailed, and amazing explanation
SUBSCRIBED from more great videos adventure
Thank you

maweryoutube
Автор

Great lecture!!! Exactly what I was looking to solve my problem at work. I am definitely subscribing to your channel.

AVChian
Автор

Hello Emma, your videos are superb and great and very useful! Just one thing, we can use negative value when we use LEAD or LAG, basically lead(date, -1) over (order by date) equivalent of lag(date, 1) over(order by date), which I tested in PostgreSQL and Snowflake, and they both works.

djjiang
Автор

Emma, your content is great. Your English is beautiful and clear. My respect

For subscribers:
I would like to use the comments to find ways to improve my English. If you are starting your journey in data analytics and you are a native speaker of English, we can be useful to each other) For example, weekly calls or something similar
Best regards, Senior Data Analyst from Russia

kirusha_kras
Автор

Hi Emma, what app do you use to record yourself and the screen?

ashleyblanchard
Автор

Shouldn't the SUM() at 9:09 do a cumulative sum since order function is mentioned ?

nishantjain
Автор

Great video! One quick question: At 9:10, I thought SUM(value) OVER(ORDER BY value) will return cumulative sum; but SUM(value) OVER() ORDER BY value will return the SUM shown in the video. or is it a PostgreSQL thing? I'm a little confused now.

stonewatertx
Автор

Sorry for another dumb question: I tried something like "select rank(a) over(order by a) from t" in PostgreSQL. It'll show error telling me to add WITHIN GROUP. But if I write "select rank() over(order by a) from t" then it's fine. Seems like I can't pass anything in the () after rank. Could anyone clarify?

stonewatertx
Автор

Emma: How are you? I am from Brazil. Do you have a video about partitions and frames?

iedmzcp