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...

1. SELECT SUM(sal) as “Gross Salary” from EMPLOYEES;

2. SELECT MAX(sal) as “Highest Salary” from EMPLOYEES;

ouput should be in table format

Answer Posted / sandeep modapathi

select sum(Gross_Salary),sum(Highest_Salary) from (

SELECT SUM(Salary) as Gross_Salary,0 as Highest_Salary from
EmpSalaryDetails
UNION
SELECT 0,MAX(Salary) from dbo.EmpSalaryDetails
) as rowset

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is normalization? : Sql server database administration

1068


What is the use of @@spid?

980


How to create an identity column?

1182


Scalability, Availability, Integration with internet, etc.)?

2858


What program is used to store the data source file?

942


What is difference between commit and rollback when used in transactions?

944


What does nvl stand for?

933


What is a collation?

1073


Explain activity monitors

1053


What is exclusive locks?

940


What is left outer join in sql server joins?

1018


as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration

892


when would you go for denormalization? : Sql server database administration

848


How many types of stored procedures are there in sql server?

987


When would you use sql joins?

939