How to obtain total amount of raw materials from BOM Helllo, I am trying to sum all the raw(purchased) material (MATERIAL1, MATERIAL2) for my product. (According to qty_per_assembly) I just generated simple structure of L1 product. It looks like this: What i need to do is to sum the MATERIAL1 and MATERIAL2: MATERIAL1 (8,25kg) goes to part_no L4.1 (1 pcs) and component L4.1 (1 pcs) goes to part_no L3 (16 pcs) that means: 8,25 * 1 * 16 * 1 = 132 kg (level4 * level3 * level2 * level1) MATERIAL2 (0,75kg) goes to part_no L4.2 (2 pcs) and component L4.1 (1 pcs) goes to part_no L3 (16 pcs) that means: 0,75 * 2 * 16 * 1 = 24 kg (level4 * level3 * level2 * level1) How to do it in oracle? Thank in advance. MANUF_STRUCTURE view - basic with data as ( select 'L1' as part_no, 0 as eng_chg_level, '' as alternative_no, 'L2' as component_part, 1 as qty_per_assembly, 'PCS' as print_unit from dual union all select 'L2' as part_no, 0 as eng_chg_level, '' as alternative_no, 'L3' as component_part, 16 as qty_per_assembly, 'PCS' as print_unit from dual union