Tell me about how you design a schema for high-velocity event tracking.
Using the provided event schema, write a query that summarizes activity during January 1 through January 3, 2026. Include event types with no matching events in that period.
event_type_name, event_count, unique_users, and last_event_at.event_count descending, then event_type_name ascending.| Column | Type | Description |
|---|---|---|
| event_type_idPK | INT | Stable identifier for an event type |
| event_type_name | VARCHAR(64) | Human-readable event type name |
| Column | Type | Description |
|---|---|---|
| event_idPK | BIGINT | Unique event identifier |
| event_type_id | INT | Referenced event type |
| occurred_at | TIMESTAMPTZ | Timestamp when the event occurred |
| user_id | UUID | Optional user associated with the event |
| source | VARCHAR(32) | Originating channel or system |
| payload | JSONB | Optional event attributes |