What if you create a new table with a field called "group" and field called product? For each product you would have a group identified. Using your example, Group 1 would include products A,B,C. Group 2 would include product D. Group 3 would include D,E, and F.
Grp Product
1 A
1 B
1 C
2 D
3 E
3 F
3 G
Product could be a primary key. Name the groups anyway you wish, I used 1,2,3 for the sake of brevity.
Relate product in the table above to the product in the table you showed. This should help with the grouping problem.
|