#windowfunctions

Prague PostgreSQL Dev Dayp2d2
2026-01-20

Still using aggregates where window functions shine? 📈 Jan Suchánek explains analytical functions in PostgreSQL and shows how rewriting queries can drastically reduce response times. Practical examples and real performance gains.

▶️ Watch now! youtube.com/watch?v=cXIRGGD_TZ

PrecisionSQLPrecisionSQL
2026-01-12

LAG - LEAD Default Value Trap?!

LAG and LEAD have DEFAULT values! When there's no previous/next row, they return the default. This hidden parameter will surprise you!

youtube.com/watch?v=zGKaBIgNThU

PrecisionSQLPrecisionSQL
2026-01-10

Window PARTITION BY Changes Results?!

PARTITION BY creates separate windows! Each partition has its own running sum. This partitioning will change your aggregation results!

youtube.com/watch?v=OdUmjf_ZbSU

PrecisionSQLPrecisionSQL
2026-01-06

NTH_VALUE Gets Specific Position?!

NTH_VALUE extracts the Nth value from window! It's like array indexing for window functions. This positional access will surprise you!

youtube.com/watch?v=6wNXQoiEg8Y

PrecisionSQLPrecisionSQL
2025-12-28

Window ROWS vs RANGE Frame Difference?!

ROWS and RANGE frames are COMPLETELY different! ROWS counts physical rows, RANGE groups by value. Same query, DIFFERENT results. This will confuse you!

youtube.com/watch?v=Gu3PDsCRO_w

PrecisionSQLPrecisionSQL
2025-12-19

Window Function SUM() With NULL Partition?!

Window functions with NULL partitions create chaos! SUM OVER (PARTITION BY NULL) behaves unexpectedly. This breaks analytics! Watch!

youtube.com/watch?v=66BfdH3qLsg

2025-07-20

PostgreSQL CTEs và Window Functions: Kỹ thuật truy vấn nâng cao. Tìm hiểu cách sử dụng CTEs (Common Table Expressions) và Window Functions trong PostgreSQL để viết các truy vấn phức tạp và hiệu quả hơn.

#PostgreSQL #Database #SQL #CTEs #WindowFunctions #LậpTrình #CơSởDữLiệu

reddit.com/r/programming/comme

2025-04-19

Finding the First Match of Names in a Large Database
Optimize DB2 LUW queries for speed! Find the first match of a name in a large table using ROW_NUMBER() window function. Avoid fetching all matches.
tech-champion.com/programming/
...

2025-04-19

Retrieve Account Balance: SQL Methods for Finding Latest Account Values
Retrieve Account Balance efficiently from your SQL database! Learn multiple methods: subqueries, window functions, and CTEs. Optimize for readability & performance.
tech-champion.com/database/sql
...

2025-04-19

Optimizing SQL Queries: Efficiently Finding the Previous Sale Date
Optimize SQL queries for Previous Sale Date using window functions like LAG(). Improve database performance & write efficient SQL queries.
tech-champion.com/database/sql
...

2025-03-29

Finding the First Match of Names in a Large Database
Optimize DB2 LUW queries for speed! Find the first match of a name in a large table using ROW_NUMBER() window function. Avoid fetching all matches.
tech-champion.com/programming/
...

2025-03-29

Retrieve Account Balance: SQL Methods for Finding Latest Account Values
Retrieve Account Balance efficiently from your SQL database! Learn multiple methods: subqueries, window functions, and CTEs. Optimize for readability & performance.
tech-champion.com/database/sql
...

2025-03-29

Optimizing SQL Queries: Efficiently Finding the Previous Sale Date
Optimize SQL queries for Previous Sale Date using window functions like LAG(). Improve database performance & write efficient SQL queries.
tech-champion.com/database/sql
...

2025-03-29

Optimizing SQL Queries: Efficiently Finding the Previous Sale Date
Optimize SQL queries for Previous Sale Date using window functions like LAG(). Improve database performance & write efficient SQL queries.
tech-champion.com/database/sql
...

2025-03-29

Optimizing SQL Queries: Efficiently Finding the Previous Sale Date
Optimize SQL queries for Previous Sale Date using window functions like LAG(). Improve database performance & write efficient SQL queries.

Learn to optimize SQL queries for finding the previous sale date efficiently. Improve performance using window functions and avoid nested queries. SQL Previous Sale Date.
Learn more about: SQL, Previo...

2025-03-29

Optimizing SQL Queries: Efficiently Finding the Previous Sale Date
Optimize SQL queries for Previous Sale Date using window functions like LAG(). Improve database performance & write efficient SQL queries.
tech-champion.com/database/sql
...

2025-02-24

Data Cancellation Chain Analysis: Finding Original First and Last IDs
Master Data Cancellation Chain Analysis with SQL! Learn to efficiently track cancellations using recursive CTEs & window functions. Analyze complex data relationships & gain valuable insights.
tech-champion.com/database/dat
Learn how to analyze a data cancellation chain t...

2025-02-20

Calculating Running Balance in SQL: Efficient Queries and Solutions
Master SQL Running Balance calculations efficiently using window functions! Learn to avoid errors & improve data analysis. Examples cover basic calculations, initial stock, negative quantities & time-series analysis.
tech-champion.com/database/db2

2025-02-20

Db2 SQL Window Function Errors in CTEs: Troubleshooting and Solutions
Db2 SQL Window Function errors in CTEs? Learn how to troubleshoot common issues with column referencing, correlation between CTEs & subqueries, and avoid "SQL0206N" errors. Master proper use of aliases & joins for accurate results!
tech-champion.com/database/db2

2025-02-20

DB2 SQL Select Query: Retrieving the Most Recent Transaction for Each Account and Type
Learn efficient DB2 SQL Select Query techniques using window functions like ROW_NUMBER() for optimal performance. Master large dataset handling & avoid inefficient self-joins!
tech-champion.com/database/db2

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst