AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Success stories
Activities
Reviews
Subscriptions
Light theme
Lectures
Reviews
About us
CS50
Start
Start learning
Start learning
My progress
Courses
Quest map
Lectures
SQL
SQL
Level 29
Window Functions: The Hidden Superpower of SQL
SQL SELF
29 level,
0 lecture
Discover window functions in SQL — a tool that lets you analyze data row by row without losing any details. Learn how to easily calculate ranks, cumulative sums, and segment your data without messy subqueries.
Main Window Functions:
ROW_NUMBER()
,
RANK()
,
DENSE_RANK()
,
NTILE()
SQL SELF
29 level,
1 lecture
In this article, we're gonna dive into four key SQL window functions:
ROW_NUMBER()
,
RANK()
,
DENSE_RANK()
, and
NTILE()
. You'll see how they work, what makes them different, and when to use each one for data analysis.
Syntax of
OVER()
and Its Key Features
SQL SELF
29 level,
2 lecture
Learn how the
OVER()
operator works in SQL: syntax, usage examples with window functions, common mistakes, and practical tips for data analytics.
Using
PARTITION BY
to split data into groups
SQL SELF
29 level,
3 lecture
Learn how to use the SQL
PARTITION BY
clause to group data inside window functions. We'll check out some examples to see how
PARTITION BY
is different from
GROUP BY
, and how you can use it for ranking, calculating aggregates, and analyzing data without losing details.
Calculating Cumulative Sums with Window Functions:
SUM()
,
AVG()
SQL SELF
29 level,
4 lecture
Learn how to easily calculate cumulative sums and moving averages in SQL using window functions for analyzing revenue, expenses, and other time series. Query examples, explanations, and real-world use cases.
Please enable JavaScript to continue using this application.