Query some only specific folders/databases

DT Pro - Version 2.9.8:
is it possibly to create a query to search for one or more tags in different (selected) folders which are created on the same database level ?

Example
Group1:
folderA contain file1+file2 --> file2 is tagged “OK”
folderB contain file3+file4 --> file3 is tagged “OK”
folderC contain file5+file6 --> file 6 is tagged “OK”
Group2:

Query:
search/find alle files tagged “OK” in folderA AND folderB

If yes, could a “search” of this type used for creation of an “intelligent folder” ?

Smart groups can search for multiple tags but only within all databases, one database or one group at the moment, therefore the only workaround is to choose the enclosing group but this might return more results.

ok.

Is there a change to get an input field/mask/gui to create flexible & complex queries in a future version of DT ?

What kind of additional queries do you have in mind? Both smart groups and advanced searches are already quite flexible and can contain lots of predicates and compound predicates.

search for Name$"?earch" where "tag=“invoice” AND tag#“warning” located in folder1+folder2 of database1

or similar to the syntax of an sql statement.