Skip to content

GROUP_ID

SELECT GROUP_ID, COUNT(*)
FROM employees
GROUP BY GROUP_ID;
GROUP_ID | COUNT(*)
---------|---------
1 | 10
2 | 15
3 | 25

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.