Por enquanto, esta lição está em inglês.
Trees and top N
You invited friends, and they invited theirs: that is a tree. Recursive queries walk trees like that in one statement, and LATERAL answers "the top three for each" without any application loops.