select user_id from acs_users_all where lower(screen_name) = lower(:screen_name)
select user_id from acs_users_all where lower(email) = lower(:email)
select email from parties where party_id = :party_id
select group_id from groups where group_name = :name
select first_names, last_name
from persons
where person_id = :person_id
update persons
set first_names = :first_names,
last_name = :last_name
where person_id = :person_id
update acs_objects
set title = :first_names || ' ' || :last_name
where object_id = :person_id
select distinct first_names||' '||last_name as person_name
from persons, parties
where person_id = party_id
and (party_id = :person_id or email = :email)
select attr_value as bio
from acs_attribute_values
where object_id = :person_id
and attribute_id =
(select attribute_id
from acs_attributes
where object_type = 'person'
and attribute_name = 'bio')
insert into acs_attribute_values
(object_id, attribute_id, attr_value)
values
(:person_id, (select attribute_id
from acs_attributes
where object_type = 'person'
and attribute_name = 'bio'), :bio)
update acs_attribute_values
set attr_value = :bio
where object_id = :person_id
and attribute_id =
(select attribute_id
from acs_attributes
where object_type = 'person'
and attribute_name = 'bio')
update users
set [join $cols ", "]
where user_id = :user_id
select user_id
from users
where lower(username) = lower(:username)
and authority_id =:authority_id
update parties
set [join $cols ", "]
where party_id = :party_id
update acs_objects
set title = :email
where object_id = :party_id
and object_type = 'party'
select party_id
from parties
where lower(email) = lower(:email)
select user_id from users where lower(screen_name) = lower(:screen_name)
select rel_id
from cc_users
where user_id = :user_id
update users
set password_question = :password_question,
password_answer = :password_answer
where user_id = :user_id