2023-11-27
4,923 reads
2023-11-27
4,923 reads
Learn about working with time series data using T-SQL code and how to add additional data to the data set for more in-depth data mining.
2023-11-27
This is a short look at a technique that I discovered recently in Management Studio (SSMS). The technique is to compare two graphical execution plans in the tool to understand what they are doing and how two different queries might affect a particular system, both with the image and with the properties' data behind the […]
2023-11-24 (first published: 2021-03-30)
8,815 reads
November approaches again. For Europeans, that is a month like any other, for Americans, November means: Black Friday, with huge discounts!
2023-11-24
Learn how to unpivot data or sets of data with SQL Server queries using CROSS APPLY.
2023-11-24
Introduction In the previous article, we learned how to install a SQL Server instance with basic parameters like InstanceName, Features, SourcePath, SQLSysAdminAccounts, etc using Powershell DSC. In this article, we'll discover how to enhance our SQL Server installation with additional configurations. We'll cover things like setting up service account credentials, custom installation directories, configuring TempDB […]
2023-11-22
3,741 reads
Coding for the new NoSQL JSON database service that supports SQL queries.
2023-11-22
When people start learning a new field, for example T-SQL, it’s tempting to spend very little time trying to understand the fundamentals of the field so that you can quickly get to the advanced parts.
2023-11-22
2023-11-20 (first published: 2023-10-02)
2,703 reads
Welcome to the fascinating world of SQL window functions! Today, we'll explore in detail: RANK() and DENSE_RANK().
2023-11-20 (first published: 2023-11-15)
7,751 reads
I’m hosting a free webinar at MSSQLTips.com at the 19th of December 2024, 6PM...
By Steve Jones
I looked at row_number() in a previous post. Now I want to build on...
Recently I received a cry for help over Teams. The issue was that an...
Given the following table and query, this will return any records(based on message_id) that...
How to merge two tables with unlike fields. I have two table with one...
Hello, First of all, I find it odd/annoying that I can't exclude a Project...
I have this data in a SQL Server 2022 table:
player yearid team HR Alex Rodriguez 2012 NYY 18 Alex Rodriguez 2013 NYY 7 Alex Rodriguez 2014 NYY NULL Alex Rodriguez 2015 NYY 12 Alex Rodriguez 2016 NYY 9If I run this code, what are the results returned in the hrgrowth column?
SELECT player , yearid , hr , hr - LAG (hr, 1, 0) IGNORE NULLS OVER (ORDER BY yearid) AS hrgrowth FROM dbo.playerstats;See possible answers