Cizz22 3 months ago
parent 0cde56d64a
commit 509e8d48c2

@ -62,7 +62,7 @@ filtered_wo AS (
FROM wo_costs w FROM wo_costs w
JOIN location_max lm ON w.asset_location = lm.asset_location JOIN location_max lm ON w.asset_location = lm.asset_location
WHERE w.total_wo_cost > 0 WHERE w.total_wo_cost > 0
AND w.total_wo_cost >= lm.max_cost * 0.2 -- keep within 10% of max AND w.total_wo_cost >= lm.max_cost * 0.15 -- keep within 10% of max
) )
SELECT SELECT
asset_location, asset_location,

Loading…
Cancel
Save