Grant Fritchey

Grant Fritchey is a SQL Server MVP with over 20 years’ experience in IT including time spent in support and development. Grant has worked with SQL Server since version 6.0 back in 1995. He has developed in VB, VB.Net, C# and Java. Grant has authored books for Apress and Simple-Talk, and joined Red Gate as a Product Advocate in January 2011. Find Grant on Twitter @GFritchey or on his blog as the Scary DBA.

SQL Server 2022 Query Performance Tuning

Troubleshoot slow-performing queries and make them run faster. Database administrators and SQL developers are constantly under pressure to provide more speed. This new edition has been redesigned and rewritten from scratch based on the last 15 years of learning, knowledge, and experience accumulated by the author. The book Includes expanded information on using extended events, automatic execution plan correction, and other advanced features now available in SQL Server.

You rated this post out of 5. Change rating

2026-06-24 (first published: )

2,357 reads

SQLServerCentral Editorial

Even When You Know What You're Doing, You Can Screw Up

There I was, walking around Amsterdam, radio in hand (OMG! He's talking about radios again!), automatically transmitting Active Packet Report System (APRS) signals every 90 seconds. Same radio I had used in Chicago a couple of weeks ago and in Poland last week. I was on the correct frequency and, as I say, I had […]

(2)

You rated this post out of 5. Change rating

2026-05-23

135 reads

SQLServerCentral Editorial

Don't Panic

And bring a towel. If you don't know what I'm talking about, you have homework. You know with that lead in I'm going to talk about AI. Sorry, can't help it. It's on my mind quite a lot. It's in the news, oh, a whole lot. The majority of those stories can be summed up […]

You rated this post out of 5. Change rating

2026-04-11

99 reads

SQLServerCentral Editorial

You Have Homework

I'm very humbled and honored to be able to type this next sentence. My friend, Buck Woody, sometimes gives me book recommendations. Except, with Buck, you have to understand, it's not really a recommendation. It's an assignment. There'll be a test later. You had best have studied. Failing, well, let's not discuss that, it's too […]

(1)

You rated this post out of 5. Change rating

2026-01-31

78 reads

SQLServerCentral Editorial

Happy Holidays, Let's Do Nerdy Stuff

I'm actually writing this on my day off. I took a bunch of vacation around the holidays because I could, and because I don't take enough the rest of the year. Anyway, I'm just going to share how I've been spending my time (not counting time with the family, which I am certainly doing). I […]

(2)

You rated this post out of 5. Change rating

2025-12-27

83 reads

SQLServerCentral Editorial

Personal Contact Is Vital

I'm writing this while in hiding at the PASS Data Community Summit that's taking place in Seattle this week. I just had a real surprise, finding out that DocumentDB is PostgreSQL under the covers and always has been. However, as much as I enjoy talking PostgreSQL, for the moment, I'll shut up about it. Instead, […]

You rated this post out of 5. Change rating

2025-11-22

74 reads

SQLServerCentral Editorial

I Love Editorials

Why do I love editorials, I can hear you asking. The answer is simple. It's all about opinions. I have opinions. Lots of them. Lots and lots of them. I'm flying home from Hong Kong after visiting a Redgate customer. They are doing amazing work.. It's so cool getting to see how people are solving […]

(1)

You rated this post out of 5. Change rating

2025-10-18

62 reads

SQLServerCentral Editorial

Technological Dinosaurs or Social Dinosaurs?

You're going to have to bear with me on this one because my thoughts aren't fully formed. As I'm sure I've mentioned, I'm a little elderly (and you thought I was going to talk about radios). As such, I've seen the death of a few technologies. I may not have shared this widely, but my […]

(3)

You rated this post out of 5. Change rating

2025-10-11

180 reads

SQLServerCentral Editorial

The Yutes

I recently had the opportunity to talk a little PostgreSQL with the Salt Lake City PostgreSQL Meetup group (thank you for having me by the way). Great bunch of people who were really engaged and asked a lot of questions. On the way out of the event, I was chatting with one person (who had […]

(1)

You rated this post out of 5. Change rating

2025-09-13

208 reads

SQLServerCentral Editorial

Hack Your Brain

Now, let's be really clear up front, I don't mean getting a surgically implanted chip in your head, done on your kitchen table. Brain hacks are generally either, forming habits that are good for learning and concentration, changing how you do things to help enhance your brains function, eating differently in support of brain health, […]

You rated this post out of 5. Change rating

2025-08-02

123 reads

Blogs

How AgentDBA Identifies Backup Failures

By

Every DBA has a box like this. Sitting untouched for months. Nobody’s proud of...

AI Helps Me with My Sloppiness

By

I type fairly well. Well, I type fast, but I do wear out a...

WITH clause gets a 26ai boost!

By

By way of background, a while back I did video called “My New Favourite...

Read the latest Blogs

Forums

SQL Art, Part 4: Happy 4th of July — A British DBA's Guide to Celebrating a War We Don't Talk About

By Terry Jago

Comments posted to this topic are about the item SQL Art, Part 4: Happy...

How We Handled a Vendor Retry That Loaded Twice in Snowflake

By Chandan Shukla

Comments posted to this topic are about the item How We Handled a Vendor...

Cognitive Coverage

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Cognitive Coverage

Visit the forum

Question of the Day

Getting the Average

I have this data in the dbo.Commission table in a SQL Server 2022 database.

salesperson commission
Brian       12
Brian       16
Andy        7
Andy        14
Andy        21
Steve       20
Steve       NULL
All the data is a varchar, and I decide to run this query to get the totals for each salesperson.
SELECT SalesPerson
     , AVG(TRY_PARSE(Commission AS int)) AS TotalCommission
 FROM commission
 GROUP BY SalesPerson
GO
What average commission is calculated for Steve?

See possible answers