New blogger: Jamie Wick
New SQL blogger
Jamie at the 45th Parallel (South) – New Zealand
This post is just a quick shout-out. My friend and co-leader...
2018-06-15
339 reads
New SQL blogger
Jamie at the 45th Parallel (South) – New Zealand
This post is just a quick shout-out. My friend and co-leader...
2018-06-15
339 reads
Killing Time – or removing the time element from a datetime
Over the course of time, we all collect scripts and routines...
2018-06-07
2,067 reads
One of the things that you will no doubt end up experiencing as a DBA is that you will see...
2018-05-16
1,867 reads
SSMS (and other SQL Server utilities) utilize a batch separator to, well, separate batches of T-SQL statements. Before we go...
2018-04-18
2,080 reads
Database Code Smells
I was recently reviewing a newly created T-SQL stored procedure. This procedure was verifying temporary table existence with...
2018-04-11
2,210 reads
This post talks about having primary replica jobs. That is, jobs that will only run on the primary replica of...
2018-04-02
975 reads
There are several different options available for working with tabs and spaces in SSMS. In fact, there are enough that...
2018-03-29 (first published: 2018-03-21)
2,946 reads
Do you ever find yourself working on a query and realize that you need just a bit more real estate...
2018-02-28
570 reads
As you already know, SQL Server runs as a service. And services require a service account to run under. While...
2018-03-02 (first published: 2018-02-19)
17,266 reads
Back to the SQL Server Basics with Wayne
Connecting to a SQL Server instance is one of the first things that...
2018-02-19 (first published: 2018-02-07)
2,885 reads
By Steve Jones
I type fairly well. Well, I type fast, but I do wear out a...
By ReviewMyDB
Index maintenance has always meant nightly jobs and a window you have to defend....
I’m sure you’ve all heard the tale of Goldilocks and the Three Bears, but...
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Comments posted to this topic are about the item How We Handled a Vendor...
Comments posted to this topic are about the item Cognitive Coverage
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 NULLAll 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