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
Answer / mahavir bansal
select Name as Sal from emplyoee
group by Name
having sum(salary)=130
| Is This Answer Correct ? | 17 Yes | 3 No |
Answer / anonymous
select name as Sal
from emplyoee
group by id
having sum(salary)=130
| Is This Answer Correct ? | 3 Yes | 1 No |
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 |
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 |
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 |
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 |
Answer / supriya gupta
SELECT Name FROM Employee
WHERE salary =130
| Is This Answer Correct ? | 1 Yes | 6 No |
Can you index views?
What is field in algebra?
Advantages and disadvantages of stored procedures.
you are provided with the single table having say 4 col ie fname lname age city , now the all records with displying of only fname and lname is required but in this format say my name is abhay khanna it will come like this abhay-khanna rahul-roy gaurav-singh the above format is required
how to find number of columns in a table in sql server 2000 and 2005 also
what is difference between Enterprise Manager and Query Analyer
How to create a dml trigger using create trigger statements?
How to transfer a table from one schema to another?
Tell me what do you mean by an execution plan? Why is it used? How would you view it?
What is read uncmmited?
What is lock escalation and what is its purpose?
Where is SQL Srever (In sQL server 2005/2008 where is SQL Server Located).
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)