https://stackoverflow.com/questions/710212/is-there-a-way-to-access-the-previous-row-value-in-a-select-statement
Anonymous
Use simple algorithms as well as simple data structures.