yeah, I believe you need to figure out the rev of the top level part then join PartMtl tabel on the top level part number and top level revision. Then you would add part mtl again to the first part mtl table and join it on the PartMtl.MtlPartNum = PartMtl2.PartNum and then you’d have to get the most current rev. at that point you’d be two levels down into the bom. Left outer join part mtl.
Yash, full disclosure, I am thinking out loud here and haven’t done this in a minute. Start playing with the partmtl table and you’ll see where you need to go.
You will start to get duplicates in your top level query Yash so you just have to play around until you get the results you want. At that point you may want to think about using a subquery or a grouping…