Using a simple SELECT query, you could achieve that. I'm not going to give exact query but you could change based on your table structures.
--------------------
ItemID ItemName Qty
--------------------
1 Item1 10
2 Item2 10
3 Item3 10
4 Item4 10
1 Item1 20
2 Item2 20
3 Item3 20
4 Item4 20
1 Item1 30
2 Item2 30
3 Item3 30
4 Item4 30
--------------------
Sample query to get SUM of all items is below
SELECT ItemName, SUM(Qty) FROM TableName GROUP BY ItemName
Result is here
--------------------
ItemName Qty
--------------------
Item1 60
Item2 60
Item3 60
Item4 60
--------------------
Bind this values to your Listview. Now customize this for your requirement.
And you need to spend more time on learnings.