Snap wants to analyze how users interact with the app. Calculate the percentage of time spent sending vs. opening snaps for each user.
| activity_id(INTEGER) | user_id(INTEGER) | activity_type(VARCHAR) | time_spent(DECIMAL) |
|---|---|---|---|
| 1 | 123 | send | 4.5 |
| 2 | 123 | open | 3 |
| 3 | 456 | send | 5 |
| 4 | 456 | open | 5 |
| 5 | 123 | send | 2.5 |
| 6 | 789 | chat | 10 |
| 7 | 789 | open | 2 |
| user_id(INTEGER) | send_perc(DECIMAL) | open_perc(DECIMAL) |
|---|---|---|
| 123 | 70 | 30 |
| 456 | 50 | 50 |
| 789 | 0 | 100 |