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

HOW TO Use the NumericUpDown Control

How To Get IP & Locations details of client machine in asp.net

Get control name in Page_Load event after post back by any control