New answers tagged

0

You can use a recursive CTE to produce a running total of the quantity field and then simply return the MAX value grouped by ComponentId where the ComponentId is not also in ItemId. This eliminates any components that have child components and shows the highest calculated value from the recursive CTE. This should work regardless of how many levels of ...


Top 50 recent answers are included