SQL window functions; what are they and why are they needed?