Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: ROW_NUMBER(): An efficient alternative to subqueries – Scenario 2

    How does the ROW_NUMBER() approach compare with using self-joins as follows?

    SELECT Previous.Category, Previous.Date, Next.Date

    FROM Dates.CategoryDate Previous LEFT JOIN Dates.CategoryDate Next ON Previous.Category = Next.Category AND Previous.Date < Next.Date

    LEFT JOIN Dates.CategoryDate...

Viewing post 1 (of 1 total)