SQL Practice Logo

SQLPractice Online

Level 5 - SeniorQuery-Based Questions

Build Partial Index for Hot Subset

Interviewer prompt: 95% of alert rows are resolved; operational queries only read unresolved alerts by tenant and created_at. Write index DDL for this workload.

Schema Context

alerts(alert_id, tenant_id, status, created_at, severity)