LAG and LEAD : Problem Solving using Analytic Functions

preview_player
Показать описание
In this video we work through some examples of using the LAG and LEAD analytic functions to solve some specific problems.

Analytic Functions : Introduction

LAG and LEAD Analytic Functions

Analytic Functions : All Articles

Cameo by Gwen (Chen) Shapira :

Cameo appearances are for fun, not an endorsement of the content of this video.

All trademarks, product names and logos are the property of their respective owners.
Рекомендации по теме
Комментарии
Автор

Perfect video with excellent examples, zero fluff and just GOLD! Thank you.

MFM
Автор

Many thank for the clear explaination! I spent a whole day trying to understand both of these functions lol, but I got it from you in 4 minutes 👍

merouanebali
Автор

I was finding lag with negative offset and found your video here. It helps a lot! Thank you!

mr.goldenball
Автор

fml FINALLY a CLEAR tutorial. thanks so much chief. that's a sub for you

clickbaitpolice
Автор

concise. to the point, doesn't overload you with information, and uses the commonly used HR schema, quick and easy, EXACTLY what a master procrastinator like me needs to learn

FalconFlyer
Автор

Cannot thank you enough, best way to invest and learn through your videos.

abhisheksalvi
Автор

Thank you so much for the explaination

faisalsiregar
Автор

This playlist was really helpful. Thanks!

shaliniguha
Автор

Excellent Very Very Good and to the Point

SunilKumar-bvnj
Автор

iam enjoying it please add more videos....good job.

enockoloo
Автор

que crack eres hermano, saludos desde Peru

ronaldbaronirojasguerrero
Автор

Hey Tim, do you have any thoughts on if you then wanted to filter down a result set based on lag/lead?

For example the database I’m using is based on website page views. With each row being a visitor Id, the page url, and time stamp.

So I’ve figured out how to use the lag, and lead to display the previous and next pages for each row.

But is there a way to have the lead or lag results in a where statement? So that way I could only view rows where the previous page was the home page for example.

When I try I get an error that analytics functions can only be used in select statements, but wanted to see if you knew of a workaround

BurtonHohman
Автор

Can I use these functions in the Where Clause? I would like to only display values where the current value is not equal to previous value

jeffkosal
Автор

Hi I’m trying working on a project with stock prices of many different companies. I have rows which show date and closing stock price. I calculated the change in percentage per each day per each company easily with the LAG function.

However, now I want to get an average of the change in prices within a specified date range and then group that average per stock. I’ve been at this for hours but no dice. Is it possible to use AVG AND LAG in the same computation?

clickbaitpolice