

select s.user_id,count(s.*) as num,max(s.completed) as max,u.email  from scopes s left join users u on s.user_id = u.ID   group by s.user_id  having num in (2,4,6,30) AND max < '2014-01-28 16:15:12'


select s.user_id,count(s.*) as num,max(s.completed) as max,u.user_email  from scopes s left join users u on s.user_id = u.ID



select s.user_id,count(s.*), u.user_email, max(s.completed) as max from scopes s left join users u on s.user_id = u.ID
