Summary
Keywords
Full Transcript
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); ➖➖➖➖➖➖➖➖➖➖➖➖➖ AWS DATA ENGINEER : https://www.youtube.com/playlist?list=PLOlK8ytA0MghpdMjb0m9zu1v9s_qbRP0q Azure data factory : https://youtube.com/playlist?list=PLOlK8ytA0MgguN5XidtQXbILxwCdJCUJE&si=iEICXHP80zGchUYh Azure data engineer playlist : https://youtube.com/playlist?list=PLOlK8ytA0MghBrzu0i6WlTBdoO1WdwV_e SQL PLAYLIST : https://www.youtube.com/playlist?list=PLOlK8ytA0MggGXIKmbfZ-_Xqcos3JKdV- PYSPARK PLAYLIST - https://www.youtube.com/playlist?list=PLOlK8ytA0MgjvOpd-088NRU_vTYw_aryH ➖➖➖➖➖➖➖➖➖➖➖➖➖ 📣Want to connect with me? Check out these links:📣 Join telegram to discuss https://t.me/+Cb98j1_fnZs3OTA1 ➖➖➖➖➖➖➖➖➖➖➖➖➖ 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! ➖➖➖➖➖➖➖➖➖➖➖➖➖
