T-SQL Tuesday #86: Enhancement Requests
On the second Tuesday of each month, the SQL Server universe all comes together to blog about a topic. Known...
2017-01-10
404 reads
On the second Tuesday of each month, the SQL Server universe all comes together to blog about a topic. Known...
2017-01-10
404 reads
How SQL Server uses Windows Virtual Accounts and local groups
Managed Service Accounts (MSAs) and Virtual Accounts were introduced in Windows...
2016-12-28
2,450 reads
Way back in 2006, Paul Randal documented DBCC PAGE on his Microsoft blog at http://blogs.msdn.com/b/sqlserverstorageengine/archive/2006/06/10/625659.aspx. In his post, you will...
2016-12-21
434 reads
It’s that time of the month… the time when all of the T-SQL bloggers have a party and blog about...
2016-12-13
395 reads
Most of the DBCC commands return their results as textual output, even if you have SSMS configured to return result...
2016-11-16
456 reads
You know, these 1 hour sessions that are at most SQL Saturdays are just too short sometimes – you just get...
2015-07-20
760 reads
A while back, I wrote a blog post showing the differences (including performance) between Inline Table-Valued Functions (ITVF) and Multi-Statement...
2015-07-16
1,077 reads
You know, these 1 hour sessions that are at most SQL Saturdays are just too short sometimes – you just get...
2015-05-11
571 reads
Earlier this month, I hosted the 61st occurrence of the monthly TSQL-Tuesday blogging party. With a topic of “Giving Back”,...
2014-12-31
1,383 reads
A little over 5 years ago, Adam Machanic (B|T) had this great idea of getting everyone in the SQL Community...
2014-12-09
706 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