BOM baq

,

This might get you close:

Indented BOM SQL Query - ERP 10 - Epicor User Help Forum (epiusers.help)