Query assistance

As a new user to dgraph, I’m still getting use to the best way to efficiently query data. I have a need to query whether two predicates are not equal for a given node (for reasons that are not relevant to this question):

<email>: string @index(exact) .
<username>: string @index(exact) .
type User {
   email: string
   username: string
}

In mysql I would use something like this:

select id, email, username from user where email != username;

What would be the dgraph equivalent to produce this list of users?

Something similar to this:

Schema

type User {
	email: string
	username: string
	at: string
	name: string
}

Mutation

{
	"set": [{
			"name": "Simon Cowell",
			"username": "SimonX",
			"email": "simon",
			"at": "itv.com",
			"dgraph.type": "User"
		},
		{
			"name": "Jeremy Clarkson",
			"username": "JeremyCars",
			"email": "jeremy",
			"at": "bbcstudios.com",
			"dgraph.type": "User"
		},
		{
			"name": "Jude Law",
			"username": "judelaw",
			"email": "judelaw",
			"at": "imdb.com",
			"dgraph.type": "User"
		}
	]
}

Query

{
	G as var(func: type(User)) {
		U as username
	}
	query(func: uid(G)) @filter(not eq(email, val(U)) ) {
		test: val(U)
		uid
		name
		username
		email
		at
	}
}

Result (with Var result)

{
  "data": {
    "var": [
      {
        "email": "simon",
        "username": "SimonX"
      },
      {
        "email": "jeremy",
        "username": "JeremyCars"
      },
      {
        "email": "judelaw",
        "username": "judelaw"
      }
    ],
    "query": [
      {
        "test": "SimonX",
        "uid": "0xe30f",
        "name": "Simon Cowell",
        "username": "SimonX",
        "email": "simon",
        "at": "itv.com"
      },
      {
        "test": "JeremyCars",
        "uid": "0xe310",
        "name": "Jeremy Clarkson",
        "username": "JeremyCars",
        "email": "jeremy",
        "at": "bbcstudios.com"
      }
    ]
  }
}

Ah makes sense. After further research I see how this query format opens-up the possibility of some powerful queries. I appreciate your quick response.