I ended up doing two querys. Never got the left (with the count working) If 
some one has a better alternative I would like to know it. Thanks guys.

log_count=db.auth_event.id.count()

usrs = 
db((db.auth_event.user_id==db.auth_user.id)&(db.auth_event.time_stamp<datetime_start)&(db.auth_event.time_stamp>datetime_end)&(db.auth_event.description.contains('Logged-in'))).select(db.auth_user.ALL,log_count,orderby=~log_count,groupby=db.auth_user.id)
    
active_ids=[usr.auth_user.id for usr in usrs]
        
inactive = db(~db.auth_user.id.belongs(active_ids)).select(db.auth_user.ALL)

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to