Skip to content

sqlsunday.com

  • About
  • Structured Concepts
    • Master data tool
    • OAuth wizard
    • Send passwords
  • Presentations
  • Downloads
  • Checklists
    • Installing SQL Server 2014
    • Installing SQL Server 2016
    • Installing SQL Server 2017
    • Installing SQL Server 2019
    • Installing SQL Server 2022
    • Conference organizer tools
    • Conference organizer checklist

Tag: windowed function

Using TOP n WITH TIES

Here’s an interesting feature to that may greatly simplifie a few queries. TOP n WITH TIES works pretty much like TOP, except it orders the top records “densely” to include tied values.

Continue reading Using TOP n WITH TIES
Published 2013-09-01
Categorized as Intermediate, T-SQL Tagged aggregate, detail, order by, top, windowed function, with ties

An introduction to windowed functions

Windowed functions are a powerful feature of T-SQL, allowing you to perform advanced aggregates. They provide a very efficient way of doing this as soon as you just get the hang of the OVER() clause.

Continue reading An introduction to windowed functions
Published 2013-03-31
Categorized as Intermediate, T-SQL Tagged count, dense_rank, group by, lag, lead, order by, over, partition by, rank, row_number, running average, running total, sum, windowed function

Posts pagination

Newer posts Page 1 Page 2
sqlsunday.com
Proudly powered by WordPress.