# The query in Step 6 doesn't return correct results

**URL:** <https://discuss.dgraph.io/t/the-query-in-step-6-doesnt-return-correct-results/8305>\
**Category:** Issues\
**Tags:** untagged, tutorial\
**Created:** [October 1, 2019, 6:48pm UTC](https://discuss.dgraph.io/t/the-query-in-step-6-doesnt-return-correct-results/8305 "2019-10-01T18:48:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [October 1, 2019, 6:48pm UTC](https://discuss.dgraph.io/t/the-query-in-step-6-doesnt-return-correct-results/8305/1 "2019-10-01T18:48:25Z")

</div>

**Moved from GitHub [tutorial/102](https://github.com/dgraph-io/tutorial/issues/102)**

_Posted by_ [shekarm](https://github.com/shekarm):

```auto
{
  everyone(func: anyofterms(name, "Michael Amit")) {
    name
    friend {
      name@ru:ko:en
      friend { expand(_all_) { expand(_all_) } }
    }
  }
}

```

The above query does not really select Amit. Since Amit doesn’t have ‘name’ attribute, the results are correct from dgraph’s perspective. But it could be confusing for the reader, who will likely expect Amit and his friends to be selected.

It may be useful to qualify the name with name@. so Amit (who doesn’t have the plain name attribute) would be selected.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [October 1, 2019, 7:20pm UTC](https://discuss.dgraph.io/t/the-query-in-step-6-doesnt-return-correct-results/8305/2 "2019-10-01T19:20:26Z")

</div>

[MichelDiz](https://github.com/MichelDiz) _commented_ :

@shekarm Michael doesn’t have `@en` in the dataset. So we choose one over the other or add name in Amit without tag, or set Michael’s name with `@en` tag.

If I change the query to `anyofterms(name@en, "Michael Amit")`only Amit appears. I’m not sure what was the intentions of who did this part of this tutorial.

I’m ready to do it, but I need to know what decision to take.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [October 1, 2019, 7:35pm UTC](https://discuss.dgraph.io/t/the-query-in-step-6-doesnt-return-correct-results/8305/3 "2019-10-01T19:35:49Z")

</div>

[shekarm](https://github.com/shekarm) _commented_ :

I would suggest that we use a different person other than Amit – someone who has the name attribute defined. This way the reader gets the results that are consistent with his/her understanding. The next tutorial clarifies the name@. concept.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [July 11, 2020, 4:50am UTC](https://discuss.dgraph.io/t/the-query-in-step-6-doesnt-return-correct-results/8305/4 "2020-07-11T04:50:23Z")

</div>


