How to query document to return parent and child result

Actually I found this thread now which is helpful on this-