"Query JSON with SQL" - can I reference/join more than one table?

Hello! I have the following query:

SELECT
A.columnone,
B. columntwo

FROM {{formatDataAsArray(query_READ.data)}} A

LEFT JOIN table B on B.id = A.id

When I run it, I get error "Cannot read properties of undefined (reading 'tables')". Is it not possible to treat {{formatDataAsArray(query_READ.data)}} as a regular table? Is there a better solution? I would like to run query_READ once when I load my app and then reuse the data from it in different tables without re-running the query (for speed purpose).

@Irina Check out this doc....
Also, not sure but if your 'table B' is data already in a component you may have to put it in {{}}, or if your trying to call a table in the db, probably not.
Here is what I tried:

SELECT
B.*
FROM {{table13.data}} A
LEFT JOIN {{table6.data}} B on B.id = A.id

table 6 is a replica of table 13 but I removed the first row from table 6 for testing.

table 13
Screenshot 2023-05-17 at 10.40.05 AM

and the result is something like the following (I used *), but can use the column name as needed.
Screenshot 2023-05-17 at 10.40.52 AM