Suppose one slow run triggers a review of its whole environment. A condition on MAX(duration_seconds) in HAVING lets a single run qualify the group while COUNT(*) still includes its faster runs.
Find environments where at least one run took 24 seconds or more. Return environment, the count of all its runs as run_count, and its longest recorded time as max_seconds. Include every status in the count.