Job category:Data Science & Analytics

Comparing Rows with LEAD and LAG

Learn to compare each order with neighboring rows, identify long purchase gaps, calculate month-over-month gross order-value growth, and analyze order-value trends within customer cohorts. By the end, you can combine CTEs with LAG and LEAD for time-based shop analysis.
SQL
4 lessons
12 practices
2 hours
Badge for Exploratory Data Analysis,
Exploratory Data Analysis

Course details

Comparing Orders with LAG
Compare Order Status History
Compare Customer Signup History
Compare Customer Order History

Turn screen time into skills time

Practice anytime, anywhere with our mobile app.
Sign up

Join the 1M+ learners on CodeSignal

Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal