i need to know how i display department which has salary >
=5000 for the below table
Department
-----------
salary deptname
1000 a
3000 a
2000 b
3000 b
4000 c
5000 c
kindly send the query to thilakvinoth13@gmail.com
Answer Posted / mahesh
Hi dear,
1) If you have need name of total salary of each department to spend on employee(Understand like this) then use query:
select deptname, SUM(salary)
from Department
GROUP BY deptname
HAVING SUM(salary) >= 5000;
2) Otherwise
SELECT deptname
FROM Department
WHERE salary >= 5000;
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
What is row-level compre?
what is package and it uses and how can u call a package
Name some of the open source software that you can use in alternative to SSR?
What is the sql case statement used for?
Can we use max in where clause?
What is delete query?
What are the components of sql server service broker?
What are the security related catalog views? : sql server security
Do you know how to send email from database?
Explain isolation levels that sql server supports?
State the difference between local and global temporary tables?
What is microsoft sql server?
Indexes are updated automatically is the full-text index also updated automatically?
what is hash nonclustered index
What is a derived table?