how to use max function in query activity | Community
Skip to main content
Level 4
August 20, 2023
Solved

how to use max function in query activity

  • August 20, 2023
  • 1 reply
  • 826 views

hi all, i have data like this,

 

IdStatusDelivery Iddate
1231010015-08-2023
1231020016-08-2023
1231030017-08-2023
1231040018-08-2023
1231050020-08-2023
3461020018-08-2023
3461030019-08-2023

and i need output like this

IdStatusDelivery Iddate
1231050020-08-2023
3461030019-08-2023

so basically my requirement /conditions are

 for each id, i need max of delivery id and last modified date should be on and after 15-08-2023 and should be max of last modified date

 

i need to club all these conditions in adobe campaign query activity

please help me

how can i set query actiivty for this

 

please help me here, tried multiple hit and try but no luck\

 

 

and

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 ParthaSarathy

Hi @shrutii ,

You can achieve your use case using Query and deduplication activity.

 

 

First in Query, create a filtering condition as DATE on or after 15-08-2023 00:00:00 (select date from drop-down calendar)

 

Next in Deduplication activity > edit configuration > targeting dimension: temporary schema >next> select '@id' in identification of duplicate >next>

Duplication method:

Doubles to keep: 1

Method: using an expression

Expression: select 'Delivery ID'

And select 'keep the records with the largest value'

 

Run the workflow.

Now the output of Deduplication activity will satisfy your requirement.

1 reply

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
August 20, 2023

Hi @shrutii ,

You can achieve your use case using Query and deduplication activity.

 

 

First in Query, create a filtering condition as DATE on or after 15-08-2023 00:00:00 (select date from drop-down calendar)

 

Next in Deduplication activity > edit configuration > targeting dimension: temporary schema >next> select '@id' in identification of duplicate >next>

Duplication method:

Doubles to keep: 1

Method: using an expression

Expression: select 'Delivery ID'

And select 'keep the records with the largest value'

 

Run the workflow.

Now the output of Deduplication activity will satisfy your requirement.

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups