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 report snapshot in ssrs?

273


What is partitioned view?

909


How to delete all rows with truncate table statement in ms sql server?

1008


What is a trigger what are the advantages of trigger?

1008


Explain what are the basic functions for master, msdb, model, tempdb databases?

988


Differentiate between a having clause and a where clause.

970


what is the difference between Tabular and Matrix report?

173


How do I port a number to sql server?

1047


What is scrollable cursor?

1047


Can we store videos inside the sql server table?

991


What are the dmvs?

1020


How many categories of data types used by sql server?

1026


How to execute a sql statement using mssql_query()?

1056


Describe and explain about SQL native client?

1116


what are the core components of SSRS?

130