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 log in sql server?
How to backup SQL Server Reporting Services ?
How can I change procedure name in sql server?
How to select an exiting database using mssql_select_db()?
What is scalar user-defined function?
Explain different types of self contained sub query?
How can a user-defined datatype be created?
What is sql server transaction log file?
what is a mixed extent? : Sql server administration
How to find table changes in sql server?
Can you edit the .rdl code associated with a linked report?
Do you know the isolation level that sql server support?
How to bind a view to the schema of the underlying tables?
What is the difference between composite index and covering index?
What is difference between createstatement and preparedstatement?