Kevin3NF

Kevin Hill is a career SQL Server DBA living in Dallas, TX. His specialities include HA/DR, Best Practice configuration, Performance tuning and teaching new and accidental DBAs
  • Interests: Cycling, family, sci-fi, DBA stuff

Blog Post

3rd Party Applications Have Issues

As a SQL DBA, what do you do when a vendor application has performance problems that are code related? Server settings don’t generally seem to be an issue. Queries...

2024-05-20 (first published: )

183 reads

Blog Post

Degrees and Trade Schools

Can we normalize a couple of things? 1 – Trade Schools. Back in the 80’s trade classes in high school and post high school were frowned upon, or looked...

2024-05-08

15 reads

Blog Post

Set-Based vs Row-Based Database Code

In SQL Server, the terms “set-based” and “row-based” refer to different approaches or styles of writing SQL code to manipulate data. These styles have implications for performance, readability, and...

2023-12-18 (first published: )

544 reads

Blog Post

Database Concerns – A Poll!

What are you most concerned about in your database platforms? Please pick from the list below, and expand on your choice in the comments if you like:   Thanks...

2023-11-08 (first published: )

203 reads

Blog Post

IRL #8: SQL Server Down

Problem: My PocketDBA® client called in with a non-responsive SQL Server. Application errors, timeout, alerts firing. SQL Server box is up, and the services are running. Background: This is...

2023-09-06

26 reads

Blog Post

SQL Server is not a Car

Lets compare them anyway, just for fun. Both have an engine Both have a monitoring device (Dashboard/Activity Monitor) Both need power (Gas/Electricity) Both need to be told what do...

2023-09-05

24 reads

Blogs

Extending a SQL Server Failover Cluster Across Regions in  Google Cloud Platform (GCP)

By

I was the principal author of this SIOS whitepaper, which describes how to build...

Heading to 2024 PASS Summit

By

I am able to head back to Seattle for the PASS Summit this year....

Tell me the positives of your solution

By

I still have a tendency to talk about all the cons of a proposed...

Read the latest Blogs

Forums

The Cloud Security Problem

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Cloud Security Problem

Virtualizing AWS data by using Fabric Shortcuts: Data Engineering with Fabric

By John Miner

Comments posted to this topic are about the item Virtualizing AWS data by using...

Timescale Brings PostgreSQL into the GenAI Era with pgai Vectorizer

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Timescale Brings PostgreSQL into the...

Visit the forum

Question of the Day

The LAGging NULL

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  9
If 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