Tags / ssms
How to Include Partition Functions in SQL Server Management Studio Scripts
Using SQL LAG Function to Calculate Sums of Consecutive Rows
Conditional Calculations in SQL: Using Case Statements to Create New Fields Based on Results of Another Field
Conditional Aggregation for Distinct Values in SQL: A Practical Guide to Separating Login and Logout Events
Querying JSON Keys with Values as JSON in SQL Server Using OpenJSON Function.