Snap engineers want to measure "Story Completion Rate". A user completes a story if the number of unique snaps they viewed for that story equals the story's total_snaps.
Write an SQL query to calculate the percentage of users who have completed at least one story they started.
| story_id(INTEGER) | total_snaps(INTEGER) |
|---|---|
| 101 | 3 |
| 102 | 2 |
| user_id(INTEGER) | story_id(INTEGER) | snap_index(INTEGER) |
|---|---|---|
| 1 | 101 | 1 |
| 1 | 101 | 2 |
| 1 | 101 | 3 |
| 2 | 101 | 1 |
| 3 | 102 | 1 |
| completion_rate(DECIMAL) |
|---|
| 33.33 |