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
Mention the different authentication modes in sql server.
What are joins in sql and what are the different types of joins?
When cursors are useful?
What is set nocount on?
How to test odbc dsn connection settings?
How to download and install the scaled-down database adventureworkslt?
Different types of keys in SQL?
What Is Rdbms?
How do you delete duplicate rows in sql server?
How many types of stored procedures are there in sql server?
Can multiple columns be used in sql group by clause in ms sql server?
Explain log shipping and mention its advantages.
What is the default sql server instance name?
How do you improve the performance of a SQL Azure Database?
What is sql sandbox in sql server?