I have a problem that is as follows:
Knowing that a service can have several exams, I need to number the exams in order to know the first, second, third ..., for each service. Example:
LINHA ATENDIMENTO SEQ_EXAME
1 100 11
2 100 13
3 100 17
1 200 83
2 200 92
Using ROWNUM
does not work because it does not number for each different service.
LINHA ATENDIMENTO SEQ_EXAME
1 100 11
2 100 13
3 100 17
4 200 83
5 200 92
Could you help me by suggesting some solutions?