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 report snapshot in ssrs?
What is partitioned view?
How to delete all rows with truncate table statement in ms sql server?
What is a trigger what are the advantages of trigger?
Explain what are the basic functions for master, msdb, model, tempdb databases?
Differentiate between a having clause and a where clause.
what is the difference between Tabular and Matrix report?
How do I port a number to sql server?
What is scrollable cursor?
Can we store videos inside the sql server table?
What are the dmvs?
How many categories of data types used by sql server?
How to execute a sql statement using mssql_query()?
Describe and explain about SQL native client?
what are the core components of SSRS?