Is there anyway to Use Group by function in AEP Segment builder | Community
Skip to main content
New Participant
December 4, 2023
Solved

Is there anyway to Use Group by function in AEP Segment builder

  • December 4, 2023
  • 2 replies
  • 1128 views

We have a scenario where we want to filter all those customer profiles in AEP based on comparison of an attribute(Not on Primary key) between different events present for those profiles.

This can be done through SQL group by function however we want to achieve through AEP segment is there way to accomplish?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arpan-garg

Hi @gajendrahs1 - This requirement seems to be a complex one and not achievable via segmentation. I will recommend you to run a scheduled query with this logic and later add a custom attribute on a profile with the required result. Later you can create segmentation using the custom attribute.

 

Thanks,

Arpan

2 replies

arijitg
Employee
December 4, 2023

Hi @gajendrahs1 

 

Please refer to the below documentation if it helps -->

Segment Builder UI Guide | Adobe Experience Platform

 

Regards,

Arijit Ghosh

nnakirikanti
New Participant
December 4, 2023

@gajendrahs1 Please do elaborate more on the requirement before providing recommendation.

New Participant
December 5, 2023

@nnakirikanti 

 

Membership schema (Record class)

Attribute : EID which is Primary key

 

Event class schema Attributes:

Claim number (not a primary key)

fill date 

days supply

claim status (value can be eligible or ineligible)

 

Note : Every profile can have multiple claim events at the same time with eligible or ineligible status and claim number can be different or same

 

Requirement : Need to create segment with following conditions

1.We need latest events with claim status as eligible.

2. If we have multiple events with different claim numbers then we have to look for only those events with claim number which has latest claim status as eligible

3. fill date should be 10 to 20 days ago

4. Days supply should be 30 to 45 days range

For example : 

EIDclaim numberclaim statusdays supplyfill datesegment qualification
123101eligible1535Yes
123101Ineligible1535No
123102eligible1535Yes
123103eligible1535Yes
123102Ineligible1535Yes (It qualified because of claim number 103 being still eligible and meeting criteria days supply and fill date)

 

arpan-garg
arpan-gargAccepted solution
New Participant
December 9, 2023

Hi @gajendrahs1 - This requirement seems to be a complex one and not achievable via segmentation. I will recommend you to run a scheduled query with this logic and later add a custom attribute on a profile with the required result. Later you can create segmentation using the custom attribute.

 

Thanks,

Arpan