I have a table that looks like this
| Name | Team | Condition1 | Condition2 |
| John | A | 30 | 0 |
| John | A | 15 | 17 |
| John | A | 5 | 0 |
| Bob | A | 5 | 0 |
| Bob | A | 8 | 0 |
| Bob | B | 0 | 45 |
| Bob | B | 26 | 0 |
| Bob | B | 47 | 0 |
I would like to generate 1 or more rows, based on how many of conditions1 to x are satisfied, for each different testing group. A testing group is defined as where the name is the same but the team is different, or where the team is the same but the name is different (or where both change, such as another 3 rows of John with team C). So the first 3 rows are 1 group, The next 2 are another group, and the last 3 are another group. If the first group for example has any row where condition1 isn't 0, then 1 row should be added to that group. If the first group has any row where condition2 isn't 0, then another row should be added to that group. So each group may get an extra 1 or 2 rows.
With these rules, the above table should look like this:
| Name | Team | Condition1 | Condition2 |
| John | A | 30 | 0 |
| John | A | 15 | 17 |
| John | A | 5 | 0 |
| John | A | Null | Null |
| John | A | Null | Null |
| Bob | A | 5 | 0 |
| Bob | A | 8 | 0 |
| Bob | A | Null | Null |
| Bob | B | 0 | 45 |
| Bob | B | 26 | 0 |
| Bob | B | 47 | 0 |
| Bob | B | Null | Null |
| Bob | B | Null | Null |
Any ideas? I know how to get the groupping done, (used sum tool, group by name and group by team, then add record id, then join back to original data by name and group), but not really sure how to do the row testing and generation.