I would like to calculate the share of total orders for a given country while also showing the country column.
Sample output:
| customer_id | country | count_orders |
|---|---|---|
| 20323 | GB | 43 |
| 20323 | US | 94 |
Expected output:
| customer_id | country | count_orders | share_total_orders |
|---|---|---|---|
| 20323 | GB | 43 | 0.313 |
| 20323 | US | 94 | 0.686 |