|
|
|
|
@ -62,7 +62,7 @@ filtered_wo AS (
|
|
|
|
|
FROM wo_costs w
|
|
|
|
|
JOIN location_max lm ON w.asset_location = lm.asset_location
|
|
|
|
|
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
|
|
|
|
|
asset_location,
|
|
|
|
|
|