How to Perform Database Hack-Attach
This blog demonstrates attaching a database on the SQL Server Instance which already has the same name database up and...
2018-04-23
1,818 reads
This blog demonstrates attaching a database on the SQL Server Instance which already has the same name database up and...
2018-04-23
1,818 reads
In the previous blog, we discussed the Foreign Keys Constraints and how the CHECK Constraints are useful to verify the...
2018-04-30 (first published: 2018-04-19)
3,158 reads
DMV (Database Management View) and DMO (Database Management Objects) were added in 2005. There have been huge improvements in each...
2018-04-16
26,087 reads
Recently, while reviewing one of the stored procedure performance, I suggested a couple of changes to a developer to improve...
2018-04-12
19,761 reads
If you are working on SQL Server optimization delicately, you may get often queries that how to find if any...
2018-04-09
966 reads
Yesterday, I was attending a database design meeting. In the meeting, I was asked one of the questions – “How many...
2018-04-12 (first published: 2018-04-05)
12,094 reads
It is relatively easy to spot CPU-bound system. But, the source of CPU pressure is not always easy to pinpoint....
2018-04-02
1,253 reads
It is fun working with SQL/Application developer where you exchange a lot of technical thoughts to find the root of...
2018-03-21
7,322 reads
In my previous post on new functions in SQL Server 2017, I discussed about the STRING_AGG function. Here, I am...
2018-03-02
1,380 reads
For SQL Server 2017 RTM, the fourth cumulative update was released on 20th February, and it is available for download...
2018-03-08 (first published: 2018-03-01)
1,599 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