# How to return node have specific edges?

**URL:** <https://discuss.dgraph.io/t/how-to-return-node-have-specific-edges/3097>\
**Category:** Dgraph\
**Created:** [August 29, 2018, 8:09am UTC](https://discuss.dgraph.io/t/how-to-return-node-have-specific-edges/3097 "2018-08-29T08:09:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yupengfei](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/yupengfei/32/1095_2.png) [@yupengfei](https://discuss.dgraph.io/u/yupengfei)\
**Post date:** [August 29, 2018, 8:09am UTC](https://discuss.dgraph.io/t/how-to-return-node-have-specific-edges/3097/1 "2018-08-29T08:09:36Z")

</div>

I want to return uid of nodes which has some specific edges, what I want to do is

```auto
{  
    var (func: has(useroplog)) {
        A as uid
        useroplog @filter( ge(OplogOptime,"2018-04-24T00:00:00Z" ) and le(OplogOptime, "2018-04-24T23:59:59Z" ) and ( eq(OplogOptype,"GroupSpaceInfo") or eq(OplogOptype,"SURVEYQUERYBATCH") or eq(OplogOptype, "QuerySignInBatch") or eq(OplogOptype, "QueryCommitBatch"))) {
            B: A
        }
    }
    Final(func: uid(B)) @groupby(MgoUserListUniversityname) {
        count(uid)
    }
}

```

I want get all of A which has connection to specific operation, and group As by properties of A. How can I achieve this?

---

<div class="post-metadata">

**Author:** ![yupengfei](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/yupengfei/32/1095_2.png) [@yupengfei](https://discuss.dgraph.io/u/yupengfei)\
**Post date:** [August 29, 2018, 8:31am UTC](https://discuss.dgraph.io/t/how-to-return-node-have-specific-edges/3097/2 "2018-08-29T08:31:08Z")

</div>

Sorry, I can use @cascade. please close this.

---

<div class="post-metadata">

**Author:** ![BlankRain](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/blankrain/32/1592_2.png) [@BlankRain](https://discuss.dgraph.io/u/BlankRain)\
**Post date:** [September 4, 2018, 12:15pm UTC](https://discuss.dgraph.io/t/how-to-return-node-have-specific-edges/3097/3 "2018-09-04T12:15:32Z")

</div>

😂  
…  
老於~  
哈哈哈
