title: Creating dynamic view entity in ofbiz
body: <p>I am running a query on a view entity which results in some datasets. The problem is I want to do a group-by on the resultant dataset. To make it clear, the simplified version of my query is something similar to:  </p>
  
  <pre><code>SELECT OBJECT1, OBJECT2 FROM MY_TABLE WHERE OBJECT3=? AND OBJECT4=? GROUP BY OBJECT1.  
  </code></pre>
  
  <p>Here, <code>MY_TABLE</code> is an existing view entity in the system and I am applying some filters to fetch the relevant data. The code looks something like:  </p>
  
  <pre><code>if(UtilValidate.isNotEmpty(productId)) {
                andExprs.add(EntityCondition.makeCondition("productId", productId));
              }
              if( UtilValidate.isNotEmpty(statusId) &amp;&amp; !statusId.equalsIgnoreCase("All")) {
                andExprs.add(EntityCondition.makeCondition("statusId", statusId));
              }
              andExprs.add(EntityCondition.makeCondition(
                          EntityFunction.UPPER_FIELD("issueDate"),
                          EntityOperator.BETWEEN,
                          criteria));
              andExprsList = EntityCondition.makeCondition(andExprs,
                      EntityOperator.AND);
              quoteList = delegator
              .findListIteratorByCondition(dynamicViewForQuotesByProduct,  andExprsList,
                      null, fieldsToSelectForQuotesByProduct, null, null);  
  </code></pre>
  
  <p>My question is how can I <code>group-by</code> the result returned by this <code>findListIteratorByCondition</code>. Thanks in advance!</p>