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

How will you decide the active and passive nodes?

0 Answers  


What happens if you add a new index to large table?

0 Answers  


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

0 Answers   TCS,


Explain what role entity and relationship play in an ER diagram.

0 Answers  


What is the use of nvl work?

0 Answers  






Do you have any idea about the tcl commands?

0 Answers  


Please explain what is “asynchronous” communication in sql server service broker?

0 Answers  


Where views are stored in sql server?

0 Answers  


What is data source object?

0 Answers  


What is data block and how to define data block size?

0 Answers  


Which command using Query Analyzer will give you the version of SQL server and operating system?

3 Answers  


How to choose all records from the table?

0 Answers  


Categories