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 nvl(to_char(manager_id), '') as manager_id, nvl(job_id, '') as job_id, sum(salary) as salary from employees where manager_id < 120 group by rollup(manager_id, job_id) order by manager_id, case when job_id is null then 1 else 0 end, salary desc;

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

Copy Clear