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
Does any body please help me what question's have asked for SSRS in the interview?
How you can find out if an index is useful to the optimizer?
How can we remove orphan records from a table?
What is lock escalation and what is its purpose?
What is de-normalization in sql database administration? Give examples?
What is an identity column in insert statements?
Why truncate is ddl?
What is the purpose of sql profiler in sql server? : sql server database administration
What is the native system stored procedure to execute a command against all databases?
Does view occupy space?
What is the purpose of object explorer and its features? : sql server management studio
What is the sql case statement used for? Explain with an example?
What is Service Broker in sql server 2012?
How does clustered and non clustered index work?
How raid can influence database performance?