Loading...

Rows With Multiple Flag Conditions

A medium SQL interview practice problem on DataDriven. Write and execute real sql code with instant grading.

Domain
SQL
Difficulty
medium
Seniority
mid

Problem

The SRE team is triaging compound error conditions where multiple signals fire at once. An error record is flagged if it matches more than one of these: err_type contains 'Error', message contains 'null', svc_name contains 'api', severity is 'error' or 'ERROR'. Return all flagged rows with their error ID, type, message, service, severity, occurrence count, and first occurrence time.

Practice This Problem

Solve this SQL problem with real code execution. DataDriven runs your SQL queries against a live PostgreSQL database and grades it instantly.