Fix WHERE clause AND/OR/NOT confusion with truth tables
The ANDs, ORs, and NOTs in a T-SQL query's WHERE clause can get confusing, especially if you're thinking of it...
2018-04-17
2,058 reads
The ANDs, ORs, and NOTs in a T-SQL query's WHERE clause can get confusing, especially if you're thinking of it...
2018-04-17
2,058 reads
Keep a good eye on your backup and maintenance; they’re kind of important to the health and well-being of your job wait I mean...
2018-04-06
383 reads
Code that writes code it one of the best productivity tips I can give you. And no, I’m not talking...
2018-03-30
560 reads
A client recently upgraded a server, and then started receiving this error when they tried to access the SSRS Reports...
2018-03-19
1,129 reads
Update: Now with Object Explorer shortcuts! One of the most common things I do within SSMS is to change connection for...
2018-03-14
521 reads
Edit: Now with discount code! We’ll be speaking at SQL Saturday Colorado Springs on Saturday March 24. The day before that, we...
2018-03-13
349 reads
Here’s a good starter article on SQL Server logins, users, and SIDs: SQL Server Logins, Users and Security Identifiers (SIDs) Some...
2018-03-07
483 reads
You need something from the database admin. Maybe it’s permissions, maybe it’s code troubleshooting, or maybe it’s just that the database is...
2018-02-27
518 reads
My son, who wishes to be known as “Pigeon” for the duration of this blog, was mixing the names of Hogwarts...
2018-02-17
1,121 reads
While we’re on the topic of SQL Server Reporting Services: WHYYYYYY is the Reporting Service Configuration Manager so hard to...
2018-02-07
453 reads
By Steve Jones
A bit of a photo dump, but a few fun memories for me from...
By ReviewMyDB
Part 2 of my What's New in SQL Server for the Developer series. STRING_SPLIT,...
Note: This is more of a note to myself than an attempt to preach...
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