Redash 4.0.1

I need to query 2 different mysql sources and then post process the results finding which from the first data source do not exist in the second

So I tried :

query_1 :

select id1 from table_1

which produces 10 results (1 … 10)

query_2 :

select id2 from table_2

which produces 9 results , (1 … 9)

Query Results query :

select a.id1 from query_1 a left join query_2 b on b.id2=a.id1 where b.id2 is null

in this case I get 0 results an I expect to get 1
(10 should be returned as existing in query_1 and not existing in query_2 results )

I remember reading that RIGHT JOIN is not supported with Query Results Data Source but LEFT JOIN and JOIN are …
Is that correct ?
If so what am I missing ?

The Query Results data source uses SQLite engine to run the queries, so whatever JOIN types it supports, our data source supports.

I would make sure that the ID column in both queries is of the same type (string vs. int for example).

1 Like

It appeared that SQLIte mandates using : LEFT OUTER JOIN instead of mysql syntax LEFT JOIN

1 Like