There are two tables with the columns shown in brackets.
a. Employee(emp_id,emp_name,emp_salary,emp_dept_id)
b.Department(dept_id,dept_name)
Write a SQL to show the total salary for each department
Find sql salary
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Satyapriya NayakRank #47 · 31.5K reputationPosted Jul 20, 2012, 9:26 PM EDT
Rahul Bhatt165 reputationPosted Jul 20, 2012, 9:41 PM EDT
select TableB.dept_name, SUM(TableA.emp_salary) from Employee as TableA
Inner join Department as TableB
on TableA.emp_dept_id = TableB.dept_id
Group by TableB.dept_name