I need to write a recursive query with the following conditions...I have a table called 'contracts' that can have 1 to may possible sales people attributed to it...each salesperson belongs to a group(could be same group or different groups)...each salesgroup reports to 1 or 0 other salesgroups...each sales group consists of 1 to many salespeople...if 2 salespeople in group A report to group B and group B reports to group C I need all sales people from the reported to groups as well as the salespeople associated with the sale...I also need each group to break down the contract percentage of sale for each person...the query should return an id and a percentage...Other conditions...the initial sales people may not belong to the same group...
Start Free Trial