How to assign sequence # on a grouped data attribute

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 11
Accepted Solution

How to assign sequence # on a grouped data attribute

I would like to know how I can go about assigning a sequence on a grouped data attribute (see below). My intent is to derive a new field (New_ID) that will assign numbers in sequence based on the scenario below. Thanks

input

id       name  year_birth

A1111111      John  1970

A2222222      Mary  1980

A3333333      Bill    1990

A1111111      John  1970

A1111111      John  1970

A1111122      John  1970

A3333333      Bill    1990

Desired output

id          name  year_birth New_ID

A1111111      John  1970      1

A2222222      Mary  1980      2

A3333333      Bill  1990         3

A1111111      John  1970      1

A1111111      John  1970      1

A1111122      John  1970      4

A3333343      Bill    1990       5


Accepted Solutions
Solution
‎01-09-2013 05:36 PM
Super User
Posts: 19,789

Re: How to assign sequence # on a grouped data attribute


All Replies
Solution
‎01-09-2013 05:36 PM
Super User
Posts: 19,789

Re: How to assign sequence # on a grouped data attribute

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 158 views
  • 0 likes
  • 2 in conversation