WHERE (active = 1 AND custom_active = -1 OR custom_active = 1) AND last_square_price != 0 AND name NOT LIKE '%damage%' AND category NOT LIKE '%clearance%' AND subcat NOT LIKE '%clearance%' AND raw_table != 'CSV_hrp' AND ((custom_newcat = '' AND newcat = '' AND category LIKE '%Parts%') OR (newcat = 'Parts' AND custom_newcat = '') OR custom_newcat = 'Parts') AND ((custom_subcat = '' AND subcat = 'Hardware') OR custom_subcat='Hardware')

Parts