Sql, Sql Queries, Big Data, Data Analytics, Data Science.
it. So full query will look like: SELECT empid,department_id,salary from (select empid,department_id,salary,ROW_NUMBER() OVER(PARTITION BY department_id ORDER BY salary desc) as row_num from employe_table) as a where row_num=1; Result of highest paid employees in each department There are many