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 / 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 |
What is Network Database link ?
what is the difference between sql& oracle?
What is a read only transaction in oracle?
How do I spool to a csv formatted file using sqlplus?
How to connect the oracle server as sysdba?
How do I know if oracle is installed on windows?
What is Index Cluster ?
How to rollback the current transaction in oracle?
What is tns service name?
How to export several tables together?
what happened to the global index when I truncate the data in one of the partition?
how to retrieve daily sal from emp table in oracle 10g