Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select
- userid,
- avg(duration) avg_duration
- from
- sessions x
- where
- exists (
- select 1
- from
- sessions y
- where
- y.userid = x.userid
- and y.id <> x.id
- )
- group by
- userid;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement