I have some data like in picture below on and need to perform some query.
And then I try to produce result like the picture below, but I have trouble and don't know how to split qty by child customer order.
How to get results like picture 2?
This is the query I have tried in order to obtain the result I want:
SELECT item ,no_po ,sum(qty) as total ,parent_customer ,child_customer ,qty FROM `detail_order` WHERE received_date='2018-06-27' group by item ORDER BY item asc