Created
June 27, 2023 08:34
-
-
Save kiddojazz/eba3ac6ba8a03add73296f4ae5131d6d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select customer_id, state_, profit_total, | |
LAG(profit_total) over(partition by state_ order by profit_total desc) as Lag_row | |
from customer_order_window; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment