How to create mixed search/query from Database + Tag using query or global search?

I am using databases and also i`m using tags. I am trying to find (using global search or using inline query sql) only Items from "notes database" AND tag #active (pages that are part of "notes database" and also has tag #active.) Is it possible? What would be the syntax?

Of course I could just use Database filter and than manually go one by one find all items with the tag #active. But how to do it faster?

    4 Operate
    Andy999 updated this article at 2025-09-08 16:03:53
    Andy999 updated this article at 2025-08-29 18:13:05
    Andy999 updated this article at 2025-08-28 05:19:22
    Andy999 updated this article at 2025-08-28 05:18:36

    Welcome to here!

    Here we can learn from each other how to use SiYuan, give feedback and suggestions, and build SiYuan together.

    Signup About
    Please input reply content ...
    • Andy999
      Author

      There is one way -> click any tag and global search opens -> then click "specify path" and choose Notebook with the database..But this will work only if all sub-docs of the database are in the same folder where the database is.

      
      
      1 Operate
      Andy999 updated this reply at 2025-09-08 16:05:49
    • Andy999
      Author

      Also i find another workaround -> when item/page/doc added to some database i give it a tag (#project for example). Then i can find all pages that have #active and #project (which means that the item is in database "project"). Maybe it will be helpfull for someone.