Skip to content

Latest commit

 

History

History
14 lines (7 loc) · 357 Bytes

README.md

File metadata and controls

14 lines (7 loc) · 357 Bytes

MS SQL Firt-In-First-Out (FIFO)

is calculated in one query without cursor
requires MSSQL 2012+

Problem Statement:

Simple banking account with accrual of interest on account amount.
Client may deposit some money and withdraw it at any time.
We need to calculate how many days the money was on deposit account before they have been withdrawn.