blob: bead5acd5a1ee1e6bc1ebb2f679f1f25bafe676f [file] [log] [blame]
Till Westmannfd733ee2014-07-10 00:57:37 -07001use dataverse TinySocial;
2
3for $user in dataset MugshotUsers
4for $message in dataset MugshotMessages
5where $message.author-id = $user.id
6group by $name := $user.name with $message
7let $avglen := avg(for $m in $message
8 return string-length($m.message))
9order by $avglen desc
10limit 10
11return {
12 "uname" : $name,
13 "msg-length" : $avglen
14};