Advertisement
tko_pb

get qty per product per locator.sql

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