Level 5 - SeniorQuery-Based Questions
Create Idempotent Index Migration
Interviewer prompt: Add an index to speed up invoice searches by account_id and invoice_date without breaking repeat deployments. Write idempotent SQL.
Schema Context
invoices(invoice_id, account_id, invoice_date, amount, status)