SELECT a.id, a.name, a.alias, a.category_id, a.category_id_wrapper,
a.image, a.price, a.price_old,
COALESCE(NULLIF(TRIM(a.repair), ''), b.repair) as repair,
COALESCE(NULLIF(TRIM(a.guarantee), ''), b.warrant) as guarantee,
b.price, b.price_h
FROM fs_service AS a
INNER JOIN fs_service_sub AS b ON b.service_id = a.id
WHERE a.published = 1
AND b.published = 1
AND b.price > 0
AND (a.category_id_wrapper LIKE '%,3607,%'
OR a.cat_sub LIKE '%,3607,%')
GROUP BY a.id
ORDER BY a.created_time DESC, a.id DESC