Revisiting SQL Server Window Functions- A Practical Walkthrough
A look at window functions in SQL and how they can be used to query data without the restrictions of a GROUP BY.
2025-09-12
7,295 reads
A look at window functions in SQL and how they can be used to query data without the restrictions of a GROUP BY.
2025-09-12
7,295 reads
2024-10-30
491 reads
2024-10-23
447 reads
Dive deep into the powerful SQL window functions, LAG() and LEAD(). Explore their intricacies, discover real-world examples, and avoid common pitfalls.
2023-12-11
11,561 reads
2022-06-17
559 reads
2021-03-02
702 reads
2021-02-23
650 reads
By Steve Jones
My life has some crazy travel stretches for sure. Between speaking, office visits, customer...
In Part 1, we saw how ‘Vamana’ represents vectors as nodes, connects them with...
I’m excited to announce the release of a new open-source project that fully automates...
Comments posted to this topic are about the item Optional Parameter Plan Optimization in...
Comments posted to this topic are about the item AI Experience Gap that we...
There is a table tmp_tab:
CREATE TABLE tmp_tab ( id int, val int );
INSERT INTO tmp_tab VALUES (1, 1), (2, NULL), (3, 3), (4, 4), (5, 5);You want to order the rows ids by the following expression:
ISNULL(val, id) + 1Which of the following queries produces the expected ordering and why? (Select all correct) See possible answers