dynamic query

How to write dynamic query in bonita studio bdm?

I have five filter fields in my application home page (dashboard -> where I am showing all the records from h2 DB) now I want to filter the records on these fields basis.
It may require 31 (2^5 -1) queries, some are already provided as default queries.

Isn't there a way to write a dynamic query in "custom queries" or somewhere to get the desired result at UI?