A little confused about when to use which for a simple join by key.
given a document like this:
What is the difference between the 2 queries, and which is preferred?
select a, (select b from b use keys a.b) from a use keys 'key'
select a, b from a use keys 'key' join b on keys a.b
First query become correlated subquery. So each outer row subquery is evaluated. If a.b is array the subquery results can be array by doing  you are only selecting first element.
a.b is array of n elements join query produces n documents i.e. a joins with each b . You can also have WHERE clause with predicate between a and b.