Mar 07 2022 11:41 PM
Mar 08 2022 04:43 AM
Solution@Neha11 , a Windows function like LEAD is a post operation, you can not use it in a JOIN condition or in a WHERE clause, only in the SELECT clause.
One way round is to use a CTE = Common Table Expression to re-use the query result.
Olaf
Mar 08 2022 06:45 AM
Mar 08 2022 04:43 AM
Solution@Neha11 , a Windows function like LEAD is a post operation, you can not use it in a JOIN condition or in a WHERE clause, only in the SELECT clause.
One way round is to use a CTE = Common Table Expression to re-use the query result.
Olaf