Guest User

Untitled

a guest
Aug 21st, 2018
77
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.         PartID,
  3.         IdMesin,
  4.         SUM(IF (IdShift = '1' AND HasilProduksi = 'Reject', QtyProduksi,'')) AS Shift1ng,
  5.         SUM(IF (IdShift = '2' AND HasilProduksi = 'Reject',QtyProduksi,'')) AS Shift2ng,
  6.         SUM(IF (IdShift = '3'AND HasilProduksi = 'Reject',QtyProduksi,'')) AS Shift3ng
  7. FROM
  8.         trans_lhpdthp
  9.     WHERE
  10.         DivisiId = 'IJ001' AND Tanggal = '2018-08-20' AND LineID LIKE '%%' AND IdMesin LIKE '%%' AND IdLocation LIKE '%3%' AND PartID LIKE '%%'
  11.    AND TypeProduct LIKE '%%' AND IdShift LIKE '%%' GROUP BY IdMesin, PartID
RAW Paste Data