I'm using the HR@orcl learning account from oracle.
-----------------------------------------------------
and I have the following question :
Create a an SQL query to display the department, the number of employees for that department based on their salary, and the total number of employees for that department, giving each column an appropriate heading.
the salary should be divided like : Less Than 5000,More 5000 And Less 10000 etc .....
-----------------------------------------------------
I tried to use ( Case ) with ( Group By ) but i failed also I tried to use subquery or aggregate functions in the case but it didn't work ...
any help or hint how to solve this .
ex :
select department_id,count(*),case(.....) from employees group by department_id;
it gave errors . any ideas how to solve it .