SQL Window Function | How to write SQL Query using RANK, DENSE RANK, LEAD/LAG | SQL Queries Tutorial

techTFQ
techTFQ
978.8 هزار بار بازدید - 3 سال پیش - This video is about Window
This video is about Window Functions in SQL which is also referred to as Analytic Function in some of the RDBMS. SQL Window Functions covered in this video are RANK, DENSE RANK, ROW NUMBER, LEAD, LAG. Also, we see how to use SQL Aggregate functions like MIN, MAX, SUM, COUNT, AVG as window function.

This video is focused on teaching how to write SQL Queries using different window functions or analytic functions. We go through the syntax of using rank, dense_rank, row_number, lead, lag and max functions as window function.

Over clause is explained in detail in this video. Over clause is used in SQL when we need to use window function. Inside Over clause, we also use Partition By clause and also Order by clause.
Partition By clause is used to specify the column based on which different windows needs to be created.

The window function you learn in this video is applicable to any RDBMS since these functions are commonly used across most of the popular RDBMS such as Oracle, MySQL, PostgreSQL, Microsoft SQL Server etc.

Download all scripts and Queries used in this video from below link:
https://techtfq.com/blog/sql-window-f...
Click on the "Download SQL Script" button to download scripts.

Timestamp:
00:00 Intro

01:33 Understanding Aggregate function
03:16 Syntax to write SQL Query using Window Function
06:33 ROW_NUMBER() Window Function in SQL
11:57 RANK() Window Function in SQL
15:43 DENSE_RANK() Window Function in SQL
17:10 Difference between RANK, DENSE RANK and ROW NUMBER in SQL
17:59 LEAD() and LAG() Window Function in SQL

I hope this video was helpful and gives you a good understanding of how to write SQL Queries using window functions or analytic functions. If you liked what you saw, then please make sure to like, subscribe and comment any feedback you may have.
Also please do not hesitate to share the video with your friends and colleagues who may be interested in learning SQL

🔴 WATCH MORE VIDEOS HERE 👇

✅ SQL Tutorial - Basic concepts:
SQL Tutorial - Basic concepts

✅ SQL Tutorial - Intermediate concepts:
SQL Tutorial - Intermediate concepts

✅ SQL Tutorial - Advance concepts:
SQL Tutorial - Advance concepts

✅ Practice Solving Basic SQL Queries:
Practice Solving BASIC SQL Queries

✅ Practice Solving Intermediate SQL Queries:
Practice Solving INTERMEDIATE SQL Que...

✅ Practice Solving Complex SQL Queries:
Practice Solving COMPLEX SQL Queries

✅ Data Analytics Career guidance:
Data Analytics career and more

✅ SQL Course, SQL Training Platform Recommendations:
SQL Course / Training

✅ Python Tutorial:
Python Tutorial

✅ Git and GitHub Tutorial:
Git and GitHub

✅ Data Analytics Projects:
Data Analytics Projects

THANK YOU,
Thoufiq
3 سال پیش در تاریخ 1400/02/31 منتشر شده است.
978,885 بـار بازدید شده
... بیشتر