SELECT c.propset_id FROM content c, access_group ag, contact_group cg WHERE c.content_id='1031' AND c.parent_id='100' AND c.display='1' AND (cg.contact_id='2' AND cg.group_id=ag.group_id AND ag.content_id=c.content_id) - 1