SQL Practice Logo

SQLPractice Online

Level 5 - SeniorQuery-Based Questions

Partition Event Table by Month

Interviewer prompt: Build a monthly partitioned events table for high-volume clickstream data. Write core PostgreSQL DDL for parent table and one monthly partition.

Schema Context

events(event_id, tenant_id, event_ts, event_type, payload_json)