Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Selecting the first of several customer references

thomash82948276
Level 3
Level 3

Within my data a customer can have numerous activity IDs assigned to them.  They're assigned a new ID for each activity that they complete on our website.

Each activity ID has an activity date/time attached to it.  How can I add an activity ID as Additional Data within an enrichment that is the first activity ID of any given day?

Furthermore, a customer is also given an IdentityID

So the data would look like this.  How would I add only ActivityID 011d to the data within the workflow?

IdentityID
ActivityID
Activity Date Time
123011d03/13/19,12:00AM
123012s03/13/19,12:01AM
123013o03/13/19,12:02AM
123014pi03/13/19,12:03AM
123015uj03/13/19,12:04AM
123016mq03/13/19,12:05AM
123017hjk03/13/19,12:06AM
123018upo03/13/19,12:07AM
1 Accepted Solution
wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

Select min(@identityId), min(@activityId), min(@activityDate) and then group by DateOnly(@activityDate).

NB this assumes @activityID is monotonically increasing.

Thanks,

-Jon

View solution in original post

1 Reply
wodnicki
Correct answer by
Community Advisor
Community Advisor

Hi,

Select min(@identityId), min(@activityId), min(@activityDate) and then group by DateOnly(@activityDate).

NB this assumes @activityID is monotonically increasing.

Thanks,

-Jon

View solution in original post