What is the best way to achieve this exclusion matrix via query.
There are fixed number of products in a table and idea is if a product is sold to a customer (represented by row), the other products (columns) may or may not be sold based on the rule matrix below. The aim is to get products code which are allowed to sold for any given sold product code.
ProductCode|MRLSPN|MRLSPPN|MRLSDF|MRLSPDF|LGS|LGP|HOBN|HODF|HVO|HVOF
MRLSPN |No |No |No |No |No |Yes|No |No |No |No
MRLSPPN |No |No |No |No |No |No |No |No |No |No
MRLSDF |No |No |No |No |No |Yes|No |No |No |No
MRLSPDF |No |No |No |No |No |No |No |No |No |No
LGS |No |No |No |No |No |Yes|No |No |No |No
LGP |Yes |No |Yes |No |No |No |No |No |No |No
HOBN |No |No |No |No |Yes|Yes|No |No |No |No
HODF |No |No |No |No |Yes|Yes|No |No |No |No
HVO |Yes |Yes |Yes |Yes |Yes|Yes|Yes |Yes |No |No
HVOF |Yes |Yes |Yes |Yes |Yes|Yes|Yes |Yes |No |No
Ready by row across columns.