Find total salary by employee without group by


emp_id name salary
1 chandra 10000.00
1 chandra 20000.00
2 sanjay 30000.00
2 sanjay 47000.00
3 ashutosh 39087.00
4 Teji          NULL


select emp_id,name,sum(salary) over (partition by emp_id) totsal from emp_sal_tbl

Comments

Popular posts from this blog

Executing PowerShell scripts from C#

HOW TO Use the NumericUpDown Control

Exposing Agile Software Development Myths