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

How to get the latest entry if two or more records found

Avatar

Avatar
Validate 10
Level 2
gunjans6748888
Level 2

Likes

10 likes

Total Posts

38 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 2
gunjans6748888
Level 2

Likes

10 likes

Total Posts

38 posts

Correct Reply

0 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
gunjans6748888
Level 2

23-04-2018

Hi Team,

I am trying to extract App subscription data and want to only extract latest entry if more than one entry found with the same userKey

So, the filter needs to be done on 'registration date' and if entry1 and entry 2 are same, we need to take the latest entry among them.

Thank you.

1472292_pastedImage_1.png

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 50
Employee
Adhiyan
Employee

Likes

239 likes

Total Posts

342 posts

Correct Reply

124 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 100
View profile

Avatar
Boost 50
Employee
Adhiyan
Employee

Likes

239 likes

Total Posts

342 posts

Correct Reply

124 solutions
Top badges earned
Boost 50
Boost 5
Boost 3
Boost 25
Boost 100
View profile
Adhiyan
Employee

25-04-2018

Hi Gunjan,

I can think of a couple of solutions here.

1>.Create a query for pulling all data which has condition userkey is not empty and then deduplicate based on the user key. By default , the deduplication is run on the lastModified field and will only keep the latest records.

2>. If this is for targeting purposes , you can also use an Incremental query which only shows you changed , modified or latest records which were previously not processed

Regards,

Adhiyan

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
Level 3
kapilsharma0101
Level 3

Likes

14 likes

Total Posts

52 posts

Correct Reply

18 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile

Avatar
Validate 1
Level 3
kapilsharma0101
Level 3

Likes

14 likes

Total Posts

52 posts

Correct Reply

18 solutions
Top badges earned
Validate 1
Give Back 5
Give Back 3
Give Back 10
Give Back
View profile
kapilsharma0101
Level 3

24-04-2018

Hi,

You can sort the records on the basis of Registration Date in Descending Order and then you can select the First Record.
This can be achieved either by the JS Activity or you can achieve this by Enrichment itself.

Avatar

Avatar
Validate 1
Level 2
johnf48867289
Level 2

Likes

4 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
johnf48867289
Level 2

Likes

4 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 3
Boost 1
View profile
johnf48867289
Level 2

24-04-2018

Thank you for this response. I was interested in how others approach this, too.

Avatar

Avatar
Boost 5
Level 4
AbdulZa
Level 4

Likes

43 likes

Total Posts

50 posts

Correct Reply

8 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile

Avatar
Boost 5
Level 4
AbdulZa
Level 4

Likes

43 likes

Total Posts

50 posts

Correct Reply

8 solutions
Top badges earned
Boost 5
Boost 3
Boost 25
Boost 10
Boost 1
View profile
AbdulZa
Level 4

24-04-2018

Depending on the DB used the syntax maybe different. You simply need to apply some sort of ranking (rank using subscriber key and order by registration date descending. It is a datetime format so the possibility to pick up records or more for the same subscriber is minimum.

For example, if using SQL Server, you can use the partition by command to do that.