title: How to Dynamically create Expression<Func<>> for count and group by clause
body: <p>I need to create dynamic lambda expression predicate for below query to query in Cosmos DB.</p>
  <pre><code>*select City, COUNT(City) as CityCount FROM Cities where status=&quot;Active&quot;
  group by City*
  </code></pre>
  <p>Earlier I have created for equal operation like this</p>
  <pre><code>var parameter = Expression.Parameter(typeof(T), &quot;t&quot;);
  
  MemberExpression expBody = Expression.Property(parameter, columnName);
  </code></pre>
  <p>But for getting <code>Count</code> and for <code>Group By</code> Clause how to do this.</p>