oracle8.1.6
select count(*)
from dotlrn_users
where dotlrn_users.type = :type
select count(*)
from acs_rels
where acs_rels.object_id_one = acs.magic_object_id('registered_users')
and not exists (select 1
from acs_rels a, dotlrn_user_types
where a.object_id_one = dotlrn_user_types.group_id
and a.object_id_two = acs_rels.object_id_two)
select count(*)
from persons,
acs_rels,
membership_rels
where acs_rels.object_id_one = acs.magic_object_id('registered_users')
and acs_rels.object_id_two = persons.person_id
and acs_rels.rel_id = membership_rels.rel_id
and membership_rels.member_state = 'banned'