Codington
0 of 8 problems solved • 0%

Exercise prompt

Group the Alternatives

SQL evaluates AND before OR. Put alternatives inside parentheses when a separate condition must apply to both. Check the staging rollback in the log to see why the grouping matters.

Example

SELECT id FROM deployments WHERE service = 'api' AND (environment = 'staging' OR environment = 'development');

Your task

Show only the IDs of production deployments with status failed or rolled_back. Practise writing the status alternatives with OR inside parentheses.

Opening the database…