SELECT DISTINCT pr.id, last_updated FROM mts_product AS pr INNER JOIN mts_product_category_content AS cc ON pr.id = cc.product_id WHERE ( pr."removed" = ? ) AND ( pr."active" = ? ) AND ( cc.category_id IN ( SELECT id FROM mts_get_product_category_sub_tree( ? ) ) ) ORDER BY last_updated DESC LIMIT 10 OFFSET 0