Ben Kubicek

  • Interests: Jesus, playing guitar singing, most sports, running, biking, triathlons

Blogs

How AgentDBA Identifies Backup Failures

By

Every DBA has a box like this. Sitting untouched for months. Nobody’s proud of...

AI Helps Me with My Sloppiness

By

I type fairly well. Well, I type fast, but I do wear out a...

WITH clause gets a 26ai boost!

By

By way of background, a while back I did video called “My New Favourite...

Read the latest Blogs

Forums

SQL Art, Part 4: Happy 4th of July — A British DBA's Guide to Celebrating a War We Don't Talk About

By Terry Jago

Comments posted to this topic are about the item SQL Art, Part 4: Happy...

ALAMAT BCA KCP Kiaracondong Telp:08218154393

By layanan 24jam BCA

WA:08218154393 Jl. Kiara Condong No.190, Kb. Gedang, Kec. Batununggal, Kota Bandung, Jawa Barat 40274

Alamat kantor BCA KCP Cijerah Telp:(0821)8154398

By Layanan_BCA

WA:0821-8154-398 Istana Regency Sudirman, Jl. Raya Cijerah Raya No.2 Ruko No 19 & 20,...

Visit the forum

Question of the Day

Getting the Average

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       NULL
All 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