Find the number of employees earning each distinct salary.
sqlCopySELECT salary, COUNT(*) AS employee_count FROM employees GROUP BY salary;
sql
SELECT salary, COUNT(*) AS employee_count FROM employees GROUP BY salary;
This query groups the records in the "employees" table by the "salary" column and calculates the count of employees for each distinct salary value.
PromptDB can make mistakes. Please double-check responses.