Query in join (multiple-table) scenario

Hi all,

I could use some help with the following challenge? I’d like to build code with wixData.query on the “Training_table” on the left and would like to select only the Training_table-records that have planned a start in “October, 2019” in the right “Planning_table”.


I somehow suspect this can be done rather easily but I didn’t succeed so far.
All suggestions are welcome.

Thanks, Marco

I have created some code that actually works,but not sure if this is the best way to do it. So improvements
and suggestions are still very welcome.

Hmm did some further testing. Above code does NOT work. Have found a different solution with two completely independent queries. So one for “training” and one for “planning”. A for loop with some if-then-else determines the intersection of both results.

It works, but doesn’t feel efficient. So I’m still open for better solutions.