What are Statistics in SQL Server?
Statistics are vitally important in allowing SQL Server to find the most efficient way to execute your queries. In this post we learn more about them, what they are...
2023-06-21
313 reads
Statistics are vitally important in allowing SQL Server to find the most efficient way to execute your queries. In this post we learn more about them, what they are...
2023-06-21
313 reads
Always Encrypted was a new encryption feature added to SQL Server with the 2016 version of the product. Initially it was just available in enterprise edition, but from SQL...
2023-06-21 (first published: 2023-06-05)
371 reads
In this short post we look at the ability to be able to have (or not) indexes on columns encrypted using Always Encrypted.
2023-06-20
142 reads
There are countless queries you can find on internet to get list of tables, size of database, tables, indexes etc... Here is a one that I have used for...
2023-06-20
418 reads
This month’s T-SQL Tuesday is hosted by Gethyn Ellis(t). Gethyn’s Invite to us is to write about the best piece of career advice you’ve received. One of the most...
2023-06-20
42 reads
Say, you have a query having performance issues and you decide to look it's graphical execution plan in SSMS (or other tools). If you are lucky, right off the...
2023-06-20 (first published: 2023-06-19)
194 reads
A customer asked about how they could organize their migration scripts in different ways to manage them and worried about it being complex. I decided to test a few...
2023-06-19 (first published: 2023-05-31)
160 reads
Let’s set the scene. You’ve built a wonderful, useful, and descriptive report for your stakeholders with a variety of tooltips that offer deeper insights. They love the tooltips, and...
2023-06-19 (first published: 2023-06-05)
256 reads
Hello Dear Reader! This past week was a busy one. As we've started to settle into the new house we are transitioning from eating out or having meals delivered,...
2023-06-19
47 reads
If you under promise and overdeliver then you will always have happy clients.
2023-06-19
28 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