Hybris flexi Search Query Sample:

1. Find Duplicate Product:

select  {code},count({code}) from {product} group by {code} having count({code}) > 1 


2. B2BUnit/Group belongs to User


select distinct {unit.uid},{unit.name},{ct.uid} from { PrincipalGroupRelation as pgrel

join b2bunit as unit on {unit.pk}={pgrel.target}

Join B2Bcustomer as ct ON {ct.pk}={pgrel.source} }

where {pgrel.source} in ({{ select {pk} from {b2bcustomer} where {uid}='example@gmail.com' }})


3.User Belongs to Group/B2Bunit


select distinct {bcustomer.uid} from {

B2BCustomer as bcustomer} where {bcustomer.pk} IN ({{

select distinct {ppgrprel.source} from {b2bunit as unit

JOIN PrincipalGroupRelation as ppgrprel ON {unit:PK}= {ppgrprel:target} }

where {unit.uid}='123456859_PARENT' }})


Reference : https://npatellifejourney.blogspot.com/2020/10/hybris-sap-commerce-cloud-flexi-search.html

Comments

Popular Posts