Need multiple group by and sum of one filed

Hi
i have write query according to this mysql query.. please suggest :slight_smile=>
select t.operator_time,t.name_country,t.name_operator,t.name_ads_publisher,t.name_campaign,SUM(t.campaign_price),t.currency_code
AS gross_revenue from traffic_042018 t group by date(t.operator_time),
t.id_partner, t.id_ads_publisher, t.id_campaign, t.id_operator

Hey,

you should look at aggregations https://www.elastic.co/guide/en/elasticsearch/reference/6.3/search-aggregations.html - but that sometimes you need to change your document structure compared to SQL database to achieve what you want. You should try indexing some documents into Elasticsearch and then go from there.

Hi spinsale ,
Thank you for response, but please suggest what kind of agg will be help for me.. and query structure..

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.