To collapse those after the append, you just need to use | stats list(*) as * by common_field but you need to have that common field. In your first search, the lookup is named lookup_vazia, but in the append it's lookup_editada. If you make the field name the same in both cases and rename the first count to something else, so it will not conflict with the second count and do the stats above. Note that list(*) will only produce 100 rows max per lookup - if you use values, it will sort each multi-value field, so the time, user and namespace fields will not correlate. If you need to handle that, I suggest you combine those 3 fields into a single field in the append and then user values(*) so you will get all values.
... View more