Skip to main content
Skip table of contents

Metrics cheatsheet

Table of Contents

query_no_agg_1
CODE
{
    "name": "query_no_agg_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
query_no_agg_2
CODE
{
    "name": "query_no_agg_2",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.identifier"
            }
        ]
    }
}

query_no_agg_3

CODE
{
    "name": "query_no_agg_3",
    "type": "metric",
    "content": {
        "type": "function_avg",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
query_no_agg_4
CODE
{
    "name": "query_no_agg_4",
    "type": "metric",
    "content": {
        "type": "function_max",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
query_no_agg_5
CODE
{
    "name": "query_no_agg_5",
    "type": "metric",
    "content": {
        "type": "function_min",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
query_no_agg_6
CODE
{
    "name": "query_no_agg_6",
    "type": "metric",
    "content": {
        "type": "function_stddev_samp",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
aggregate_zsjd_1
CODE
{
    "name": "aggregate_zsjd_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
aggregate_zsjd_2
CODE
{
    "name": "aggregate_zsjd_2",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.store_id"
            }
        ]
    }
}
aggregate_zsjd_3
CODE
{
    "name": "aggregate_zsjd_3",
    "type": "metric",
    "content": {
        "type": "function_count_dist",
        "content": [
            {
                "type": "property",
                "value": "transactions.store_id"
            }
        ]
    }
}
aggregate_zsjd_4
CODE
{
    "name": "aggregate_zsjd_4",
    "type": "metric",
    "content": {
        "type": "function_avg",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
aggregate_zsjd_5
CODE
{
    "name": "aggregate_zsjd_5",
    "type": "metric",
    "content": {
        "type": "function_max",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
aggregate_zsjd_6
CODE
{
    "name": "aggregate_zsjd_6",
    "type": "metric",
    "content": {
        "type": "function_min",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
aggregate_zsjd_7
CODE
{
    "name": "aggregate_zsjd_7",
    "type": "metric",
    "content": {
        "type": "function_stddev_samp",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
aggr_by_null_1
CODE
{
    "name": "aggr_by_null_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "aggregateBy": [
                null
            ]
        }
    }
}
aggr_by_null_2
CODE
{
    "name": "aggr_by_null_2",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.identifier"
            }
        ],
        "options": {
            "aggregateBy": [
                null
            ]
        }
    }
}
aggr_by_null_3
CODE
{
    "name": "aggr_by_null_3",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.store_id"
            }
        ],
        "options": {
            "aggregateBy": [
                null
            ]
        }
    }
}
aggr_by_null_filter_1
CODE
{
    "name": "aggr_by_null_filter_1",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.customer_id"
                    }
                ]
            },
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.customer_id"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        null
                    ]
                }
            }
        ]
    }
}
aggr_by_null_no_granul_1
CODE
{
    "name": "aggr_by_null_no_granul_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "aggregateBy": [
                null
            ]
        }
    }
}
aggr_by_null_no_granul_2
CODE
{
    "name": "aggr_by_null_no_granul_2",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.identifier"
            }
        ],
        "options": {
            "aggregateBy": [
                null
            ]
        }
    }
}
aggr_by_null_no_granul_3
CODE
{
    "name": "aggr_by_null_no_granul_3",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.store_id"
            }
        ],
        "options": {
            "aggregateBy": [
                null
            ]
        }
    }
}
arithm_1
CODE
{
    "name": "arithm_1",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "number",
                "value": 1000.0
            }
        ]
    }
}
arithm_2
CODE
{
    "name": "arithm_2",
    "type": "metric",
    "content": {
        "type": "function_minus",
        "content": [
            {
                "type": "number",
                "value": 625.45
            },
            {
                "type": "function_multiply",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ]
                    },
                    {
                        "type": "number",
                        "value": 1.21
                    }
                ]
            }
        ]
    }
}
arithm_3
CODE
{
    "name": "arithm_3",
    "type": "metric",
    "content": {
        "type": "function_multiply",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "number",
                "value": 1.21
            },
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.store_id"
                    }
                ]
            }
        ]
    }
}
variable_1
CODE
{
    "name": "variable_1",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "variable",
                "value": "number_1000"
            }
        ]
    }
}
variable_2
CODE
{
    "name": "variable_2",
    "type": "metric",
    "content": {
        "type": "function_minus",
        "content": [
            {
                "type": "variable",
                "value": "number_625"
            },
            {
                "type": "function_multiply",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ]
                    },
                    {
                        "type": "variable",
                        "value": "number_121"
                    }
                ]
            }
        ]
    }
}
variable_3
CODE
{
    "name": "variable_3",
    "type": "metric",
    "content": {
        "type": "function_multiply",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "variable",
                "value": "number_121"
            },
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.store_id"
                    }
                ]
            }
        ]
    }
}
round_1
CODE
{
    "name": "round_1",
    "type": "metric",
    "content": {
        "type": "function_round",
        "content": [
            {
                "type": "function_avg",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ],
        "options": {
            "places": 1
        }
    }
}
round_2
CODE
{
    "name": "round_2",
    "type": "metric",
    "content": {
        "type": "function_round",
        "content": [
            {
                "type": "function_avg",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ],
        "options": {
            "places": -2
        }
    }
}
round_3
CODE
{
    "name": "round_3",
    "type": "metric",
    "content": {
        "type": "function_avg",
        "content": [
            {
                "type": "function_round",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "places": 1
                }
            }
        ]
    }
}
round_4
CODE
{
    "name": "round_4",
    "type": "metric",
    "content": {
        "type": "function_round",
        "content": [
            {
                "type": "function_divide",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ]
                    },
                    {
                        "type": "number",
                        "value": 1000.0
                    }
                ]
            }
        ],
        "options": {
            "places": 1
        }
    }
}
round_5
CODE
{
    "name": "round_5",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_round",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ]
                    }
                ],
                "options": {
                    "places": 1
                }
            },
            {
                "type": "number",
                "value": 1000.0
            }
        ]
    }
}
round_property_1
CODE
{
    "name": "round_property_1",
    "type": "metric",
    "content": {
        "type": "function_round",
        "content": [
            {
                "type": "function_divide",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    },
                    {
                        "type": "number",
                        "value": 1000.0
                    }
                ]
            }
        ],
        "options": {
            "places": 1
        }
    }
}
round_property_2
CODE
{
    "name": "round_property_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
round_property_count_1
CODE
{
    "name": "round_property_count_1",
    "type": "metric",
    "content": {
        "type": "function_round",
        "content": [
            {
                "type": "property",
                "value": "customers.lat"
            }
        ],
        "options": {
            "places": 1,
            "filterBy": [
                {
                    "property": "transactions.value",
                    "value": 10,
                    "operator": "gte"
                }
            ]
        }
    }
}
round_property_count_2
CODE
{
    "name": "round_property_count_2",
    "type": "metric",
    "content": {
        "type": "function_round",
        "content": [
            {
                "type": "property",
                "value": "customers.lng"
            }
        ],
        "options": {
            "places": 1,
            "filterBy": [
                {
                    "property": "transactions.value",
                    "value": 10,
                    "operator": "gte"
                }
            ]
        }
    }
}
round_property_count_3
CODE
{
    "name": "round_property_count_3",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
round_property_count_4
CODE
{
    "name": "round_property_count_4",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "customers.identifier"
            }
        ]
    }
}
filter_by_1
CODE
{
    "name": "filter_by_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_in_1
CODE
{
    "name": "filter_by_in_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_extern_property_1
CODE
{
    "name": "filter_by_extern_property_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ]
    }
}
having_just_one_zsjd_1
CODE
{
    "name": "having_just_one_zsjd_1",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        null
                    ],
                    "withoutFilters": [
                        "transactions.store_id"
                    ]
                }
            }
        ]
    }
}
having_percent_turnover_1
CODE
{
    "name": "having_percent_turnover_1",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "number",
                "value": 1000.0
            }
        ]
    }
}
having_percent_turnover_2
CODE
{
    "name": "having_percent_turnover_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                }
            ]
        }
    }
}
having_percent_turnover_3
CODE
{
    "name": "having_percent_turnover_3",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        null
                    ]
                }
            }
        ]
    }
}
local_filter_1
CODE
{
    "name": "local_filter_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                },
                {
                    "property": "transactions.value",
                    "value": 35.2,
                    "operator": "gt"
                }
            ]
        }
    }
}
local_filter_2
CODE
{
    "name": "local_filter_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
without_1
CODE
{
    "name": "without_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
without_2
CODE
{
    "name": "without_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                }
            ]
        }
    }
}
without_3
CODE
{
    "name": "without_3",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "trans*.*_id"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                }
            ]
        }
    }
}
without_all_filters_1
CODE
{
    "name": "without_all_filters_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
without_all_filters_2
CODE
{
    "name": "without_all_filters_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.*"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                },
                {
                    "property": "transactions.value",
                    "value": 35.2,
                    "operator": "gt"
                }
            ]
        }
    }
}
without_from_1
CODE
{
    "name": "without_from_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
without_from_2
CODE
{
    "name": "without_from_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "from:transactions"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                }
            ]
        }
    }
}
without_from_3
CODE
{
    "name": "without_from_3",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "from:customers"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                }
            ]
        }
    }
}
ntile_1
CODE
{
    "name": "ntile_1",
    "type": "metric",
    "content": {
        "type": "function_ntile",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc",
            "buckets": 3
        }
    }
}
ntile_2
CODE
{
    "name": "ntile_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
ntile_filter_by_1
CODE
{
    "name": "ntile_filter_by_1",
    "type": "metric",
    "content": {
        "type": "function_ntile",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc",
            "buckets": 3,
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "value": 11111,
                    "operator": "eq"
                },
                {
                    "property": "transactions.value",
                    "value": 35.2,
                    "operator": "gte"
                }
            ]
        }
    }
}
ntile_filter_by_2
CODE
{
    "name": "ntile_filter_by_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
ntile_partition_by_1
CODE
{
    "name": "ntile_partition_by_1",
    "type": "metric",
    "content": {
        "type": "function_ntile",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc",
            "buckets": 8,
            "partitionBy": [
                "kod_zsj_d"
            ]
        }
    }
}
ntile_partition_by_2
CODE
{
    "name": "ntile_partition_by_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
rank_1
CODE
{
    "name": "rank_1",
    "type": "metric",
    "content": {
        "type": "function_rank",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
rank_2
CODE
{
    "name": "rank_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
rank_partition_by_1
CODE
{
    "name": "rank_partition_by_1",
    "type": "metric",
    "content": {
        "type": "function_rank",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ],
        "options": {
            "partitionBy": [
                "kod_zsj_d"
            ],
            "sort": "desc"
        }
    }
}
rank_partition_by_2
CODE
{
    "name": "rank_partition_by_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
rank_with_filter_1
CODE
{
    "name": "rank_with_filter_1",
    "type": "metric",
    "content": {
        "type": "function_rank",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "withoutFilters": [
                        "*.*"
                    ]
                }
            }
        ],
        "options": {
            "sort": "desc",
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": [
                        100,
                        101
                    ],
                    "operator": "in"
                }
            ]
        }
    }
}
rank_with_filter_2
CODE
{
    "name": "rank_with_filter_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "*.*"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": [
                        100,
                        101
                    ],
                    "operator": "in"
                }
            ]
        }
    }
}
rank_with_filter_3
CODE
{
    "name": "rank_with_filter_3",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
can_2694_1
CODE
{
    "name": "can_2694_1",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "number",
                "value": 1000.0
            }
        ]
    }
}
can_2694_2
CODE
{
    "name": "can_2694_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                }
            ]
        }
    }
}
can_2694_3
CODE
{
    "name": "can_2694_3",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        null
                    ],
                    "withoutFilters": [
                        "zsj_desc.kod_zsj_d"
                    ]
                }
            }
        ]
    }
}
can_2751_1
CODE
{
    "name": "can_2751_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                }
            ]
        }
    }
}
can_2751_2
CODE
{
    "name": "can_2751_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ]
    }
}
can_3062_1
CODE
{
    "name": "can_3062_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "transactions.value",
                    "value": 100,
                    "operator": "gt"
                }
            ]
        },
        "_comment": "match only store=102"
    }
}
can_3062_2
CODE
{
    "name": "can_3062_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "transactions.value",
                    "value": 75,
                    "operator": "gt"
                }
            ]
        },
        "_comment": "match stores=[100,102]"
    }
}
can_3062_3
CODE
{
    "name": "can_3062_3",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "transactions.value",
                    "value": 50,
                    "operator": "gt"
                }
            ]
        },
        "_comment": "match stores=[100,102]"
    }
}
filter_property_in_limit_1
CODE
{
    "name": "filter_property_in_limit_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "zsj_desc.*"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": [
                        100
                    ],
                    "operator": "in"
                },
                {
                    "property": "transactions.store_id",
                    "value": [
                        100,
                        102
                    ],
                    "operator": "in"
                },
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "value": 22222,
                    "operator": "lte"
                }
            ]
        }
    }
}
filter_property_in_limit_2
CODE
{
    "name": "filter_property_in_limit_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": [
                        100,
                        102
                    ],
                    "operator": "in"
                },
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "value": 22222,
                    "operator": "lte"
                }
            ]
        }
    }
}
rank_of_arithm_1
CODE
{
    "name": "rank_of_arithm_1",
    "type": "metric",
    "content": {
        "type": "function_rank",
        "content": [
            {
                "type": "function_divide",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ]
                    },
                    {
                        "type": "function_count",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.identifier"
                            }
                        ]
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
rank_of_arithm_2
CODE
{
    "name": "rank_of_arithm_2",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.identifier"
                    }
                ]
            }
        ]
    }
}
filter_by_attribute_1
CODE
{
    "name": "filter_by_attribute_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ]
    }
}
filter_by_attribute_2
CODE
{
    "name": "filter_by_attribute_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                }
            ]
        }
    }
}
filter_by_attribute_3
CODE
{
    "name": "filter_by_attribute_3",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                }
            ]
        }
    }
}
filter_by_attribute_4
CODE
{
    "name": "filter_by_attribute_4",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            },
                            {
                                "id": "transaction_sum",
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ]
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "transaction_sum",
                                "value": 70,
                                "operator": "gt"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                }
            ]
        }
    }
}
filter_by_attribute_5
CODE
{
    "name": "filter_by_attribute_5",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            },
                            {
                                "id": "transaction_sum",
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "withoutFilters": [
                                        "transactions.store_id"
                                    ]
                                }
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "transaction_sum",
                                "value": 70,
                                "operator": "gt"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                }
            ]
        }
    }
}
filter_by_attribute_variable_1
CODE
{
    "name": "filter_by_attribute_variable_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            },
                            {
                                "id": "transaction_sum",
                                "type": "function_multiply",
                                "content": [
                                    {
                                        "type": "function_sum",
                                        "content": [
                                            {
                                                "type": "property",
                                                "value": "transactions.value"
                                            }
                                        ]
                                    },
                                    {
                                        "type": "variable",
                                        "value": "number_100"
                                    }
                                ]
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "transaction_sum",
                                "value": 700,
                                "operator": "gt"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                }
            ]
        }
    }
}
filter_by_attribute_global_1
CODE
{
    "name": "filter_by_attribute_global_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                },
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            },
                            {
                                "id": "transaction_sum",
                                "type": "function_multiply",
                                "content": [
                                    {
                                        "type": "function_sum",
                                        "content": [
                                            {
                                                "type": "property",
                                                "value": "transactions.value"
                                            }
                                        ]
                                    },
                                    {
                                        "type": "variable",
                                        "value": "number_100"
                                    }
                                ]
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "transaction_sum",
                                "value": 700,
                                "operator": "gt"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                }
            ]
        }
    }
}
filter_by_attribute_combined_1
CODE
{
    "name": "filter_by_attribute_combined_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            }
                        ],
                        "filterBy": [
                            {
                                "property": "transactions.value",
                                "value": 45,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.value",
                    "value": 25,
                    "operator": "gte"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                }
            ]
        }
    }
}
filter_by_attribute_nested_1
CODE
{
    "name": "filter_by_attribute_nested_1",
    "type": "metric",
    "content": {
        "type": "function_multiply",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "withoutFilters": [
                        "transactions.store_id"
                    ],
                    "filterBy": [
                        {
                            "property": "zsj_desc.kod_zsj_d",
                            "query": {
                                "properties": [
                                    {
                                        "id": "kod_zsj_d",
                                        "type": "property",
                                        "value": "zsj_desc.kod_zsj_d"
                                    }
                                ]
                            },
                            "operator": "inAttribute"
                        },
                        {
                            "property": "transactions.value",
                            "value": 50,
                            "operator": "gte"
                        }
                    ]
                }
            },
            {
                "id": "nested_in_attribute",
                "type": "number",
                "value": 13.0
            }
        ]
    }
}
ifnull_1
CODE
{
    "name": "ifnull_1",
    "type": "metric",
    "content": {
        "type": "function_plus",
        "content": [
            {
                "type": "function_ifnull",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 101,
                                    "operator": "eq"
                                }
                            ]
                        }
                    },
                    {
                        "type": "number",
                        "value": 0.0
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "filterBy": [
                        {
                            "property": "transactions.store_id",
                            "value": 102,
                            "operator": "eq"
                        }
                    ]
                }
            }
        ]
    }
}
filter_by_boolean_1
CODE
{
    "name": "filter_by_boolean_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_boolean_nor_1
CODE
{
    "name": "filter_by_boolean_nor_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_boolean_or_and_1
CODE
{
    "name": "filter_by_boolean_or_and_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_boolean_without_filters_1
CODE
{
    "name": "filter_by_boolean_without_filters_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_boolean_without_filters_2
CODE
{
    "name": "filter_by_boolean_without_filters_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "trans*.va*"
            ],
            "filterBy": [
                {
                    "operator": "or",
                    "content": [
                        {
                            "property": "transactions.value",
                            "value": 20,
                            "operator": "lte"
                        },
                        {
                            "property": "transactions.value",
                            "value": 80,
                            "operator": "gte"
                        }
                    ]
                }
            ]
        }
    }
}
having_boolean_1
CODE
{
    "name": "having_boolean_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
having_boolean_two_metrics_1
CODE
{
    "name": "having_boolean_two_metrics_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
having_boolean_two_metrics_2
CODE
{
    "name": "having_boolean_two_metrics_2",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.identifier"
            }
        ]
    }
}
filter_by_boolean_and_attribute_1
CODE
{
    "name": "filter_by_boolean_and_attribute_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "operator": "and",
                    "content": [
                        {
                            "property": "zsj_desc.kod_zsj_d",
                            "query": {
                                "properties": [
                                    {
                                        "id": "kod_zsj_d",
                                        "type": "property",
                                        "value": "zsj_desc.kod_zsj_d"
                                    },
                                    {
                                        "id": "transaction_sum",
                                        "type": "function_sum",
                                        "content": [
                                            {
                                                "type": "property",
                                                "value": "transactions.value"
                                            }
                                        ]
                                    }
                                ],
                                "having": [
                                    {
                                        "propertyId": "transaction_sum",
                                        "value": 120,
                                        "operator": "lte"
                                    }
                                ]
                            },
                            "operator": "inAttribute"
                        },
                        {
                            "property": "zsj_desc.kod_zsj_d",
                            "query": {
                                "properties": [
                                    {
                                        "id": "kod_zsj_d",
                                        "type": "property",
                                        "value": "zsj_desc.kod_zsj_d"
                                    },
                                    {
                                        "id": "transaction_sum",
                                        "type": "function_sum",
                                        "content": [
                                            {
                                                "type": "property",
                                                "value": "transactions.value"
                                            }
                                        ]
                                    }
                                ],
                                "having": [
                                    {
                                        "propertyId": "transaction_sum",
                                        "value": 95,
                                        "operator": "gte"
                                    }
                                ]
                            },
                            "operator": "inAttribute"
                        }
                    ]
                }
            ]
        }
    }
}
filter_by_boolean_or_attribute_1
CODE
{
    "name": "filter_by_boolean_or_attribute_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "operator": "or",
                    "content": [
                        {
                            "property": "zsj_desc.kod_zsj_d",
                            "query": {
                                "properties": [
                                    {
                                        "id": "kod_zsj_d",
                                        "type": "property",
                                        "value": "zsj_desc.kod_zsj_d"
                                    },
                                    {
                                        "id": "transaction_sum",
                                        "type": "function_sum",
                                        "content": [
                                            {
                                                "type": "property",
                                                "value": "transactions.value"
                                            }
                                        ]
                                    }
                                ],
                                "having": [
                                    {
                                        "propertyId": "transaction_sum",
                                        "value": 72,
                                        "operator": "lte"
                                    }
                                ]
                            },
                            "operator": "inAttribute"
                        },
                        {
                            "property": "zsj_desc.kod_zsj_d",
                            "query": {
                                "properties": [
                                    {
                                        "id": "kod_zsj_d",
                                        "type": "property",
                                        "value": "zsj_desc.kod_zsj_d"
                                    },
                                    {
                                        "id": "transaction_sum",
                                        "type": "function_sum",
                                        "content": [
                                            {
                                                "type": "property",
                                                "value": "transactions.value"
                                            }
                                        ]
                                    }
                                ],
                                "having": [
                                    {
                                        "propertyId": "transaction_sum",
                                        "value": 160,
                                        "operator": "gte"
                                    }
                                ]
                            },
                            "operator": "inAttribute"
                        }
                    ]
                }
            ]
        }
    }
}
percentile_1
CODE
{
    "name": "percentile_1",
    "type": "metric",
    "content": {
        "type": "function_percentile",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
percentile_2
CODE
{
    "name": "percentile_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
percentile_arithm_1
CODE
{
    "name": "percentile_arithm_1",
    "type": "metric",
    "content": {
        "type": "function_percentile",
        "content": [
            {
                "type": "function_ifnull",
                "content": [
                    {
                        "type": "function_divide",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ]
                            },
                            {
                                "type": "function_count",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.customer_id"
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "type": "number",
                        "value": 0.0
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
percentile_arithm_2
CODE
{
    "name": "percentile_arithm_2",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.customer_id"
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
percentile_partition_by_1
CODE
{
    "name": "percentile_partition_by_1",
    "type": "metric",
    "content": {
        "type": "function_percentile",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ],
        "options": {
            "partitionBy": [
                "kod_zsj_d"
            ],
            "sort": "desc"
        }
    }
}
percentile_partition_by_2
CODE
{
    "name": "percentile_partition_by_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
percentile_same_values_1
CODE
{
    "name": "percentile_same_values_1",
    "type": "metric",
    "content": {
        "type": "function_percentile",
        "content": [
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.customer_id"
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
percentile_same_values_2
CODE
{
    "name": "percentile_same_values_2",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.customer_id"
            }
        ]
    }
}
accept_filters_1
CODE
{
    "name": "accept_filters_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "acceptFilters": [
                "transactions.*"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                },
                {
                    "property": "transactions.value",
                    "value": 50,
                    "operator": "gte"
                }
            ]
        }
    }
}
accept_filters_2
CODE
{
    "name": "accept_filters_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "acceptFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                },
                {
                    "property": "transactions.value",
                    "value": 50,
                    "operator": "gte"
                }
            ]
        }
    }
}
accept_filters_3
CODE
{
    "name": "accept_filters_3",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "acceptFilters": [
                "customers.*"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                },
                {
                    "property": "transactions.value",
                    "value": 50,
                    "operator": "gte"
                }
            ]
        }
    }
}
accept_without_filters_1
CODE
{
    "name": "accept_without_filters_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "acceptFilters": [
                "transactions.*"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                },
                {
                    "property": "transactions.value",
                    "value": 50,
                    "operator": "gte"
                }
            ]
        }
    }
}
accept_without_filters_2
CODE
{
    "name": "accept_without_filters_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "acceptFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                },
                {
                    "property": "transactions.value",
                    "value": 50,
                    "operator": "gte"
                }
            ]
        }
    }
}
accept_without_filters_3
CODE
{
    "name": "accept_without_filters_3",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "customers.*",
                "transactions.store*"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 100,
                    "operator": "eq"
                },
                {
                    "property": "transactions.value",
                    "value": 50,
                    "operator": "gte"
                }
            ]
        }
    }
}
big_numbers_1
CODE
{
    "name": "big_numbers_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_multiply",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    },
                    {
                        "type": "number",
                        "value": 1.0E9
                    }
                ]
            }
        ]
    }
}
big_numbers_2
CODE
{
    "name": "big_numbers_2",
    "type": "metric",
    "content": {
        "type": "function_multiply",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "number",
                "value": 4.56789123435E9
            }
        ],
        "_comment": "returns the first 12 digits, without decimal part"
    }
}
big_numbers_3
CODE
{
    "name": "big_numbers_3",
    "type": "metric",
    "content": {
        "type": "function_multiply",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "number",
                "value": 6.789123435E7
            }
        ],
        "_comment": "returns the first 12 digits, with decimal part"
    }
}
filter_by_date_1
CODE
{
    "name": "filter_by_date_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_not_in_attribute_1
CODE
{
    "name": "filter_by_not_in_attribute_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            }
                        ]
                    },
                    "operator": "notInAttribute"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "eq"
                }
            ]
        }
    }
}
having_filter_count_by_decimal_1
CODE
{
    "name": "having_filter_count_by_decimal_1",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.identifier"
            }
        ]
    }
}
filter_by_function_1
CODE
{
    "name": "filter_by_function_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_function_today_1
CODE
{
    "name": "filter_by_function_today_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_function_date_trunc_1
CODE
{
    "name": "filter_by_function_date_trunc_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_function_interval_1
CODE
{
    "name": "filter_by_function_interval_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
accept_aggr_by_1
CODE
{
    "name": "accept_aggr_by_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "acceptAggregateBy": [
                "zsj_desc"
            ]
        }
    }
}
accept_aggr_by_2
CODE
{
    "name": "accept_aggr_by_2",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.identifier"
            }
        ],
        "options": {
            "acceptAggregateBy": [
                "zsj*"
            ]
        }
    }
}
accept_aggr_by_3
CODE
{
    "name": "accept_aggr_by_3",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.store_id"
            }
        ],
        "options": {
            "dontAggregateBy": [
                "customers"
            ]
        }
    }
}
accept_aggr_by_null_1
CODE
{
    "name": "accept_aggr_by_null_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "acceptAggregateBy": [
                "zsj_desc",
                null
            ]
        }
    }
}
accept_aggr_by_null_2
CODE
{
    "name": "accept_aggr_by_null_2",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.identifier"
            }
        ],
        "options": {
            "acceptAggregateBy": [
                null
            ]
        }
    }
}
filter_by_attribute_two_filters_nested_1
CODE
{
    "name": "filter_by_attribute_two_filters_nested_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_attribute_two_filters_nested_filters_1
CODE
{
    "name": "filter_by_attribute_two_filters_nested_filters_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_attribute_two_filters_nested_to_metric_1
CODE
{
    "name": "filter_by_attribute_two_filters_nested_to_metric_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            },
                            {
                                "id": "population_where_store_id_ne_101",
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "zsj_desc.population"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "zsj_desc.kod_zsj_d",
                                            "query": {
                                                "properties": [
                                                    {
                                                        "id": "kod_zsj_d",
                                                        "type": "property",
                                                        "value": "zsj_desc.kod_zsj_d"
                                                    },
                                                    {
                                                        "id": "aux_metric",
                                                        "type": "function_count",
                                                        "content": [
                                                            {
                                                                "type": "property",
                                                                "value": "zsj_desc.kod_zsj_d"
                                                            }
                                                        ],
                                                        "options": {
                                                            "withoutFilters": [
                                                                "*.*"
                                                            ],
                                                            "filterBy": [
                                                                {
                                                                    "property": "transactions.store_id",
                                                                    "value": 101,
                                                                    "operator": "eq"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                ]
                                            },
                                            "operator": "inAttribute"
                                        }
                                    ]
                                }
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "population_where_store_id_ne_101",
                                "value": 500,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                }
            ]
        }
    }
}
filter_by_attribute_two_filters_one_skippable_1
CODE
{
    "name": "filter_by_attribute_two_filters_one_skippable_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            },
                            {
                                "id": "population_where_store_id_ne_101",
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "zsj_desc.population"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "zsj_desc.kod_zsj_d",
                                            "query": {
                                                "properties": [
                                                    {
                                                        "id": "kod_zsj_d",
                                                        "type": "property",
                                                        "value": "zsj_desc.kod_zsj_d"
                                                    },
                                                    {
                                                        "id": "aux_metric",
                                                        "type": "function_count",
                                                        "content": [
                                                            {
                                                                "type": "property",
                                                                "value": "zsj_desc.kod_zsj_d"
                                                            }
                                                        ],
                                                        "options": {
                                                            "withoutFilters": [
                                                                "*.*"
                                                            ]
                                                        }
                                                    }
                                                ]
                                            },
                                            "operator": "inAttribute",
                                            "_comment": "this attribute filter shloud be skipped, it has no filters"
                                        }
                                    ]
                                }
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "population_where_store_id_ne_101",
                                "value": 500,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                }
            ]
        }
    }
}
filter_by_attribute_two_filters_flat_1
CODE
{
    "name": "filter_by_attribute_two_filters_flat_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            },
                            {
                                "id": "population_where_store_id_ne_101",
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "zsj_desc.population"
                                    }
                                ],
                                "options": {
                                    "withoutFilters": [
                                        "zsjd_desc.*"
                                    ]
                                }
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "population_where_store_id_ne_101",
                                "value": 500,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            },
                            {
                                "id": "aux_metric",
                                "type": "function_count",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "zsj_desc.kod_zsj_d"
                                    }
                                ],
                                "options": {
                                    "withoutFilters": [
                                        "zsjd_desc.*"
                                    ]
                                }
                            }
                        ],
                        "filterBy": [
                            {
                                "property": "transactions.store_id",
                                "value": 101,
                                "operator": "eq"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                }
            ]
        }
    }
}
skip_in_attribute_filter_1
CODE
{
    "name": "skip_in_attribute_filter_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                }
            ]
        }
    }
}
row_number_zsjd_store_by_revenue_1
CODE
{
    "name": "row_number_zsjd_store_by_revenue_1",
    "type": "metric",
    "content": {
        "type": "function_row_number",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ],
        "options": {
            "partitionBy": [
                "kod_zsj_d"
            ],
            "sort": "desc"
        }
    }
}
row_number_zsjd_store_avg_transaction_1
CODE
{
    "name": "row_number_zsjd_store_avg_transaction_1",
    "type": "metric",
    "content": {
        "type": "function_row_number",
        "content": [
            {
                "type": "function_divide",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.value",
                                    "value": 0,
                                    "operator": "gte"
                                }
                            ]
                        }
                    },
                    {
                        "type": "function_count",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.identifier"
                            }
                        ]
                    }
                ]
            }
        ],
        "options": {
            "partitionBy": [
                "kod_zsj_d"
            ],
            "sort": "desc"
        }
    }
}
row_number_store_by_transaction_count_1
CODE
{
    "name": "row_number_store_by_transaction_count_1",
    "type": "metric",
    "content": {
        "type": "function_row_number",
        "content": [
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.identifier"
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
can_7610_1
CODE
{
    "name": "can_7610_1",
    "type": "metric",
    "content": {
        "type": "function_multiply",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.identifier"
                    }
                ]
            },
            {
                "type": "number",
                "value": 13.467
            }
        ]
    }
}
can_7610_2
CODE
{
    "name": "can_7610_2",
    "type": "metric",
    "content": {
        "type": "function_plus",
        "content": [
            {
                "type": "number",
                "value": 13.467
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.identifier"
                    }
                ]
            }
        ]
    }
}
filter_by_attribute_combined_1
CODE
{
    "name": "filter_by_attribute_combined_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            }
                        ],
                        "filterBy": [
                            {
                                "property": "transactions.value",
                                "value": 45,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.value",
                    "value": 25,
                    "operator": "gte"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                }
            ]
        }
    }
}
filter_by_attribute_combined_cache_1
CODE
{
    "name": "filter_by_attribute_combined_cache_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            }
                        ],
                        "filterBy": [
                            {
                                "property": "transactions.value",
                                "value": 45,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.value",
                    "value": 25,
                    "operator": "gte"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                }
            ]
        }
    }
}
filter_pushdown_1
CODE
{
    "name": "filter_pushdown_1",
    "type": "metric",
    "content": {
        "type": "function_max",
        "content": [
            {
                "type": "property",
                "value": "customers.identifier"
            }
        ]
    }
}
filter_pushdown_2
CODE
{
    "name": "filter_pushdown_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_pushdown_2_1
CODE
{
    "name": "filter_pushdown_2_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "customers.identifier"
            }
        ]
    }
}
filter_pushdown_2_2
CODE
{
    "name": "filter_pushdown_2_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
aggr_by_customer_1
CODE
{
    "name": "aggr_by_customer_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "aggregateBy": [
                "transactions.customer_id"
            ]
        }
    }
}
aggr_by_customer_2
CODE
{
    "name": "aggr_by_customer_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "aggregateBy": [
                "transactions.store_id"
            ]
        }
    }
}
aggr_by_customer_3
CODE
{
    "name": "aggr_by_customer_3",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "aggregateBy": [
                null
            ]
        }
    }
}
aggr_sum_of_max_by_store_1
CODE
{
    "name": "aggr_sum_of_max_by_store_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_max",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        "transactions.store_id"
                    ]
                }
            }
        ]
    }
}
aggr_sum_of_max_by_store_customer_1
CODE
{
    "name": "aggr_sum_of_max_by_store_customer_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_max",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        "transactions.store_id",
                        "transactions.customer_id"
                    ]
                }
            }
        ]
    }
}
aggr_sum_of_max_by_store_filter_1
CODE
{
    "name": "aggr_sum_of_max_by_store_filter_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_max",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        "transactions.store_id",
                        "transactions.customer_id"
                    ],
                    "filterBy": [
                        {
                            "property": "transactions.store_id",
                            "value": 102,
                            "operator": "ne"
                        }
                    ]
                }
            }
        ]
    }
}
aggr_sum_by_store_of_max_by_customer_1
CODE
{
    "name": "aggr_sum_by_store_of_max_by_customer_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_max",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        "transactions.store_id"
                    ]
                }
            }
        ]
    }
}
aggr_sum_of_max_by_zsjd_1
CODE
{
    "name": "aggr_sum_of_max_by_zsjd_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_max",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        "zsj_desc.kod_zsj_d"
                    ]
                }
            }
        ]
    }
}
aggr_sum_of_max_multiply_number_1
CODE
{
    "name": "aggr_sum_of_max_multiply_number_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_multiply",
                "content": [
                    {
                        "type": "number",
                        "value": 1000.0
                    },
                    {
                        "type": "function_max",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
aggr_sum_of_max_multiply_min_1
CODE
{
    "name": "aggr_sum_of_max_multiply_min_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_multiply",
                "content": [
                    {
                        "type": "function_max",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "zsj_desc.kod_zsj_d"
                            ]
                        }
                    },
                    {
                        "type": "function_min",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
aggr_sum_by_customer_of_max_multiply_min_1
CODE
{
    "name": "aggr_sum_by_customer_of_max_multiply_min_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_multiply",
                "content": [
                    {
                        "type": "function_max",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "zsj_desc.kod_zsj_d"
                            ]
                        }
                    },
                    {
                        "type": "function_min",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
aggr_sum_of_max_plus_min_1
CODE
{
    "name": "aggr_sum_of_max_plus_min_1",
    "type": "metric",
    "content": {
        "type": "function_plus",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "function_max",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ]
                        }
                    }
                ]
            },
            {
                "type": "function_min",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ]
    }
}
aggr_sum_by_zsjd_of_max_plus_min_1
CODE
{
    "name": "aggr_sum_by_zsjd_of_max_plus_min_1",
    "type": "metric",
    "content": {
        "type": "function_plus",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "function_max",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ]
                        }
                    }
                ]
            },
            {
                "type": "function_min",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            }
        ]
    }
}
aggr_sum_of_max_without_nested_1
CODE
{
    "name": "aggr_sum_of_max_without_nested_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_max",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        "transactions.store_id"
                    ],
                    "withoutFilters": [
                        "transactions.*"
                    ]
                }
            }
        ]
    }
}
aggr_sum_of_max_accept_aggr_by_1
CODE
{
    "name": "aggr_sum_of_max_accept_aggr_by_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_max",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        "transactions.store_id"
                    ],
                    "acceptAggregateBy": [
                        "transactions"
                    ]
                }
            }
        ]
    }
}
filter_by_attribute_sum_of_max_1
CODE
{
    "name": "filter_by_attribute_sum_of_max_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "zsj_desc.population"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            },
                            {
                                "id": "transaction_sum_max_customer",
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "function_max",
                                        "content": [
                                            {
                                                "type": "property",
                                                "value": "transactions.value"
                                            }
                                        ],
                                        "options": {
                                            "aggregateBy": [
                                                "transactions.customer_id"
                                            ]
                                        }
                                    }
                                ]
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "transaction_sum_max_customer",
                                "value": 65,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "ne"
                }
            ]
        }
    }
}
aggr_max_by_zsjd_of_sum_by_store_1
CODE
{
    "name": "aggr_max_by_zsjd_of_sum_by_store_1",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_max",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ]
                        }
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "function_min",
                        "content": [
                            {
                                "type": "property",
                                "value": "zsj_desc.population"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "zsj_desc.kod_zsj_d"
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
aggr_sum_of_count_by_store_1
CODE
{
    "name": "aggr_sum_of_count_by_store_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.identifier"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        "transactions.store_id"
                    ]
                }
            }
        ]
    }
}
aggr_sum_of_count_dist_by_store_1
CODE
{
    "name": "aggr_sum_of_count_dist_by_store_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "zsj_desc.kod_zsj_d"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        "transactions.customer_id"
                    ]
                }
            }
        ]
    }
}
aggr_count_by_customer_1
CODE
{
    "name": "aggr_count_by_customer_1",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.identifier"
            }
        ],
        "options": {
            "aggregateBy": [
                "transactions.customer_id"
            ]
        }
    }
}
aggr_count_dist_by_customer_1
CODE
{
    "name": "aggr_count_dist_by_customer_1",
    "type": "metric",
    "content": {
        "type": "function_count",
        "content": [
            {
                "type": "property",
                "value": "transactions.processed_at"
            }
        ],
        "options": {
            "aggregateBy": [
                "transactions.customer_id"
            ]
        }
    }
}
can_8477_1
CODE
{
    "name": "can_8477_1",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        null
                    ]
                }
            }
        ]
    }
}
aggr_max_sum_accept_aggregate_by_store_1
CODE
{
    "name": "aggr_max_sum_accept_aggregate_by_store_1",
    "type": "metric",
    "content": {
        "type": "function_max",
        "content": [
            {
                "type": "function_divide",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ]
                        }
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ],
                            "acceptAggregateBy": [
                                "transactions"
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
aggr_max_sum_dont_aggregate_by_store_1
CODE
{
    "name": "aggr_max_sum_dont_aggregate_by_store_1",
    "type": "metric",
    "content": {
        "type": "function_max",
        "content": [
            {
                "type": "function_divide",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ]
                        }
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ],
                            "dontAggregateBy": [
                                "zsj_*"
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
aggr_max_sum_accept_aggregate_all_1
CODE
{
    "name": "aggr_max_sum_accept_aggregate_all_1",
    "type": "metric",
    "content": {
        "type": "function_max",
        "content": [
            {
                "type": "function_divide",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ]
                        }
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ],
                            "acceptAggregateBy": [
                                "*"
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
aggr_max_by_store_by_client_1
CODE
{
    "name": "aggr_max_by_store_by_client_1",
    "type": "metric",
    "content": {
        "type": "function_max",
        "content": [
            {
                "type": "function_divide",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ]
                        }
                    },
                    {
                        "type": "function_count",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.identifier"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "zsj_desc.kod_zsj_d"
                            ],
                            "filterBy": [
                                {
                                    "property": "transactions.customer_id",
                                    "value": 2002,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
aggr_max_sum_accept_aggregate_by_store_one_agg_1
CODE
{
    "name": "aggr_max_sum_accept_aggregate_by_store_one_agg_1",
    "type": "metric",
    "content": {
        "type": "function_max",
        "content": [
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "aggregateBy": [
                        "transactions.store_id"
                    ],
                    "acceptAggregateBy": [
                        "transactions"
                    ]
                }
            }
        ]
    }
}
aggr_max_sum_accept_aggregate_by_store_two_agg_1
CODE
{
    "name": "aggr_max_sum_accept_aggregate_by_store_two_agg_1",
    "type": "metric",
    "content": {
        "type": "function_max",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ],
                            "acceptAggregateBy": [
                                "transactions"
                            ],
                            "filterBy": [
                                {
                                    "property": "zsj_desc.kod_zsj_d",
                                    "value": 11111,
                                    "operator": "eq"
                                }
                            ]
                        }
                    },
                    {
                        "type": "function_min",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "aggregateBy": [
                                "transactions.store_id"
                            ],
                            "acceptAggregateBy": [
                                "transactions"
                            ],
                            "filterBy": [
                                {
                                    "property": "zsj_desc.kod_zsj_d",
                                    "value": 33333,
                                    "operator": "ne"
                                }
                            ]
                        }
                    }
                ]
            }
        ]
    }
}
can_8366_1
CODE
{
    "name": "can_8366_1",
    "type": "metric",
    "content": {
        "type": "function_max",
        "content": [
            {
                "type": "property",
                "value": "customers.identifier"
            }
        ]
    }
}
can_8366_2
CODE
{
    "name": "can_8366_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
one_metric_1
CODE
{
    "name": "one_metric_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
one_metric_two_attrs_1
CODE
{
    "name": "one_metric_two_attrs_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
one_metric_two_primary_keys_1
CODE
{
    "name": "one_metric_two_primary_keys_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_metric_1
CODE
{
    "name": "filter_by_metric_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.processed_at"
            ],
            "filterBy": [
                {
                    "property": "transactions.processed_at",
                    "query": {
                        "properties": [
                            {
                                "id": "max_date",
                                "type": "function_max",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.processed_at"
                                    }
                                ]
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.processed_at",
                    "value": "2015-11-01",
                    "operator": "gte"
                },
                {
                    "property": "transactions.processed_at",
                    "value": "2015-11-07",
                    "operator": "lt"
                }
            ]
        }
    }
}
filter_by_metric_inherit_granularities_1
CODE
{
    "name": "filter_by_metric_inherit_granularities_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.processed_at"
            ],
            "filterBy": [
                {
                    "property": "transactions.processed_at",
                    "query": {
                        "properties": [
                            {
                                "id": "max_date",
                                "type": "function_max",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.processed_at"
                                    }
                                ],
                                "options": {
                                    "acceptAggregateBy": [
                                        "transactions"
                                    ]
                                }
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.processed_at",
                    "value": "2015-11-01",
                    "operator": "gte"
                },
                {
                    "property": "transactions.processed_at",
                    "value": "2015-11-07",
                    "operator": "lt"
                }
            ]
        }
    }
}
filter_by_metric_inherit_granularities_dont_1
CODE
{
    "name": "filter_by_metric_inherit_granularities_dont_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.processed_at"
            ],
            "filterBy": [
                {
                    "property": "transactions.processed_at",
                    "query": {
                        "properties": [
                            {
                                "id": "max_date",
                                "type": "function_max",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.processed_at"
                                    }
                                ],
                                "options": {
                                    "dontAggregateBy": [
                                        "customers"
                                    ]
                                }
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.processed_at",
                    "value": "2015-11-01",
                    "operator": "gte"
                },
                {
                    "property": "transactions.processed_at",
                    "value": "2015-11-07",
                    "operator": "lt"
                }
            ]
        }
    }
}
h3_grid_1
CODE
{
    "name": "h3_grid_1",
    "type": "metric",
    "content": {
        "type": "function_h3_grid",
        "options": {
            "dataset": "customers",
            "resolution": 13
        },
        "content": [
            {
                "type": "property",
                "value": "customers.lng"
            },
            {
                "type": "property",
                "value": "customers.lat"
            }
        ]
    }
}
h3_grid_2
CODE
{
    "name": "h3_grid_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
h3_grid_resultset_1
CODE
{
    "name": "h3_grid_resultset_1",
    "type": "metric",
    "content": {
        "type": "function_h3_grid",
        "options": {
            "dataset": "customers",
            "resolution": 13
        },
        "content": [
            {
                "type": "property",
                "value": "customers.lng"
            },
            {
                "type": "property",
                "value": "customers.lat"
            }
        ]
    }
}
h3_grid_resultset_2
CODE
{
    "name": "h3_grid_resultset_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_function_h3_grid_1
CODE
{
    "name": "filter_by_function_h3_grid_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_function_h3_grid_eq_1
CODE
{
    "name": "filter_by_function_h3_grid_eq_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_attribute_h3_grid_1
CODE
{
    "name": "filter_by_attribute_h3_grid_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_attribute_h3_grid_two_resolutions_1
CODE
{
    "name": "filter_by_attribute_h3_grid_two_resolutions_1",
    "type": "metric",
    "content": {
        "type": "function_h3_grid",
        "options": {
            "dataset": "customers",
            "resolution": 13,
            "filterBy": [
                {
                    "function": {
                        "type": "function_h3_grid",
                        "options": {
                            "dataset": "customers",
                            "resolution": 7
                        },
                        "content": [
                            {
                                "type": "property",
                                "value": "customers.lng"
                            },
                            {
                                "type": "property",
                                "value": "customers.lat"
                            }
                        ]
                    },
                    "query": {
                        "properties": [
                            {
                                "id": "h3_grid",
                                "type": "function_h3_grid",
                                "options": {
                                    "dataset": "customers",
                                    "resolution": 7
                                },
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "customers.lng"
                                    },
                                    {
                                        "type": "property",
                                        "value": "customers.lat"
                                    }
                                ]
                            },
                            {
                                "id": "customers_turnover",
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ]
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "customers_turnover",
                                "value": 200,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                }
            ]
        },
        "content": [
            {
                "type": "property",
                "value": "customers.lng"
            },
            {
                "type": "property",
                "value": "customers.lat"
            }
        ]
    }
}
filter_by_attribute_h3_grid_two_resolutions_2
CODE
{
    "name": "filter_by_attribute_h3_grid_two_resolutions_2",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_attribute_order_1_1
CODE
{
    "name": "filter_by_attribute_order_1_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "eq"
                },
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            }
                        ],
                        "filterBy": [
                            {
                                "property": "transactions.value",
                                "value": 15,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                }
            ]
        }
    }
}
filter_by_attribute_order_2_1
CODE
{
    "name": "filter_by_attribute_order_2_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_attribute_order_inject_inAttribute_1
CODE
{
    "name": "filter_by_attribute_order_inject_inAttribute_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
filter_by_attribute_order_nested_inAttributes_1
CODE
{
    "name": "filter_by_attribute_order_nested_inAttributes_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "filterBy": [
                {
                    "property": "transactions.store_id",
                    "query": {
                        "properties": [
                            {
                                "id": "store_id",
                                "type": "property",
                                "value": "transactions.store_id"
                            },
                            {
                                "id": "store_value",
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ]
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "store_value",
                                "value": 111,
                                "operator": "lte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "customers.identifier",
                    "query": {
                        "properties": [
                            {
                                "id": "customer",
                                "type": "property",
                                "value": "customers.identifier"
                            },
                            {
                                "id": "customer_value",
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ]
                            }
                        ],
                        "having": [
                            {
                                "propertyId": "customer_value",
                                "value": 71.1,
                                "operator": "gt"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                }
            ]
        }
    }
}
filter_by_attribute_order_two_inAttributes_1
CODE
{
    "name": "filter_by_attribute_order_two_inAttributes_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ],
        "options": {
            "withoutFilters": [
                "transactions.store_id"
            ],
            "filterBy": [
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            }
                        ],
                        "filterBy": [
                            {
                                "property": "transactions.value",
                                "value": 42.7,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                },
                {
                    "property": "transactions.store_id",
                    "value": 101,
                    "operator": "eq"
                },
                {
                    "property": "zsj_desc.kod_zsj_d",
                    "query": {
                        "properties": [
                            {
                                "id": "kod_zsj_d",
                                "type": "property",
                                "value": "zsj_desc.kod_zsj_d"
                            }
                        ],
                        "filterBy": [
                            {
                                "property": "transactions.value",
                                "value": 15,
                                "operator": "gte"
                            }
                        ]
                    },
                    "operator": "inAttribute"
                }
            ]
        }
    }
}
percent_of_total_1
CODE
{
    "name": "percent_of_total_1",
    "type": "metric",
    "content": {
        "type": "function_percent_to_total",
        "content": [
            {
                "type": "function_count",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.customer_id"
                    }
                ]
            }
        ]
    }
}
percent_of_total_nested_aggr_1
CODE
{
    "name": "percent_of_total_nested_aggr_1",
    "type": "metric",
    "content": {
        "type": "function_percent_to_total",
        "content": [
            {
                "type": "function_multiply",
                "content": [
                    {
                        "type": "function_count",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.customer_id"
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ]
                    }
                ]
            }
        ]
    }
}
sort_1
CODE
{
    "name": "sort_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
sort_null_1
CODE
{
    "name": "sort_null_1",
    "type": "metric",
    "content": {
        "type": "function_plus",
        "content": [
            {
                "type": "function_ifnull",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 101,
                                    "operator": "eq"
                                }
                            ]
                        }
                    },
                    {
                        "type": "number",
                        "value": 0.0
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "filterBy": [
                        {
                            "property": "transactions.store_id",
                            "value": 102,
                            "operator": "eq"
                        }
                    ]
                }
            }
        ]
    }
}
sort_null_2
CODE
{
    "name": "sort_null_2",
    "type": "metric",
    "content": {
        "type": "function_percentile",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_ifnull",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "transactions.store_id",
                                            "value": 101,
                                            "operator": "eq"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "number",
                                "value": 0.0
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 102,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
sort_null_3
CODE
{
    "name": "sort_null_3",
    "type": "metric",
    "content": {
        "type": "function_rank",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_ifnull",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "transactions.store_id",
                                            "value": 101,
                                            "operator": "eq"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "number",
                                "value": 0.0
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 102,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
sort_null_asc_1
CODE
{
    "name": "sort_null_asc_1",
    "type": "metric",
    "content": {
        "type": "function_plus",
        "content": [
            {
                "type": "function_ifnull",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 101,
                                    "operator": "eq"
                                }
                            ]
                        }
                    },
                    {
                        "type": "number",
                        "value": 0.0
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "filterBy": [
                        {
                            "property": "transactions.store_id",
                            "value": 102,
                            "operator": "eq"
                        }
                    ]
                }
            }
        ]
    }
}
sort_null_asc_2
CODE
{
    "name": "sort_null_asc_2",
    "type": "metric",
    "content": {
        "type": "function_percentile",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_ifnull",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "transactions.store_id",
                                            "value": 101,
                                            "operator": "eq"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "number",
                                "value": 0.0
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 102,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
sort_null_asc_3
CODE
{
    "name": "sort_null_asc_3",
    "type": "metric",
    "content": {
        "type": "function_rank",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_ifnull",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "transactions.store_id",
                                            "value": 101,
                                            "operator": "eq"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "number",
                                "value": 0.0
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 102,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
sort_null_inverse_1
CODE
{
    "name": "sort_null_inverse_1",
    "type": "metric",
    "content": {
        "type": "function_plus",
        "content": [
            {
                "type": "function_ifnull",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 101,
                                    "operator": "eq"
                                }
                            ]
                        }
                    },
                    {
                        "type": "number",
                        "value": 0.0
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "filterBy": [
                        {
                            "property": "transactions.store_id",
                            "value": 102,
                            "operator": "eq"
                        }
                    ]
                }
            }
        ]
    }
}
sort_null_inverse_2
CODE
{
    "name": "sort_null_inverse_2",
    "type": "metric",
    "content": {
        "type": "function_percentile",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_ifnull",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "transactions.store_id",
                                            "value": 101,
                                            "operator": "eq"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "number",
                                "value": 0.0
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 102,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "options": {
            "sort": "asc"
        }
    }
}
sort_null_inverse_3
CODE
{
    "name": "sort_null_inverse_3",
    "type": "metric",
    "content": {
        "type": "function_rank",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_ifnull",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "transactions.store_id",
                                            "value": 101,
                                            "operator": "eq"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "number",
                                "value": 0.0
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 102,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "options": {
            "sort": "asc"
        }
    }
}
sort_external_property_1
CODE
{
    "name": "sort_external_property_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
sort_combined_1
CODE
{
    "name": "sort_combined_1",
    "type": "metric",
    "content": {
        "type": "function_sum",
        "content": [
            {
                "type": "property",
                "value": "transactions.value"
            }
        ]
    }
}
sort_asc_nulls_last_1
CODE
{
    "name": "sort_asc_nulls_last_1",
    "type": "metric",
    "content": {
        "type": "function_plus",
        "content": [
            {
                "type": "function_ifnull",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 101,
                                    "operator": "eq"
                                }
                            ]
                        }
                    },
                    {
                        "type": "number",
                        "value": 0.0
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "filterBy": [
                        {
                            "property": "transactions.store_id",
                            "value": 102,
                            "operator": "eq"
                        }
                    ]
                }
            }
        ]
    }
}
sort_asc_nulls_last_2
CODE
{
    "name": "sort_asc_nulls_last_2",
    "type": "metric",
    "content": {
        "type": "function_percentile",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_ifnull",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "transactions.store_id",
                                            "value": 101,
                                            "operator": "eq"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "number",
                                "value": 0.0
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 102,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
sort_asc_nulls_last_3
CODE
{
    "name": "sort_asc_nulls_last_3",
    "type": "metric",
    "content": {
        "type": "function_rank",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_ifnull",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "transactions.store_id",
                                            "value": 101,
                                            "operator": "eq"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "number",
                                "value": 0.0
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 102,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
sort_asc_nulls_first_1
CODE
{
    "name": "sort_asc_nulls_first_1",
    "type": "metric",
    "content": {
        "type": "function_plus",
        "content": [
            {
                "type": "function_ifnull",
                "content": [
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 101,
                                    "operator": "eq"
                                }
                            ]
                        }
                    },
                    {
                        "type": "number",
                        "value": 0.0
                    }
                ]
            },
            {
                "type": "function_sum",
                "content": [
                    {
                        "type": "property",
                        "value": "transactions.value"
                    }
                ],
                "options": {
                    "filterBy": [
                        {
                            "property": "transactions.store_id",
                            "value": 102,
                            "operator": "eq"
                        }
                    ]
                }
            }
        ]
    }
}
sort_asc_nulls_first_2
CODE
{
    "name": "sort_asc_nulls_first_2",
    "type": "metric",
    "content": {
        "type": "function_percentile",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_ifnull",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "transactions.store_id",
                                            "value": 101,
                                            "operator": "eq"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "number",
                                "value": 0.0
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 102,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
sort_asc_nulls_first_3
CODE
{
    "name": "sort_asc_nulls_first_3",
    "type": "metric",
    "content": {
        "type": "function_rank",
        "content": [
            {
                "type": "function_plus",
                "content": [
                    {
                        "type": "function_ifnull",
                        "content": [
                            {
                                "type": "function_sum",
                                "content": [
                                    {
                                        "type": "property",
                                        "value": "transactions.value"
                                    }
                                ],
                                "options": {
                                    "filterBy": [
                                        {
                                            "property": "transactions.store_id",
                                            "value": 101,
                                            "operator": "eq"
                                        }
                                    ]
                                }
                            },
                            {
                                "type": "number",
                                "value": 0.0
                            }
                        ]
                    },
                    {
                        "type": "function_sum",
                        "content": [
                            {
                                "type": "property",
                                "value": "transactions.value"
                            }
                        ],
                        "options": {
                            "filterBy": [
                                {
                                    "property": "transactions.store_id",
                                    "value": 102,
                                    "operator": "eq"
                                }
                            ]
                        }
                    }
                ]
            }
        ],
        "options": {
            "sort": "desc"
        }
    }
}
expand_metric_1
CODE
{
    "name": "expand_metric_1",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "metric",
                "metric": "/rest/projects/test_query_service/md/metrics?name=turnover_metric"
            },
            {
                "type": "number",
                "value": 1000.0
            }
        ]
    }
}
expand_inattribute_metric_1
CODE
{
    "name": "expand_inattribute_metric_1",
    "type": "metric",
    "content": {
        "type": "function_divide",
        "content": [
            {
                "type": "metric",
                "metric": "/rest/projects/test_query_service/md/metrics?name=turnover_metric"
            },
            {
                "type": "number",
                "value": 1000.0
            }
        ]
    }
}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.