Multi term Filter

Hi,
I searched the forum but could not find a suitable solution.
I have a Collection where payments are stored.
I want to make some statistical calculations.

Total amount,
The most purchased product,
The highest amount,

I have to calculate these results based on variable filters.

Filters:

  • Start and End Date
  • Payment Type
  • Company
  • Person

Date is mandatory for these filters,
Others are optional and can have several filters at once.

For example:

  • Date range
  • Date Range + Payment Type + Company
  • Date Range + Person

I have used FQL with admiration thus far.
But I don’t know exactly how to prepare “Where” queries that we are used to from SQL.

I will be grateful if you could help me :slight_smile:
Thank you

This should help right?

1 Like

Thank you.
It will be very useful for me.

I was thinking about the 3rd method described in this resource, and the other two options were good for my evaluation.

1 Like