Hello @Jonas,
Yes this is possible using the Has Items condition, although @JuGa has reported a bug that applies to the Query block → Bug with "has items" visibility condition - #7 by JuGa
While this is being investigated further, you can apply this condition to the Query Template block or any other block inside the Query block.
Cheers,