Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- get qty per product per locator
- select sum(qtyonhand), mp.m_product_id, mp.value as product, ml.m_locator_id, ml.value as locatorname
- from m_storageonhand ms
- left join m_product mp on ms.m_product_id = mp.m_product_id
- left join m_locator ml on ms.m_locator_id = ml.m_locator_id
- where ms.datematerialpolicy <= '2021-01-24'::date -- rubah rubah tanggalnya
- group by mp.m_product_id, mp.value, ml.m_locator_id, ml.value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement