Tutorial suggestion on SQL "partition over" and "dense_rank"?
-
Any recommendations for a decent tutorial on these? I'm seeing them used in stuff the outsourcing team is writing, and in 20 years of writing SQL, I think I had to use "partition" once, and whatever I learned is long lost to age and time. :laugh:
Latest Articles:
DivWindow: Size, drag, minimize, and maximize floating windows with layout persistence -
Any recommendations for a decent tutorial on these? I'm seeing them used in stuff the outsourcing team is writing, and in 20 years of writing SQL, I think I had to use "partition" once, and whatever I learned is long lost to age and time. :laugh:
Latest Articles:
DivWindow: Size, drag, minimize, and maximize floating windows with layout persistenceThis one[^] is as good as any. What all tutorials fail to mention is that windowing functions only live in the SELECT clause. This means that it cannot be used in the WHERE or HAVING clauses. (use a subquery or CTE instead) And more important, windowing always happen AFTER GROUP BY.
Wrong is evil and must be defeated. - Jeff Ello
-
This one[^] is as good as any. What all tutorials fail to mention is that windowing functions only live in the SELECT clause. This means that it cannot be used in the WHERE or HAVING clauses. (use a subquery or CTE instead) And more important, windowing always happen AFTER GROUP BY.
Wrong is evil and must be defeated. - Jeff Ello
Ok cool, thank you. Looks like a reasonable site. And thanks for the extra info as well.
Latest Articles:
DivWindow: Size, drag, minimize, and maximize floating windows with layout persistence -
Ok cool, thank you. Looks like a reasonable site. And thanks for the extra info as well.
Latest Articles:
DivWindow: Size, drag, minimize, and maximize floating windows with layout persistenceAlso, indexing works. Use a composite index with the fields in the PARTITION clause followed by the fields in the ORDER clause, in exactly the same order
Wrong is evil and must be defeated. - Jeff Ello
-
Any recommendations for a decent tutorial on these? I'm seeing them used in stuff the outsourcing team is writing, and in 20 years of writing SQL, I think I had to use "partition" once, and whatever I learned is long lost to age and time. :laugh:
Latest Articles:
DivWindow: Size, drag, minimize, and maximize floating windows with layout persistenceI always find Robert Sheldon's articles to be excellent, e.g. [[^]Working with Window Functions in SQL Server - Simple Talk](https://www.red-gate.com/simple-talk/databases/sql-server/learn/working-with-window-functions-in-sql-server/)
-
Any recommendations for a decent tutorial on these? I'm seeing them used in stuff the outsourcing team is writing, and in 20 years of writing SQL, I think I had to use "partition" once, and whatever I learned is long lost to age and time. :laugh:
Latest Articles:
DivWindow: Size, drag, minimize, and maximize floating windows with layout persistenceI find Robert Sheldon's articles to be excellent, e.g. [Working with Window Functions in SQL Server - Simple Talk](https://www.red-gate.com/simple-talk/databases/sql-server/learn/working-with-window-functions-in-sql-server/)
-
Any recommendations for a decent tutorial on these? I'm seeing them used in stuff the outsourcing team is writing, and in 20 years of writing SQL, I think I had to use "partition" once, and whatever I learned is long lost to age and time. :laugh:
Latest Articles:
DivWindow: Size, drag, minimize, and maximize floating windows with layout persistenceHow about Find another way Partition clauses suck ?
I’ve given up trying to be calm. However, I am open to feeling slightly less agitated.
-
I find Robert Sheldon's articles to be excellent, e.g. [Working with Window Functions in SQL Server - Simple Talk](https://www.red-gate.com/simple-talk/databases/sql-server/learn/working-with-window-functions-in-sql-server/)
scottgp wrote:
I find Robert Sheldon's articles to be excellent, e.g.
Thank you!
Latest Articles:
DivWindow: Size, drag, minimize, and maximize floating windows with layout persistence -
Any recommendations for a decent tutorial on these? I'm seeing them used in stuff the outsourcing team is writing, and in 20 years of writing SQL, I think I had to use "partition" once, and whatever I learned is long lost to age and time. :laugh:
Latest Articles:
DivWindow: Size, drag, minimize, and maximize floating windows with layout persistenceWhenever I'm stuck on a SQL problem I go to these awesome articles written by a very respectable and knowledgeable CP member (nice guy too, or so I've heard) :D Querying SQL Server 2012: Part I[^] Querying SQL Server 2012: Part II[^]
Best, Sander Azure DevOps Succinctly (free eBook) Azure Serverless Succinctly (free eBook) Migrating Apps to the Cloud with Azure arrgh.js - Bringing LINQ to JavaScript