so with this Person, Company example:
type Person {
name: string
work_for: [Company]
}
type Company {
name: string
work_for: [Person]
}
work_for: [uid] @reverse @count .
name: string @index(fulltext, term) @count .
What would a query to find: All the companies that had any of "John James Sam" with total count of those names per company be constructed? I have tried:
q(func: anyofterms(hashed, "Jame John Sam")){
uid
@groupby work_for{
name
count(uid)
}
}
}```
but that gives the person and the companies they worked for plus the count which is not the company and the number of people with those names that worked for it. Thanks in advance