Blog Posts

Blog Post

Syncing SQL databases

There are various ways to keep SQL Server databases and SQL Database/SQL Managed Instance (SQL MI) databases in-sync asynchronously that I will discuss in this blog. The main use...

2021-01-05 (first published: )

943 reads

Blog Post

2020 Year in Review

Yeah, so…that was a hell of a year, wasn’t it?
Short-Form Reviews of Year 2020 Reviewer #1: 👎
Reviewer #2: ★✩✩✩✩, would not recommend
Best Laid Plans… The year started out really...

2021-01-04

7 reads

Blog Post

Splitting up the Mission of PASS

Following up on Should There Be A Successor to PASS? I have a couple more thoughts. One of the many complaints about PASS over the years was about perceived value....

2021-01-04 (first published: )

543 reads

Blog Post

Syncing SQL databases

There are various ways to keep SQL Server databases and SQL Database/SQL Managed Instance (SQL MI) databases in-sync asynchronously that I will discuss in this blog. The main use...

2021-01-04

26 reads

Blogs

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...

Automatic Index Compaction

By

Index maintenance has always meant nightly jobs and a window you have to defend....

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 KONTAK BCA KCP Banjarbaru Telp,Cs:08218154393

By layanan 24jam BCA

WA:08218154393 Jl. A. Yani No.KM 33 5, Guntung Payung, Kec. Landasan Ulin, Kota Banjar...

ALAMAT KONTAK BCA KCU SAMARINDA Telp,Cs:08218154393

By CSO BCA

WA:08218154393 Jl. Jend. Sudirman No.30, Ps. Pagi, Kec. Samarinda Kota, Kota Samarinda, Kalimantan Timur...

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