hello.
I want to achieve some functionality which is available in SQL data stores. I have tried a lot but having a hard time achieving that functionality with elasticsearch.
SQL
SELECT CD_HASH, COUNT(*)
FROM GRW_MAIL_RECEIVER_LIST
GROUP BY CD_HASH
HAVING MAX(TM_RCV) <> MIN(TM_RCV)
/
{
"size": 0,
"aggs":{
"group_by_state":{
"terms": {
"field": "cd_hash.keyword"
}
}
}
}
/
Please help me.. 
