SQL Server – Various methods to generate unique number sequence
Hi all, Friends, most of the time we used ranking function like ROW_NUMBER() when it required to generate unique number...
2015-09-28
670 reads
Hi all, Friends, most of the time we used ranking function like ROW_NUMBER() when it required to generate unique number...
2015-09-28
670 reads
HI friends, in some working scenario or during interviews we got the task to find the running totals of a...
2015-09-14
617 reads
Hi friends, I was working on a scenario in which I need to assign a unique values to a column....
2015-09-08
626 reads
Hi friends, in our day to day work we used SELECT…INTO clause to create replica of a table for different...
2015-08-03
669 reads
Hi friends, As you all know that SQL Server CTP2 has released with new great features. Here is the list of...
2015-07-26
683 reads
Sys.dm_exec_query_stats is most commonly used DMO used by DBA and developers to find out the information about queries involving query...
2015-07-25
649 reads
In SQL Server 2014 a new feature In-Memory OLTP was introduced which was referred as ‘Hekaton’. This feature was introduced...
2015-07-23
744 reads
Hi friends, today I will get you introduced with another new feature of SQL Server 2016 i.e. Temporal Tables. SQL...
2015-07-23 (first published: 2015-07-20)
3,097 reads
Hi friends, today we will continue with Query Store in SQL Server 2016. In previous blog we learnt about what...
2015-07-17
1,112 reads
Hi friends, in next few blogs we will explore another new feature named Query Store which gets introduced in SQL...
2015-07-16
713 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