How can I create an query on an existing query? I tried multiple versions.
SELECT * FROM {{q_....}}
does not works
This query pattern doesn't exist in Slate. You can use Partials to reuse parts of query logic across multiple queries or formulate your query logic in a function, but you can't "query" the results of an existing query.
Postgres will use some caching strategies automatically so that if you're running similar queries in succession you'll see some improved performance.