Could you please advice how can I implement this kind of hierarchy in SQL?
As you can see there is a multiple-parent hierarchy . It is an alternate hierarchy based on the business requirements where an account can have many parents. Ex: Chemical Revenue has Product Revenue and Chemical Contribution as parents.
The problem was solved by implementing the solution posted hier : http://www.bi4all.pt/node/136