GROUP_ID
GROUP_ID is an Oracle SQL analytic function that allows you to identify duplicate rows within a set of rows, based on specified partition criteria. It assigns a unique group number for each set of duplicates in a result set.
Example
Output
Explanation
The code example performs a query on the “employees” table, grouping the data by the ‘GROUP_ID’ field. The output displays the count of employees in each group. It shows the ‘GROUP_ID’ and the respective count of employees in that group.