OPENJSON and CROSS APPLY
OPENJSON is pretty central to manipulating JSON documents in T-SQL. As we’ve seen, we can use a default schema that will return metadata about the JSON document or we...
2020-06-24 (first published: 2020-06-09)
6,886 reads
OPENJSON is pretty central to manipulating JSON documents in T-SQL. As we’ve seen, we can use a default schema that will return metadata about the JSON document or we...
2020-06-24 (first published: 2020-06-09)
6,886 reads
SQL Server 2019 brings a lot of great new features. Many are introduced by the IQP (Intelligent Query Processing) features and greatly improve query performance. Some time ago I...
2020-06-24 (first published: 2020-06-09)
558 reads
Earlier this week Microsoft released the latest cumulative update for SQL Server 2019 and as you can expect there are quite a few items addressed including a fix for...
2020-06-24
31 reads
One of my hobbies is trying to break technology so that you don’t have to. I don’t consider myself a professional or hobbyist hacker, though if the shoe fits…...
2020-06-24
16 reads
Power BI has become hugely popular and I find common questions about functionality and features, so I thought I would put in this blog some of those questions with...
2020-06-23 (first published: 2020-06-08)
619 reads
Taking it back to SQL 101 today because I recently saw something that floored me. I’m a big fan of temp tables. I use ‘em all over the place...
2020-06-23
3 reads
Taking it back to SQL 101 today because I recently saw something that floored me. I’m a big fan of temp tables. I use ’em all over the place...
2020-06-23
37,721 reads
This month’s T-SQL Tuesday invitation is from Ken Fisher and he’s asking about non-SQL tips and tricks. This had me thinking for a bit and then something popped into...
2020-06-23 (first published: 2020-06-09)
352 reads
This blog post will be a series on the Azure Platform and some things we can use it for. Background: I run a consultancy company – and sometimes I...
2020-06-22 (first published: 2020-06-06)
235 reads
We have seen how we can export and save the results to a folder and commit them to a GIT repository on my last blog post Backup your SQL...
2020-06-22 (first published: 2020-06-04)
391 reads
By Steve Jones
I type fairly well. Well, I type fast, but I do wear out a...
By way of background, a while back I did video called “My New Favourite...
By ReviewMyDB
Index maintenance has always meant nightly jobs and a window you have to defend....
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