Expand my Community achievements bar.

SOLVED

Query advanced function

Avatar

Level 2

Hi all,

I want to query profiles that have total purchase of brand X > total purchase of brand Y.
This data comes from a custom table where we only have the brand chosen by the profile and the total purchase. Brand is text type and the total purchase is floating number type.

I tried doing the query using the advanced function but without result.
Is there anyone who can help me?

 

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

unfortunately you can't do an easy direct comparison on this in a single query.

You rather have to:

  • Do a query to determine the profiles
  • Add the purchase table as relations (with a filter / collection config)
  • Add the amount fields as additional data
  • In a following step (e.g. segmentation) you can then compare the values derived before

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

unfortunately you can't do an easy direct comparison on this in a single query.

You rather have to:

  • Do a query to determine the profiles
  • Add the purchase table as relations (with a filter / collection config)
  • Add the amount fields as additional data
  • In a following step (e.g. segmentation) you can then compare the values derived before