SELECT category_id, COUNT(product_id) AS total_products, AVG(price) AS average_price FROM products GROUP BY category_id HAVING COUNT(product_id) > 5 AND AVG(price) > 50.00 ORDER BY total_products DESC;