LAG’n’LEAD – New T-SQL Features in SQL Server Denali CTP3
Are you tired of doing self joins, just to get the value of a column in the previus/subsequent row, or...
2011-08-02
1,730 reads
Are you tired of doing self joins, just to get the value of a column in the previus/subsequent row, or...
2011-08-02
1,730 reads
Last month, I started using Meetup to schedule SQL Server Study Group events. The idea is to meet twice a...
2011-08-02
951 reads
Oh no you, you got the Could not load type ‘Microsoft.AnalysisServices.SharePoint.Integration.ReportGalleryView’ error!!! What to do now? Why did you get...
2011-08-02
1,072 reads
SQL FUNCTION: -
Function in a database can be defined as the code segment consisting of a logical group of SQL...
2011-08-02
2,998 reads
Since it is August 1, 2011 (which is also my birthday), I thought it would be a good time to...
2011-08-01
1,046 reads
Interesting topic this month posted by Thomas LaRock. This month he has chosen “crap code” as the topic. I think...
2011-08-01
794 reads
Interesting topic this month posted by Thomas LaRock. This month he has chosen “crap code” as the topic. I think it is interesting because there really are so many...
2011-08-01
21 reads
Whether it is Transact-SQL for applications you are developing, or just for routine administrative tasks, managing Transact-SQL has never been...
2011-08-01
833 reads
I might send this to a VP or CIO: Global CIO: A Framework For Developing Technical Leaders. It’s an article...
2011-08-01
1,387 reads
I started by journey to Birmingham by leaving work at 1130 and getting to the airport in time to have...
2011-08-01
309 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