Write a PostgreSQL query to return all active users who logged in during the last 7 days in an Air Apps product. Return one row per user with their most recent qualifying login timestamp.
| Column | Type | Description |
|---|---|---|
| user_id | ||
| full_name | ||
| account_status |
| Column | Type | Description |
|---|---|---|
| event_id | ||
| user_id | ||
| event_type | ||
| login_at |
Only include `event_type = 'login'`Use the 7-day window from `2024-06-08 00:00:00` to before `2024-06-15 00:00:00`Exclude inactive usersReturn each user once with their latest login in that window