select first_names, last_name, email, url,
coalesce(screen_name,'< none set up >') as screen_name
from cc_users
where user_id=:user_id
select attr_value
from acs_attribute_values
where object_id = :user_id
and attribute_id =
(select attribute_id
from acs_attributes
where object_type = 'person'
and attribute_name = 'bio')
select cr.publish_date, coalesce(cr.title,'your portrait') as portrait_title
from cr_revisions cr, cr_items ci, acs_rels a
where cr.revision_id = ci.live_revision
and ci.item_id = a.object_id_two
and a.object_id_one = :user_id
and a.rel_type = 'user_portrait_rel'