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

What is the recursive stored procedure in sql server?

0 Answers  


Explain about nested stored procedure?

0 Answers  


What is outer join in sql server joins?

0 Answers  


How to return the date part only from a sql server datetime datatype?

0 Answers  


What are trace files?

0 Answers  






What is plan freezing?

0 Answers  


what is the main difference between constraints(like primary key etc..)& joins?

2 Answers  


Write the Syntax for Cursors.

2 Answers   CarrizalSoft Technologies, HP,


my problem is tempdb tempdb(dbname) 77752.95 MB(db size) 25345.03 MB (unallocated size) suppose i increased temp db size 10 gb . after increase the temp db showing 87 gb (dbsize) 25346.03MB(unallocated size)--unallocated size is showing same .please clarify.

1 Answers  


What is the difference between ddl and dml?

0 Answers  


What is difference between group by and having?

0 Answers  


What is the use of “join” in sql server?

0 Answers  


Categories