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
what is normalization? : Sql server database administration
What is the use of @@spid?
How to create an identity column?
Scalability, Availability, Integration with internet, etc.)?
What program is used to store the data source file?
What is difference between commit and rollback when used in transactions?
What does nvl stand for?
What is a collation?
Explain activity monitors
What is exclusive locks?
What is left outer join in sql server joins?
as a part of your job, what are the dbcc commands that you commonly use for database maintenance? : Sql server database administration
when would you go for denormalization? : Sql server database administration
How many types of stored procedures are there in sql server?
When would you use sql joins?