Download Attachments from Exchange Web Services using SSIS
I recently worked on an engagement where the requirement was to process excel spreadsheets sent to a group mailbox hosted...
2016-03-11
5,085 reads
I recently worked on an engagement where the requirement was to process excel spreadsheets sent to a group mailbox hosted...
2016-03-11
5,085 reads
I recently worked on an engagement where the requirement was to process excel spreadsheets sent to a group mailbox hosted...
2016-03-11
304 reads
In T-SQL and other languages we have bitwise XOR natively supported; the T-SQL operator is simply ^. Here’s the explanation of...
2015-10-08 (first published: 2015-09-29)
3,155 reads
There’s been an excellent free solution for documenting SSAS metadata in multi-dimensional models for quite some time: http://www.purplefrogsystems.com/blog/2010/09/olap-cube-documentation-in-ssrs-part-1/.
I had the...
2015-09-09
1,224 reads
I’ve seen many a blog post about migrating SQL Agent jobs across instances using PowerShell, SMO, T-SQL, and the like....
2015-05-26
1,523 reads
Intro
AlwaysOn availability groups are a powerful enhancement to SQLServer HA, and offer many improvements over older database synchronization techniques like...
2015-05-15 (first published: 2015-05-05)
6,803 reads
Intro
This blog post is designed to be useful to two different audiences:
Those implementing Ola Hallengren’s Maintenance Solution for the first timeThose...
2015-04-16
6,000 reads
I recently worked on a project where the client requested to “remove all of the unused jobs” that had been...
2015-04-09 (first published: 2015-04-01)
8,441 reads
Background
DAX offers many powerful time intelligence functions that can be applied at virtually any level of a date / time hierarchy....
2015-02-13 (first published: 2015-02-04)
6,613 reads
This is a short, but hopefully sweet post for someone, whom, like me, might have had to end up spending...
2014-12-03
2,689 reads
I wrote a stream-of-consciousness post a few months ago about what I do in...
By Steve Jones
I had to demo the Flyway Autopilot system recently and created a GitHub Actions...
This is more complicated than using the Azure Migration method, but because it’s maxed...
Comments posted to this topic are about the item The Rank Window
Comments posted to this topic are about the item The End of Azure Data...
Comments posted to this topic are about the item How to Develop Solutions with...
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 ) 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 SaleRank 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