Window functions are great and work well when you want to access records related in some way to current records. The only problem with LEAD and LAG and window functions...
Window functions are great and work well when you want to access records related in some way to every record. The only problem with LEAD and LAG and window functions...