---
# System prepended metadata

title: Untitled

---

## Replies per thread

```
match 
    (u:User {id:$id})-[r:CREATED]->(s:Signal)-[:INITIATED]-(t:Thread)
match 
    (u1:User)-[:CREATED]-(s1:Signal)-[:IN_THREAD]-(t)
where not 
    id(u) = id(u1)
with 
    count(distinct(t)) as threads,
    count(distinct(s1)) as replies
with
    threads,
    replies,
    replies / tofloat(threads)  as avg_replies
return 
    {
        avg_replies: avg_replies
    
    }
```