filmov
tv
24. Windows function in SQL | Aggregate windows function
Показать описание
In SQL, window functions perform calculations across a specified range of rows that are related to the current row, without collapsing them into a single row as aggregate functions do. This allows for advanced analytical queries, such as ranking, running totals, moving averages, and more.
Types of Window Functions
Aggregate Functions: SUM(), AVG(), MIN(), MAX(), COUNT()
Ranking Functions: ROW_NUMBER(), RANK(), DENSE_RANK(), NTILE()
Value Functions: LEAD(), LAG(), FIRST_VALUE(), LAST_VALUE()
Want more similar videos- hit like, comment, share and subscribe
❤️Do Like, Share and Comment ❤️
❤️ Like Aim 5000 likes! ❤️
➖➖➖➖➖➖➖➖➖➖➖➖➖
Please like & share the video.
➖➖➖➖➖➖➖➖➖➖➖➖➖
script
CREATE TABLE sales (
sales_id INT,
salesperson VARCHAR(50),
region VARCHAR(50),
amount DECIMAL(10, 2)
);
INSERT INTO sales (sales_id, salesperson, region, amount) VALUES
(1, 'Alice', 'North', 500),
(2, 'Bob', 'South', 300),
(3, 'Alice', 'North', 200),
(4, 'Charlie', 'South', 700),
(5, 'Bob', 'South', 400),
(6, 'Alice', 'North', 800);
➖➖➖➖➖➖➖➖➖➖➖➖➖
Azure data factory :
PYSPARK PLAYLIST -
➖➖➖➖➖➖➖➖➖➖➖➖➖
📣Want to connect with me? Check out these links:📣
➖➖➖➖➖➖➖➖➖➖➖➖➖
what we have covered in this video:
➖➖➖➖➖➖➖➖➖➖➖➖➖
Hope you liked this video and learned something new :)
See you in next video, until then Bye-Bye!
➖➖➖➖➖➖➖➖➖➖➖➖➖
Types of Window Functions
Aggregate Functions: SUM(), AVG(), MIN(), MAX(), COUNT()
Ranking Functions: ROW_NUMBER(), RANK(), DENSE_RANK(), NTILE()
Value Functions: LEAD(), LAG(), FIRST_VALUE(), LAST_VALUE()
Want more similar videos- hit like, comment, share and subscribe
❤️Do Like, Share and Comment ❤️
❤️ Like Aim 5000 likes! ❤️
➖➖➖➖➖➖➖➖➖➖➖➖➖
Please like & share the video.
➖➖➖➖➖➖➖➖➖➖➖➖➖
script
CREATE TABLE sales (
sales_id INT,
salesperson VARCHAR(50),
region VARCHAR(50),
amount DECIMAL(10, 2)
);
INSERT INTO sales (sales_id, salesperson, region, amount) VALUES
(1, 'Alice', 'North', 500),
(2, 'Bob', 'South', 300),
(3, 'Alice', 'North', 200),
(4, 'Charlie', 'South', 700),
(5, 'Bob', 'South', 400),
(6, 'Alice', 'North', 800);
➖➖➖➖➖➖➖➖➖➖➖➖➖
Azure data factory :
PYSPARK PLAYLIST -
➖➖➖➖➖➖➖➖➖➖➖➖➖
📣Want to connect with me? Check out these links:📣
➖➖➖➖➖➖➖➖➖➖➖➖➖
what we have covered in this video:
➖➖➖➖➖➖➖➖➖➖➖➖➖
Hope you liked this video and learned something new :)
See you in next video, until then Bye-Bye!
➖➖➖➖➖➖➖➖➖➖➖➖➖
Комментарии