SQL Window Functions- Ranking Functions with Real Examples || SQL Full Course #15

preview_player
Показать описание
#sqltutorial #sqlpractice #sqlinterviewquestionsandanswers #mysql
#mysqlserver #mysqltutorials #mysql_workbench #sqlserver #sqlforbeginners #sqltraining

SQL Window Functions Tutorial: Ranking Employees by Salary Using ROW_NUMBER, RANK, DENSE_RANK, PERCENT_RANK & NTILE(n)

1. Link for Installing MySQL on a Mac:

2. Youtube Link for downloading database and importing it on your local computer:

In this video, I introduce SQL Window Functions and focus on the ranking-based functions, demonstrating their application through a real-world example from my MySQL Workbench database (sql_practice with an employees table).

What’s Covered in This Video:
1. Introduction to Window Functions:
• Overview of three main categories of window functions:
• Aggregate Type (e.g., SUM(), AVG(), COUNT())
• Ranking Type (ROW_NUMBER(), RANK(), DENSE_RANK(), PERCENT_RANK(), NTILE())
• Value Type (LEAD(), LAG(), FIRST_VALUE(), LAST_VALUE(), NTH_VALUE())

Practical Example:
• Data source: employees table from MySQL Workbench (sql_practice database).
• Ranking employees within each department based on salary, assigning rankings accordingly.

Timestamps:
0:00 Intro
0:28 What are window functions in SQL
1:02 Types of window functions
1:28 Syntax for window functions
1:39 Key definitions in window functions
2:24 Example data
3:11 ROW_NUMBER() window function
3:23 ROW_NUMBER() window function example
5:22 RANK() window function
6:18 RANK() window function example
7:03 DENSE_RANK() window function and example
7:43 PERCENT_RANK() window function
7:59 PERCENT_RANK() window function example
8:38 NTILE() window function
9:00 NTILE() window function with example

Why Watch This Video?
• Understand the differences between various SQL ranking window functions.
• Learn practical SQL techniques for data analysis, such as ranking employees by salary.
• Build a strong foundation for advanced SQL analytics using window functions.

Who Is This Video For?
• SQL beginners looking to understand window functions.
• Data analysts and developers seeking practical SQL ranking techniques.
• Anyone preparing for SQL interviews or working with MySQL databases.

SQL Full course
SQL Tutorial
MySQL Practice questions
MySQL interview questions and answers
Sql questions and answers
SQL WINDOW functions
Рекомендации по теме
welcome to shbcf.ru