sqlsunday.com

T-SQL tips and tricks, best practices and query plans from the field.

Skip to content
  • sqlsunday.com
    • About
  • Structured Concepts
    • Master data tool
    • Send passwords
  • Slack app
  • Presentations
  • Downloads
  • Checklists
    • Installing SQL Server 2014
    • Installing SQL Server 2016
    • Installing SQL Server 2017
    • Installing SQL Server 2019
    • Installing SQL Server 2022
    • Links and utilities
Search

payment

Calculating invoice settlements with window functions

2019-09-162019-09-16 / Daniel Hutmacher / 3 Comments

I’ve solved this puzzle a number of times, but I’ve never really been quite happy with the result. It was either too slow, too much code, too hard to understand. So here’s a fresh take at computing the time-to-payment on a large amount of invoices, with multiple, overlapping, partial payments.

Continue reading →
Microsoft Most Valuable Professional
  • Mastodon
  • WordPress
  • LinkedIn
  • Twitter
  • Facebook
  • GitHub
  • RSS Feed

Search

Categories

  • By difficulty (201)
    • Advanced (42)
    • Basics (58)
    • Intermediate (103)
  • CLR (1)
  • Code review (1)
  • Datasets (1)
  • Off-topic (14)
  • Rant (6)
  • Scripts (20)
  • Series (33)
    • Efficient data (10)
    • Introduction to T-SQL (1)
    • Slowly changing dimensions (5)
    • SQL Server security (17)
  • SQL Server concepts (85)
  • T-SQL (148)
  • Tips (59)
  • Uncategorized (1)
  • Videos (2)
Daniel Hutmacher, Structured Concepts AB

SQL SERVER HELP YOU CAN DEPEND ON.

Need SQL Server help?

At Structured Concepts, we specialize in SQL Server development and performance tuning, as well as technical training for users and developers.

Visit our homepage at strd.co.

Mastodon
Create a website or blog at WordPress.com
  • Follow Following
    • sqlsunday.com
    • Join 184 other followers
    • Already have a WordPress.com account? Log in now.
    • sqlsunday.com
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar