Automatic Query based on the parent block reference

Could you post the query as text so I can copy it?