New Built-in Function STRING_AGG() – SQL Server 2017
SQL Server 2017 introduces a set of useful functions like STRING_AGG(), STRING_SPLIT(), TRIM()… and many more. In this tip, I am...
2018-02-28
9,376 reads
SQL Server 2017 introduces a set of useful functions like STRING_AGG(), STRING_SPLIT(), TRIM()… and many more. In this tip, I am...
2018-02-28
9,376 reads
Recently, I was working with the team and got stuck up with SQL Server Installation information. We got an urgent...
2018-02-27
17,409 reads
In my recent blog, I discussed about how to move master database to another location. One of the readers requested...
2018-02-26
751 reads
With the release of SQL Server 2017 CU4, you can use the mssql-conf utility to move the master database file...
2018-03-07 (first published: 2018-02-23)
2,090 reads
In my introduction to Extended Events blog, I mentioned that the xEvent is my favorite toy for performance troubleshooting. This blog may...
2018-03-05 (first published: 2018-02-20)
11,086 reads
I continue blogging on extended events. Today, I will discuss about the top level containers (Package) that gives access to...
2018-01-25
504 reads
Since I started actively participating in SQL community, I found it is very common that people will approach to seek...
2017-12-19
2,200 reads
This article is about how to proceed when you forgot the password of your SQL Server “sa” account, Password was entered...
2017-12-11
40,122 reads
“How much time SQL Server is going to take to complete the database Backup or Restore” – This is one of...
2017-12-21 (first published: 2017-12-09)
34,429 reads
Since I started playing with Extended Events, it has been my favorite toy for performance troubleshooting. It was introduced in...
2017-11-29
854 reads
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...
By Steve Jones
One of the things I’ve been requesting for a number of years is cost...
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