Given this SQL Input Table
GroupId Item
1 Fish
1 FishBowl
2 Fish
3 Fish
How Can i derive this Output?
Item IsInGroup1 IsInGroup2 IsInGroup3
Fish Y Y Y
FishBowl Y N N
Please note that the Number of Groups can be variable