Free SQL Server Learning Resources - Updated
Here is updated list of *free* invaluable SQL Server learning resources.
Unknown is an ocean.
You think I missed some important freely...
2012-12-06
3,298 reads
Here is updated list of *free* invaluable SQL Server learning resources.
Unknown is an ocean.
You think I missed some important freely...
2012-12-06
3,298 reads
It's been 2 years since I wrote my first blog post on SQLServerCentral ("What happens when a query is submitted").
No...
2012-12-05
1,446 reads
Chennai SQL Server user group meet is scheduled for Dec'2013.
Venue: Microsoft Training Centre, Radhakrishnan Salai, Chennai
Landmark: Opposite to President hotel
Timing: 09:30...
2012-12-05
1,586 reads
In this article We are going to understand the basics of SQLOS - CPU scheduling.
In high level:
1. When an user connects to SQL...
2012-12-03
6,300 reads
If you are the regular reader of my blog posts, you could easily judge in which topics i spend much time these days.
I have...
2012-11-29
10,101 reads
Conducting technical interview is an art.
Most likely I would start a discussion with simple questions like "What is your favourite topic in SQL...
2012-11-27
3,494 reads
In this article We are going to INSERT a record in a simple table and try reading Transaction log record.
Note:...
2012-11-27
4,492 reads
In this article, We are going to CREATE/ ALTER/ DROP a table and observe transaction log records created for those DDL statements.
Our...
2012-11-26
3,519 reads
As part of this Transaction Log Internals series, In this article we are going to observe the use of fn_dblog and some of its important...
2012-11-19
17,824 reads
As part of this Transaction Log internal series, In this article We are going to revisit some basic properties of Transaction log.Though architecture, purpose...
2012-11-18 (first published: 2012-11-15)
3,372 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