Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sum quantity with like employee and itemname

Author  Topic 

samlopez06
Starting Member

4 Posts

Posted - 2014-11-08 : 01:50:25
Hi everyone. I have a table Item_used like this

Itemname Employee Quantity
pencil samlopez 10
pencil samlopez 5

All I want is to make a report that sum all the quantity of the same items with the same employee like this

Itemname Employee Quantity
pencil samlopez 15

singularity
Posting Yak Master

153 Posts

Posted - 2014-11-08 : 15:48:45
[code]
select Itemname, Employee, sum(Quantity) as Quantity
from Item_used a
group by Itemname, Employee
[/code]
Go to Top of Page
   

- Advertisement -