79304267

Date: 2024-12-23 21:25:18
Score: 1
Natty:
Report link

try the following:

WITH RankedEmployees AS ( SELECT departmentId, name, salary, DENSE_RANK() OVER (PARTITION BY departmentId ORDER BY salary DESC) AS salary_rank ) SELECT departmentId, name, salary FROM RankedEmployees WHERE salary_rank = 1;

Reasons:
  • Whitelisted phrase (-1): try the following
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Mark Locke