select calendar_id from calendars where private_p = 'f' and owner_id = :group_id select calendar_id from calendars where private_p = 't' and owner_id = :party_id