How to Edit Read-Only Non-clustered Columnstore Data
As I've discussed in some of my previous posts, creating a non-clustered Columnstore index will make the index as well...
2014-08-06 (first published: 2014-07-29)
8,106 reads
As I've discussed in some of my previous posts, creating a non-clustered Columnstore index will make the index as well...
2014-08-06 (first published: 2014-07-29)
8,106 reads
As I’ve discussed in some of my previous posts, there are quite a few data types that cannot be part...
2014-07-08
756 reads
In a previous post about non-clustered columnstore indexes, I mentioned the creation of an index is a very memory intensive...
2014-06-03
2,148 reads
SQL Server 2012 introduced non-clustered columnstore indexes, and SQL Server 2014 gave us clustered columnstore indexes. Both share the same...
2014-05-20
1,817 reads
First introduced in SQL Server 2012, the Columnstore index is a new in-memory feature that allows for the creation of...
2014-04-29
5,539 reads
When I first started poking around in SQL Server 2012, I noticed an extended event session called “system_health” was created...
2014-04-21 (first published: 2014-04-08)
4,038 reads
Have you ever needed to restore a large database while someone is standing over your shoulder asking “How long is...
2014-03-04
3,221 reads
Where do I begin? First let me say, WOW what an experience!
How it All Began
When I first heard about SQL...
2014-02-11
1,363 reads
In a previous post, Collecting Historical Wait Statistics, I discussed how you can easily collect historical wait stats by using...
2013-12-17
1,443 reads
As a DBA, I'm sure you've heard many times to always check the sys.dm_os_wait_stats DMV to help diagnose performance issues...
2013-12-16 (first published: 2013-12-11)
2,458 reads
By Rayis Imayev
(2025-Feb-12) I will jump straight to the problem statement without a "boring" introduction, which, in...
By Steve Jones
I wrote about getting the Redgate Test Data Manager set up in 10 minutes...
I wrote a stream-of-consciousness post a few months ago about what I do in...
WHERE a.ROWID IN (SELECT rid FROM ( SELECT ROWID rid, row_number() OVER (PARTITION BY...
Hi Does anybody know if it is possible to run a backup from a...
I have this table and data:
CREATE TABLE [dbo].[SalesTracking] ( [SalesDate] [datetime] NULL, [SalesPersonID] [int] NULL, [CustomerID] [int] NOT NULL, [PONumber] [varchar] (80) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [paid] [bit] NULL, [total] int ) ON [PRIMARY] GO CREATE CLUSTERED INDEX [SalesTrackingCDX] ON [dbo].[SalesTracking] ([SalesDate]) ON [PRIMARY] GO INSERT dbo.SalesTracking (SalesDate, SalesPersonID, CustomerID, PONumber, paid, total) VALUES ('2024-03-15 10:45:55.067', 1, 1,'PO965' ,1, 100), ('2023-09-24 10:45:55.067', 1, 2,'PO627' ,1, 200), ('2022-07-02 10:45:55.067', 1, 3,'PO6' ,1, 300), ('2022-11-03 10:45:55.067', 1, 4,'PO283' ,1, 400), ('2022-11-26 10:45:55.067', 1, 5,'PO735' ,1, 500), ('2023-04-28 10:45:55.067', 1, 6,'PO407' ,1, 600), ('2022-09-09 10:45:55.067', 1, 7,'PO484' ,1, 700), ('2024-03-13 10:45:55.067', 1, 8,'PO344' ,1, 700), ('2024-04-24 10:45:55.067', 1, 9,'PO254' ,1, 800), ('2022-06-19 10:45:55.067', 1, 10,'PO344',1, 800) GOWhen I run this query, how many unique values are returned for the SalesRank column?
SELECT st.SalesDate , st.SalesPersonID , st.total , RANK () OVER (PARTITION BY st.SalesPersonID ORDER BY st.total desc) AS SaleRank FROM dbo.SalesTracking AS st;See possible answers