Python Practicle 9
Python Practicle 9
Consider EMP table and perform the following using SQL commands :
(iii) Find the employees having salary greater than average salary of the employees working in dept 10.
(iv) List employee name and yearly salary and arrange the output on the basis of yearly salary in
descending order.
(v) Retrieve the names of departments in ascending order and their employees in descending order.
THEORY:-
We are going to use Oracle 10g to create these relational database tables :
SOFTWARE USED:-
1. Employee Table :
Data Insertion:-
begin
insert into employee
values(101,'satvik',08,'Accounts',9000,2000);
(iv) List employee name and yearly salary and arrange the output on the basis of yearly salary
indescending order.
select employee_name, 12*salary as "Yearly Salary" from employee order by "Yearly Salary" desc;
(v) Retrieve the names of departments in ascending order and their employees in descending
order.