fixed aggregation equalTo and simplified and or nesting