Convert following into native query

First, please read Formatting code and log snippets in posts and edit you aggregation so it is easier to read.

Second, what do you mean by native query? As it is, for me, the aggregation is json and is as native as can be. Other forms would be driver and language specific.