I'm trying to see what other SKUs have been purchased if SKU A was purchased.
What I have so far is something like:
Select *
From Test
Where Transaction ID = Sku 'A'
but of course the where statement doesn't work. I don't have the ability to create new tables or anything but I think it should be possible to just do a query? Any help would be appreciated as I'm pulling my hair out here!
Thanks!
Table Name: Test (Original Image):
+ -------------- + --- + ----------------- +
| Transaction ID | SKU | Desired in Output |
+ -------------- + --- + ----------------- +
| 1 | A | Y |
| 1 | B | Y |
| 2 | A | Y |
| 2 | D | Y |
| 3 | F | N |
| 3 | G | N |
+ -------------- + --- + ----------------- +