Geting value count from an Oracle Table

后端 未结 2 1182
忘了有多久
忘了有多久 2021-01-19 17:03

I have a table, that contains employees. Since the company I\'m working for is quite big (>3k employees) It is only natural, that some of them have the same names. Now they

2条回答
  •  萌比男神i
    2021-01-19 17:14

    This can be easily done with a count over partition:

    SELECT NAME, SURNAME, USERNAME, COUNT(*) OVER (PARTITION BY NAME, SURNAME)
    FROM
    YOUR_TABLE;
    

提交回复
热议问题