I'm trying to do something like this:
select * from table_a inner join table_b on table_b.fid = table_a.id and table_b.code = @atlas_featureid
I have tried this using QGIS 2.18.16 and QGIS 3.0 but it doesn't seem to work. Am I missing something? Is there another approach to achieve this?
The alternative I could figure is to add a virtual layer without the last condition and symbolize just the ones that match the @atlas_featureid but this layer has about 100 times more features (≈ 300k) and it takes ages to work with it, it's not a viable solution.