I would like to check if a query (filter) is not empty, something like this in PostgreSQL:
select EXISTS(select 1 from tab where tab.name = 'abc')
https://www.postgresql.org/docs/11/functions-subquery.html
My current approach in AQL is:
RETURN LENGTH(for d in tab filter d.name = 'abc' RETURN 1) > 0