select name of emplyoee whose total salary is 130 from
following table.
id name salary
1 a 100
2 b 20
3 c 50
1 a 30
2 b 70
Post the resulantant Query?

Answers were Sorted based on User's Feedback



select name of emplyoee whose total salary is 130 from following table. id name salary 1..

Answer / mahavir bansal

select Name as Sal from emplyoee
group by Name
having sum(salary)=130

Is This Answer Correct ?    17 Yes 3 No

select name of emplyoee whose total salary is 130 from following table. id name salary 1..

Answer / anonymous

select name as Sal
from emplyoee
group by id
having sum(salary)=130

Is This Answer Correct ?    3 Yes 1 No

select name of emplyoee whose total salary is 130 from following table. id name salary 1..

Answer / kuntal bhattacharya

select name from
(select name ,sum(salary) as Sal from emplyoee
group by id ,name)as s
where Sal=130

Is This Answer Correct ?    2 Yes 0 No

select name of emplyoee whose total salary is 130 from following table. id name salary 1..

Answer / ajay kumar

select sum(salary) as Sal from emplyoee
group by id
having sum(salary)=130

Is This Answer Correct ?    8 Yes 8 No

select name of emplyoee whose total salary is 130 from following table. id name salary 1..

Answer / kumar.t

Select id, name, sum(salary) from emp
group by id, name
Having sum(salary) =130

Is This Answer Correct ?    0 Yes 0 No

select name of emplyoee whose total salary is 130 from following table. id name salary 1..

Answer / vikas kant

select emp_name, sum(salary)
from emp
group by emp_name
having sum(salary)=130

Is This Answer Correct ?    0 Yes 0 No

select name of emplyoee whose total salary is 130 from following table. id name salary 1..

Answer / supriya gupta

SELECT Name FROM Employee
WHERE salary =130

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More SQL Server Interview Questions

wat is the main diff between sql server 2000and sql server 2005

6 Answers   Jade Software,


Mention the differences between local and global temporary tables.

0 Answers  


Can foreign key be duplicate?

0 Answers  


What are the 10 characteristics of data quality?

0 Answers  


If i have one transaction say mainTransaction, within this mainTransaction i have another two transaction say t1 and t2. Now while execution t1 completes successfully and commit statement fires, but while executing t2 some error occurs and rollback statement fires. What happen to t1, is it rollback or not?

1 Answers   Ness Technologies,






Can we call stored procedure in trigger?

0 Answers  


What are differences in between sql server 2012 and sql server 2016?

0 Answers  


Please give me queries for the following 1. To get the count of duplicate records. 2. A query to delete the duplicate records.

3 Answers   247Customer,


what is Archive old data?

1 Answers  


How do use Having,Group by,Group function in SQL?

0 Answers  


How to set database to be single_user in ms sql server?

0 Answers  


What is a Linked Server?

1 Answers  


Categories