SELECT post_tile, post_description, aggregate_likes_count,
SELECT comment_ts, comment, u.user, u.profile_pic FROM comments c
INNER join users u on u._id = c._id
WHERE c.post_id = p._id)) as post_comments
FROM posts p
WHERE post_id = 20
If the select statement in the ArrayFromSelect returns multiple columns, this function
will return an array of sub documents. However, if the select statement returned only a single column,
the select statement will return an array with the value of the column from each row returned. A sub document is not created in this case.
This function can be used to perform hierarchical joins.
The select statement inside the ArrayFromSelect must be surrounded with brackets else a syntax error will be thrown.