Originally posted by Heath
Wouldn't the ROW_NUMBER analytic function in an inline view do the trick?
That works too...
Code:
  1  select x, row_number() over (partition by x order by x) as mov_rank
  2* from xyz
SQL> /

         X   MOV_RANK
---------- ----------
        10          1
        10          2
        10          3
        20          1
        30          1
        40          1
        40          2

7 rows selected.