Write SQL code to produce a desired output, then write programming to do the same thing (Python or pseudo code).
Use the provided users and messages tables. Return users with at least two Slack messages sent during January 2025, then reproduce the same result with Python using the function signature summarize_messages(users, messages).
user_id, user_name, total_messages, and latest_message_at.total_messages descending, latest_message_at descending, then user_id ascending.| Column | Type | Description |
|---|---|---|
| user_idPK | INT | Unique Slack user identifier |
| user_name | VARCHAR(100) | Slack display name |
| VARCHAR(255) | User email address |
| Column | Type | Description |
|---|---|---|
| message_idPK | INT | Unique message identifier |
| user_id | INT | Authoring user identifier |
| channel_name | VARCHAR(100) | Slack channel containing the message |
| sent_at | TIMESTAMP | Message creation timestamp |