DB Quacks SQL Tutorial · Chapter 5
Back to the Future: LAG and LEAD
Time-traveling scientist Dr. Temporal appears with a glowing device. Great Scott! I need temporal analysis - compare each pond visit with previous and next visit dates to understand behavioral trends!
Your task
Show each pond visit with the previous and next visit dates for comparison using the 'data/pond_visits.csv' file. You will be using window functions to access adjacent rows.