and I was able to get the names using the following query.

TABLE A
FROM #test
FLATTEN regexreplace(regexreplace(filter(file.etags, (f) => startswith(f, "#parent/child/")), "#parent/child/", ""),"/\d+", "") as A

You’re doing some logic on the separate parts of the nested tags, which in my head triggers the thought of splitting it up, and doing that in a different matter. After some fiddling about I ended with this query:

```dataview
TABLE et, p, value, rows.value, sum(rows.value), average(rows.value)
FROM #test
FLATTEN file.etags as et
FLATTEN list(split(et, "/")) as p
FLATTEN number(p[3]) as value
WHERE p[0] = "#parent" AND p[1] = "child"
GROUP BY p[2] as Person
```

This is actually two queries in one, so try it first without the GROUP BY line to see what the values of et, p, and value are before the grouping occurs. Then you can add the GROUP BY line, and see how these values is moved into the rows object, and you can use them for calculations. (You could/should also try it with adding the columns rows.et and rows.et, and maybe even with adding a key column, just to see what’s available)

Amazing query, it is what I was expecting, I just delete some columns and change the average(row.values) to sum/length. In general you give me what I needed, thanks!

TABLE rows.value as Values, sum(rows.value)/length(rows.value) as Average
FROM #test
FLATTEN file.etags as et
FLATTEN list(split(et, "/")) as p
FLATTEN number(p[3]) as value
WHERE p[0] = "#parent" AND p[1] = "child"
GROUP BY p[2] as Person