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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between for xml raw and for xml auto?

749


Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?

656


How to update a field in SQL after ALTERING a row?

883


What is the difference between coalesce() & isnull()?

734


What is the Difference Between Primary and Foreign Key?

753






How do you create a data source?

651


What is the use of @@spid?

746


What kind of problems occurs if we do not implement proper locking strategy?

1143


What are four major operators that can be used to combine conditions on a where clause?

762


what is a self join? : Sql server database administration

699


Please explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?

676


What is the purpose of object explorer and its features? : sql server management studio

813


What are different types of views?

700


How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.

3564


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?

780