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
What are a query and state the different types of queries and their uses?
What is varray?
How to connect to a remote server?
Explain the difference between replace() and translate() functions in oracle?
How to delete an existing row from a table in oracle?
For a field in a repeating frame, can the source come from the column which does not exist in the data group which forms the base for the frame ?
How to write a query with a right outer join in oracle?
How we can able to import our own template (users designed MS-Word templates) which has many tabular columns; need to pass some values generate by Oracle-reports9i? Actually need to import more than 400 MS-Word templates into Oracle Reports-9i to minimize layout design in Reports.
What is the usage of analyze command in oracle?
candidate key is subset of super key but not vice-verse explain
How are extents allocated to a segment?
What is the difference between sharding and partitioning?
What are named parameters?
In the oracle version 9.3.0.5.0, what does each number shows?
What is meant by joins? List out the types of joins.