I have a table that log salary-increase-process have
fields: autoid, old_salary, acctno
and table EMP: acctno, name, salary
I want to list count increase-salary of employees, each have
old_salary, new_salary.
Help me with SELECT statement, please!

Answer Posted / abhisudipta

select distinct a.acctno,b.name,a.old_salary,b.salary,
nvl((sum(b.salary)-sum(a.old_salary)),0) count_increase
from salary_increase_process a,emp b
where a.acctno=b.acctno
group by a.acctno,b.name,a.old_salary,b.salary;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a package ? What are the advantages of package ?

604


What is Virtual Private Database in Oracle?

624


What privilege is needed for a user to create indexes in oracle?

578


Explain what are synonyms used for?

610


What is the dynamic sql in oracle?

599






How to select some columns from a table in oracle?

553


How to rollback the current transaction in oracle?

538


how may join possible between (requisition with purchase order)

1699


How do you get nicely formatted results from an oracle procedure that returns a reference cursor?

556


What is the difference difference between $ORACLE_HOME and $ORACLE_BASE.

653


How to run the anonymous block again?

595


What do you mean by a deadlock?

517


What is the difference between 10g OEM and 11g OEM?

563


How to change user password in oracle?

605


What is the difference between sharding and partitioning?

503