title: querydsl group by and sum of a column for each group
body: <p>I have a query that i use to filter and get sum of a column for each group in the dev tool.</p>
  <pre class="lang-json prettyprint-override"><code>GET readers/_search
      {
          &quot;size&quot;: 0,
          &quot;aggs&quot;: {
              &quot;usr_agg&quot;: {
                  &quot;terms&quot;: {
                      &quot;field&quot;: &quot;assetType.keyword&quot;
                  },
                  &quot;aggs&quot;: {
                      &quot;by_device_os&quot;: {
                          &quot;sum&quot;: {
                              &quot;field&quot;: &quot;count&quot;
                          }
                      }
                  }
              }
          }
      }
  </code></pre>
  <p>how can i apply this as a <strong>filter to get this as a table?</strong></p>