question

BI DWH BALA avatar image
BI DWH BALA asked

Question to get an output?

Hi,

I have a scenario where data is arranged as follows:

TABLE1 =

ID NAME


102 JOEL

256 MARK

269 MARK

270 JOSH

369 AMY

699 AMY

And I would like to see the ouptut as follows:

NAME occurence


JOEL 1

MARK 1

MARK 2

JOSH 1

AMY 1

AMY 2

Any suggestions are welcome.

Regards BI DWH BALA

queryoraclerank
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Andrew Mobbs avatar image
Andrew Mobbs answered
SELECT name,rank() OVER (ORDER BY id) FROM table1 ORDER BY id
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

BI DWH BALA avatar image BI DWH BALA commented ·
Thank you Andrew Mobbs. It solved my purpose.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.