I have a project file with many nested layers and would like to query certain layers without having to click on them first. The expression tool however requires me to select the layer I want to query. Is there a way to do an expression like
SELECT FROM "Layername"='Cities' WHERE "CITY"='New York' AND "Pollution" = 'low'?
I dug around a bit and only found the Expressions+ plugin but that didn't help either.
Edit for clarification: I do not want to filter any layers. I want to access data from any layer from anywhere with a query without having to select it from the layer stack first.
Let's say I have the layer "Fields" activated and press the expression button. The current option is that I can use expressions to query the "Fields" layer's data. However I want to look for data from another layer, e.g. "Cities".
I'm looking for a solution that lets me use the current expression tool. I have come up with an idea to solve the problem with python (save current layer name, navigate to layer x, then use the query window, then go back) but before I write that up I wanted to see if there's already something useful (and more elegant).