Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

How many anonymous blocks can be defined?

1191


Is the After report trigger fired if the report execution fails ?

2918


How to run the anonymous block again?

1134


How to bring a tablespace online?

1081


How to run create database statement?

1038


What do you understand by a database object? Can you list a few of them?

1020


How do you find current date and time in oracle?

1050


Where do we use decode and case statements?

1018


How to define a record variable to store a table row?

1061


What is the implicit cursor in oracle?

1113


Which is better Oracle or MS SQL? Why?

6395


What are the execution control statements in oracle?

1098


What is the difference between $oracle_base and $oracle_home?

1090


How to speed up webrick?

1080


Explain a synonym?

1034