There is a table_1 with a column field_1 containing non-unique values ​​of the form:

 2 2 2 3 3 5 

Etc. It is necessary to find the count of each value of this column - the result should look like

 2 3 2 3 2 3 3 2 3 2 5 1 

Which function is more appropriate to apply to field_1 to get the desired result?

    1 answer 1

    In Oracle there are analytical functions that allow you to get the desired result.

     select field_1, count(1) over(partition by field_1) from table_1