How do I join results from 2 query

Hi,
I have a table with which I want to join the results from another query.
In the query below project is the table and allTasks is the query which returns a table with columns :project_id & count.
The project table has a column id which I would want to match with project_id column from the allTasks.

select * from project JOIN {{allTasks.data}} as ALL on ALL.project_id=project.id where project.creator_id={{table5.selectedRow.data.id}}

Can you please help me with this. Thanks!

Hi @prsahu! I don’t think most databases will support passing in the whole .data object to the server and properly parse it server side. We do have a “Query JSON w/ SQL” type query for this kind of thing though you’ll need to have all of the results that you want to join loaded into their queryName.data properties locally.

If allTasks.data is a query from the same database, you could do this all within a single SQL query without referencing a {{ }} tag for one of the tables to query.