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!



I have a table that log salary-increase-process have fields: autoid, old_salary, acctno and table..

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

Post New Answer

More Oracle General Interview Questions

How to find out what privileges a user currently has in oracle?

1 Answers  


How can I get column names from a table in oracle?

0 Answers  


What is transaction control statement and how many types of transaction control statement in Oracle?

0 Answers   MCN Solutions,


Explain temporal data types in oracle

0 Answers  


what is index?

4 Answers  






what is the difference between table and veiw?

4 Answers   IBM,


24. Display the order number for all orders whose average item cost is greater than the overall average item cost across all orders.

2 Answers   Wipro,


what is Materialized view? What is a snapshot? what are the similarities and differences between Materialized views and snapshots?

2 Answers  


write a query to count number of alphabets in given string for example "APPLE" write a query to generate sequence from 50 to 100 write a query to display in single string "ABCD,EFGH,IJKL,PQRS"

7 Answers   British Telecom BT,


What does `(+)` do in a where clause?

1 Answers  


How to define and use table alias names in oracle?

0 Answers  


Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.

0 Answers   Infosys,


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)