BAQ help Getting Last Revision

I’m trying to write a BAQ to tell me if the revision is approved for the Part Number and all the material underneath it.

I’ve been able to find a BAQ to run the Parent P/N with the BOM several levels in. But I can’t figure out how to add in the Approved column (correctly).

Thanks for any help!

The Approved field is found in PartRev table if you add this to your BAQ you can pull it in.

There is an example BAQ attached:

Basically if you have a Inner-Subquery but you do not use it in your Main-SubQuery how can use it in a Calculated field using the {InnerSubQueryName} syntax.