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

Does any body please help me what question's have asked for SSRS in the interview?

2205


How you can find out if an index is useful to the optimizer?

987


How can we remove orphan records from a table?

1031


What is lock escalation and what is its purpose?

1029


What is de-normalization in sql database administration? Give examples?

1027


What is an identity column in insert statements?

1078


Why truncate is ddl?

1136


What is the purpose of sql profiler in sql server? : sql server database administration

1162


What is the native system stored procedure to execute a command against all databases?

1087


Does view occupy space?

992


What is the purpose of object explorer and its features? : sql server management studio

1277


What is the sql case statement used for? Explain with an example?

1043


What is Service Broker in sql server 2012?

1076


How does clustered and non clustered index work?

981


How raid can influence database performance?

1087