postgresql7.1
select distinct user_id, person__name(user_id) as full_name, email
from parties p, users u,
acs_object_party_privilege_map ppm
where u.user_id = p.party_id
and ppm.object_id = :package_id
and ppm.privilege = 'read'
and ppm.party_id = p.party_id
and not exists (select 1
from ml_mailing_list_user_map mlum where
list_id = :list_id
and subscribed_p = 't'
and p.party_id = mlum.user_id)
order by full_name