How to display name,salary,hra,pf,da,total salary for each employee. The output should be in the order of total salary,hra 15% of salary,da 10% of salary,pf 5% salary,total salary will be(salary+hra+da)-pf?

Oracle Apps Interview QuestionsCategory: SQLHow to display name,salary,hra,pf,da,total salary for each employee. The output should be in the order of total salary,hra 15% of salary,da 10% of salary,pf 5% salary,total salary will be(salary+hra+da)-pf?
Questions Master asked 10 years ago

How to display name,salary,hra,pf,da,total salary for each employee. The  output should be in the order of total salary,hra 15% of salary,da 10% of salary,pf 5%  salary,total salary will be(salary+hra+da)-pf?

1 Answers
Shailender Thallam Staff answered 10 years ago

SELECT ename,
  sal,
  sal/100*15                          AS hra,
  sal/100*5                            AS pf,
  sal/100*10                          AS da,
  sal+sal/100*15+sal/100*10-sal/100*5 AS total
FROM emp;