Resetting Row number according to record data change
问题 i have got the set of data as follow name date x 2014-01-01 x 2014-01-02 y 2014-01-03 x 2014-01-04 and i'm trying to get this result name date row_num x 2014-01-01 1 x 2014-01-02 2 y 2014-01-03 1 x 2014-01-04 1 i have tried to run this query select name, date, row_number () over (partition by name order by date) as row_num from myTBL but unfortunately i get this result name date row_num x 2014-01-01 1 x 2014-01-02 2 y 2014-01-03 1 x 2014-01-04 3 please help. 回答1: You need to identify the