I have this table :
TABLE Transaction
Trans_ID Name Value Total_Item
100 I1 0.33333333 3
100 I2 0.33333333 3
100 I5 0.33333333 3
200 I2 0.5 2
200 I5 0.5 2
300 I2 0.5 2
300 I3 0.5 2
400 I1 0.33333333 3
400 I2 0.33333333 3
400 I4 0.33333333 3
500 I1 0.5 2
500 I3 0.5 2
600 I2 0.5 2
600 I3 0.5 2
700 I1 0.5 2
700 I3 0.5 2
800 I1 0.25 4
800 I2 0.25 4
800 I3 0.25 4
800 I5 0.25 4
900 I1 0.33333333 3
900 I2 0.33333333 3
900 I3 0.33333333 3
1000 I1 0.2 5
1000 I2 0.2 5
1000 I4 0.2 5
I need to find what transaction containing some item.
EX: 2 item combination
I1 and I2 and keeping only related item value;
Trans_ID Name Value Total_Item
100 I1 0.33333333 3
100 I2 0.33333333 3
400 I1 0.33333333 3
400 I2 0.33333333 3
800 I1 0.25 4
800 I2 0.25 4
900 I1 0.33333333 3
900 I2 0.33333333 3
1000 I1 0.2 5
1000 I2 0.2 5
note that i only show transaction containing both item.
or perhaps 3 item combination
I1,I2 and I3
800 I1 0.25 4
800 I2 0.25 4
800 I3 0.25 4
900 I1 0.33333333 3
900 I2 0.33333333 3
900 I3 0.33333333 3
How do i code that in sql?
i’m working with msaccess)
These will work in Access: