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
6,783 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
6,783 reads
2024-10-30
450 reads
2024-10-23
404 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
9,164 reads
2022-06-17
530 reads
2021-03-02
690 reads
2021-02-23
632 reads
By Steve Jones
In a previous post, I deployed a model to a database using SQL Compare...
By SQLPals
Reality (And Limits) of Instant File Initialization for Transaction Logs in SQL Server 2022 ...
By Steve Jones
Last week I spent a few days in Cambridge, UK for the Redgate Company...
I have a table with partition on create_timestamp field. Though we're storing all data...
Comments posted to this topic are about the item Adding and Dropping Columns II
Comments posted to this topic are about the item Leveraging DuckDB for OLAP Workloads:...
I have this table in my SQL Server 2022 database:
CREATE TABLE [dbo].[CityList] ( [CityNameID] [int] NOT NULL IDENTITY(1, 1), [CityName] [varchar] (30) , [Country2] [char] (3), [stateprovince2] [char] (2), [Country] [char] (3), [stateprovince] [char] ) ON [PRIMARY] GOI decide to drop the stateprovince2 and country2 columns. What code should I use? See possible answers