A Spread of Vacation
I’m off on vacation today. Which is a little weird as I just got back from a week long vacation in May, cruising with my family. Usually my trips...
2026-07-03
57 reads
I’m off on vacation today. Which is a little weird as I just got back from a week long vacation in May, cruising with my family. Usually my trips...
2026-07-03
57 reads
Every DBA has a box like this. Sitting untouched for months. Nobody’s proud of it, nobody’s fixed it, it’s just there — a handful of small compliance gaps that...
2026-07-03 (first published: 2026-07-02)
79 reads
In all recent versions of the database you can call DBMS_UTILITY.EXPAND_SQL_TEXT to get the “true” version of a SQL that the database will run. It takes your SQL as...
2026-07-03 (first published: 2026-07-02)
192 reads
I type fairly well. Well, I type fast, but I do wear out a backspace key relatively quickly on most keyboards. That and a space bar. AI helps me...
2026-07-01
62 reads
By way of background, a while back I did video called “My New Favourite Join” on the LATERAL clause. The reason I like it is that it lets you...
2026-07-13 (first published: 2026-07-01)
656 reads
How Do You Determine How Much Disk Space You Need If You’re Handed 18 SQL Server Backups and No History? Happy last day of June, dear reader. Today’s post...
2026-06-30
56 reads
Index maintenance has always meant nightly jobs and a window you have to defend. Azure SQL’s new Automatic Index Compaction targets page density directly — so I tested it.
2026-07-10 (first published: 2026-06-30)
348 reads
I’m sure you’ve all heard the tale of Goldilocks and the Three Bears, but I’d like to apply the Goldilocks principle to a database object-namely, a materialized view. You...
2026-06-30
275 reads
One of the things I’ve been requesting for a number of years is cost information. I could see this coming in 2015 with the move to the cloud and...
2026-07-13 (first published: 2026-06-29)
234 reads
“Don’t aim to have others like you; aim to have them respect you.” – from Excellent Advice for Living This is an interesting piece of advice. It’s easy to...
2026-06-26
143 reads
By Steve Jones
I’ve become an EV guy. I was talking with a friend who was selling...
In a previous post I talked about how we can use T-SQL Snapshot Backups...
By Steve Jones
A bit of a photo dump, but a few fun memories for me from...
Comments posted to this topic are about the item How to connect your SQL...
Comments posted to this topic are about the item Finding the Black Friday Sales...
Earlier this week I had an issue with a Win 8.1 laptop I was...
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