select emp_dept,sum(emp_salary) as [Total Sal] from emp group by emp_dept
select distinct emp_dept,sum(emp_salary) OVER (Partition By emp_dept) AS [Total Sal] from emp
Download
0 formats
No download links available.
SQL SERVER||How to get Sum without using Group By? | NatokHD