Display all employee name and salary from employee and salary table for last 3 months where salary is >75000
Printable View
Display all employee name and salary from employee and salary table for last 3 months where salary is >75000
select e.ename,s.salary
from employee e,salary s
where e.emp_id = s.emp_id
and s.salary > 75000
and s.sal_date >= add_months(sysdate, -3);
Note :
Add_months is an Oracle function which adds no months to the first parameter(date)