EntityFieldQuery HAVING clause Is there any way I can use having clause with EntityFieldQuery? I want to get the nodes which have same field value similar to HAVING clause in SQL. Or do I need to do other ways? Please suggest if there is any good way to do this.
You could subclass EntityFieldQuery and add a having() method, or (probably quicker) you can add a tag to the query, and use hook_query_TAG_alter() to alter it when it's a standard SelectQuery:

function MYMODULE_query_my_tag_alter(QueryAlterableInterface $query) {
  $query-&gt;having('some_field &gt; :val', array(':val' =&gt; $some_val));
}


To use that with your query:

$query = new \EntityFieldQuery();
$query-&gt;entityCondition('entity_type', 'node')
  -&gt;fieldCondition(...)
  -&gt;addTag('my_tag');