Select all Messages(Posts & Comments) created between date1-date2(inclusive) by Persons located in country1 or country2, Select the creators (Persons) and the Tags of these Messages.
Split these Persons,Tags and Messages into a 5 level grouping.
1.name of country of Person.
2.month message was created.
3.gender of person.
4.age group of Person, defined as years between person's birthday and end of simulation (2013-01-01),divided by 5,rounded down.
5. name of tag attached to message.
Considering only those groups where number of messages greater than 100.
Can someone help me in writing it as Elasticsearch query?