Fixed units shipped query
This commit is contained in:
@@ -8,22 +8,22 @@ WHEN item_number IN ('17873') THEN 'Harmonic Neutralizer'
|
||||
|
||||
ELSE 'None'
|
||||
END AS "Product",
|
||||
reportpower.charass_value as "Power Output", reportinput.charass_value || ' ' || reportphases.charass_value AS "Input", ROUND(SUM(coitem_qtyord),0) as "Qty Ordered"
|
||||
reportpower.charass_value as "Power Output", reportinput.charass_value || ' ' || reportphases.charass_value AS "Input", ROUND(SUM(coitem_qtyshipped),0) as "Qty Shipped"
|
||||
FROM coitem LEFT OUTER JOIN cohead ON cohead_id=coitem_cohead_id
|
||||
LEFT OUTER JOIN itemsite ON coitem_itemsite_id = itemsite_id
|
||||
LEFT OUTER JOIN item ON item_id = itemsite_item_id
|
||||
LEFT OUTER JOIN charass AS reportpower ON
|
||||
(coitem_id = reportpower.charass_target_id
|
||||
AND reportpower.charass_target_type = 'SI'
|
||||
AND reportpower.charass_char_id = 25)
|
||||
AND reportpower.charass_target_type = 'SI'
|
||||
AND reportpower.charass_char_id = 25)
|
||||
LEFT OUTER JOIN charass AS reportinput ON
|
||||
(coitem_id = reportinput.charass_target_id
|
||||
AND reportinput.charass_target_type = 'SI'
|
||||
AND reportinput.charass_char_id = 36)
|
||||
AND reportinput.charass_target_type = 'SI'
|
||||
AND reportinput.charass_char_id = 36)
|
||||
LEFT OUTER JOIN charass AS reportphases ON
|
||||
(coitem_id = reportphases.charass_target_id
|
||||
AND reportphases.charass_target_type = 'SI'
|
||||
AND reportphases.charass_char_id = 18)
|
||||
AND reportphases.charass_target_type = 'SI'
|
||||
AND reportphases.charass_char_id = 18)
|
||||
WHERE item_number IN ('16688','17861','17862','17863','22351','25020','25144','25147','25021','24952','17873','29243','29752')
|
||||
AND (coitem_status <> 'X')
|
||||
AND cohead_id NOT IN(SELECT cohead_id from rahead LEFT OUTER JOIN cohead ON rahead_new_cohead_id=cohead_id WHERE cohead_id IS NOT NULL)
|
||||
|
||||
Reference in New Issue
Block a user