SQL Practice Logo

SQLPractice Online

Level 5 - SeniorQuery-Based Questions

Create Historical Archive Table

Interviewer prompt: Create archive_orders table preserving core columns plus archived_at timestamp, and index by archived_at and customer_id. Write DDL.

Schema Context

orders(order_id, customer_id, order_ts, status, total_amount)