Not sure how many levels you have but it would seem simpler to use the existing report "Bill of Material Structure Report GUI" with the option to Include Reference designators.
Failing that maybe that report could be used to derive the SQL you need?
But again take care if you have many nested BOMs.
I'm not sure what you mean by "don't which assembly where supply type is 'Operation Pull' define in BOM."
But again the above report can display the supply types for your components as well allowing you to filter / exclude as required.