Blog Posts

Blog Post

Last Week Reading (2020-07-12)

Press Azure resource providers operations List of all of the available ADF-specific RBAC permissions. Simplifying declarative deployments in Azure The power of What-If within ARM Template deployments. Collecting custom...

2020-07-12

71 reads

Blog Post

Measuring Well Being

I need to write something more on this, but it struck me that this is something I wish previous employers had done, anonymously, and reported results back to others....

2020-07-10 (first published: )

410 reads

Blog Post

BBQ Time in Texas

My first go at smokin’ a brisket is documented below. It is summertime and we are stuck at home in isolation, might as well find a new hobby. I...

2020-07-09

15 reads

Blogs

November 2026 Car Update: MPG Comparisons

By

I’ve become an EV guy. I was talking with a friend who was selling...

T-SQL Snapshot Backups on Availability Group Secondary Replicas Continued

By

In a previous post I talked about how we can use T-SQL Snapshot Backups...

Memories of PASS Data Community Summit 2026

By

A bit of a photo dump, but a few fun memories for me from...

Read the latest Blogs

Forums

How to connect your SQL Server 2025 semantic search for free

By Daniel Calbimonte

Comments posted to this topic are about the item How to connect your SQL...

Finding the Black Friday Sales Ranking

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Finding the Black Friday Sales...

I wonder about this interesting event - Windows keys

By skeleton567

Earlier this week I had an issue with a Win 8.1 laptop I was...

Visit the forum

Question of the Day

Finding the Black Friday Sales Ranking

We are tracking sales for Black Friday today. We have these aggregate values:

CREATE TABLE dbo.BlackFridaySales
(
    Product NVARCHAR(50) NOT NULL PRIMARY KEY,
    Units   INT          NOT NULL
);

INSERT INTO dbo.BlackFridaySales (Product, Units)
VALUES (N'55" TV',          900),
       (N'Air Fryer',       500),
       (N'Noise-Cancel Headphones', 500),
       (N'Robot Vacuum',    300);
I'm trying to get a ranking of the sales that would return 1, 2, 2, 3 for the product levels. Which query does this?

See possible answers