Chandu K

Chandu K

  • NA
  • 97
  • 7.4k

I want to select rows which have a difference of more than 1 in OU_DEA

Jun 4 2021 1:26 PM
Hello everyone, I want to select rows which have a difference of more than 1 in OU_DEAL_ID column. Eg: There are 4 values, 202513,202515,202996, 202999. So I want to group 202513,202515 (put row tag as 1) and group 202996, 202999 (put row tag as 2) using lag operation, I am getting the DIFF for 202515, but not sure of how I can get the first row(202513). For this I can assign row_number ordering OU_DEAL_ID, but not sure of how I can do that in

Answers (5)