GROUP BY and HAVING COUNT(*) > 1.DENSE_RANK() window function to assign a rank to each salary, which will serve as the team_id.team_id and employee_id in ascending order.
erDiagram
Employees {
int employee_id
varchar name
int salary
}