Hi all, im fairly new to SQL and im stuck half way through a query,
im using DB2 here is what im tryng to do.
i have a query that brings back an item number , shelf req, sum of all orders columns, based on the shelf req column the item number column has more than one row for the same item number therefore my sum of all orders is summing them based on shelf req which i need, what i cant get is how to keep this info plus get the sum of all orders for each item number reqardeless in the same query.
in another word, how do i get the sumallordrs column to sum Sumofallordrs column as seperate column.
ITEM Shelf Req Sumofallordrs SumallItems
1111 20 300 ?
2222 10 200
3333 25 75
1111 25 100
im using DB2 here is what im tryng to do.
i have a query that brings back an item number , shelf req, sum of all orders columns, based on the shelf req column the item number column has more than one row for the same item number therefore my sum of all orders is summing them based on shelf req which i need, what i cant get is how to keep this info plus get the sum of all orders for each item number reqardeless in the same query.
in another word, how do i get the sumallordrs column to sum Sumofallordrs column as seperate column.
ITEM Shelf Req Sumofallordrs SumallItems
1111 20 300 ?
2222 10 200
3333 25 75
1111 25 100
Comment