After shipping a redesigned checkout flow, the product team assigned users randomly to either the original experience (control) or the new one (treatment). To decide whether to roll out the change, they need to compare conversion rates between the two variants. Using the ab_test_assignments table, return variant, total_users, conversions, and conversion_rate_pct (rounded to 2 decimal places), ordered by variant.
ab_test_assignments
| column | type |
|---|---|
| id | INTEGER |
| user_id | INTEGER |
| variant | TEXT |
| converted | BOOLEAN |
ab_test_assignments
| id | user_id | variant | converted |
|---|---|---|---|
| 1 | 1 | control | false |
| 2 | 2 | control | true |
| 3 | 3 | control | false |
| 4 | 4 | control | true |
| 5 | 5 | control | false |
| 6 | 6 | treatment | true |
| 7 | 7 | treatment | true |
| 8 | 8 | treatment | false |
| 9 | 9 | treatment | true |
| 10 | 10 | treatment | false |
| variant | total_users | conversions | conversion_rate_pct |
|---|---|---|---|
| control | 5 | 2 | 40.00 |
| treatment | 5 | 3 | 60.00 |
Control had 5 users with 2 conversions (rows 2 and 4), giving 40.00%. Treatment had 5 users with 3 conversions (rows 6, 7, and 9), giving 60.00%.