Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
select d.DEPARTMENT, a.EMP_NO, a.FIRST_NAME, a.LAST_NAME, a.SALARY from (select DEPT_NO, EMP_NO, FIRST_NAME, LAST_NAME, SALARY, dense_rank() over (partition by DEPT_NO order by SALARY desc) as ranking from EMPLOYEE) as a inner join DEPARTMENT as d on a.DEPT_NO = d.DEPT_NO where a.ranking = 1 order by a.SALARY desc ; SELECT 'Last_query_cost' AS "Variable_name", 0 AS "Value" FROM RDB$DATABASE;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear