Codington
0 of 8 problems solved • 0%

Exercise prompt

Keep the Busy Environments

In module 14, each environment got a row in the report. Add HAVING after GROUP BY to keep only groups whose count meets a threshold. The example keeps statuses that occur at least twice.

Example

SELECT status, COUNT(*) AS runs FROM deployments GROUP BY status HAVING COUNT(*) >= 2;

Your task

Group all deployments by environment. Show environment and COUNT(*) as run_count for environments with at least seven runs.

Opening the database…