LPS-34887 backporting custom sql from LPS-34887
LPS-34887 backporting SOSocialActivityInterpreter fix