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 |
How to find out what privileges a user currently has in oracle?
How can I get column names from a table in oracle?
What is transaction control statement and how many types of transaction control statement in Oracle?
Explain temporal data types in oracle
what is index?
what is the difference between table and veiw?
24. Display the order number for all orders whose average item cost is greater than the overall average item cost across all orders.
what is Materialized view? What is a snapshot? what are the similarities and differences between Materialized views and snapshots?
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"
What does `(+)` do in a where clause?
How to define and use table alias names in oracle?
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.