SQLServerCentral Editorial

Caching

A SQL Server database can easily be seen as a bottleneck as all data must be retrieved from a single machine. However a caching strategy in your application and alleviate load and improve performance.

External Article

SQL Server Indexed Views: The Basics

Views are a valuable tool for the SQL Server Developer, because they hide complexity and allow for a readable style of SQL expression. They aren't there for reasons of performance, and so indexed views are designed to remedy this shortcoming. They're great in certain circumstances but they represent a trade-off, and they come with considerable 'small print'. Jes Borland explains.

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 KCU PONTIANAK Telp,Cs:08218154393

By Layanan.24.jam

WA:08218154393 Jl. Jenderal Ahmad Yani No.1, Benua Melayu Darat, Kec. Pontianak Sel., Kota Pontianak,...

ALAMAT KONTAK BCA KCU BALIKPAPAN Telp,Cs:08218154393

By Layanan.bca

WA:08218154393 Jl. Jenderal Sudirman No.139, Klandasan Ilir, Kec. Balikpapan Kota, Kota Balikpapan, 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