Limit result for each user

Nebula 2
This pseudo-statement:

(GO FROM userid OVER follow YIELD follow._dst AS following | LIMIT 100) |
GO FROM $-.following OVER post YIELD post.id as postid | LIMIT 3

Problem: The result are limit to 3 - but I would want to limit “3 post per user”.
Is it possible using pipe or only with union?

GROUP BY should be ok. GROUP BY - Nebula Graph Database Manual

case 1, group by $-.following and then collect post. After that, you can limit to 3 results in your client.
case 2, just yield collect(postid)[0] as first, yield collect(postid)[1] as second.

(GO FROM userid OVER follow YIELD follow._dst AS following | LIMIT 100) | \
GO FROM $-.following OVER post YIELD post._dst as postid, $-.following as following_id |  \
GROUP BY $-.following_id yield $-.following_id as following_id, collect($-.postid)[0] as first, collect($-.postid)[1] as second, collect($-.postid)[2] as third

https://docs.nebula-graph.io/2.0.1/3.ngql-guide/3.data-types/6.list/

Thanks for your answer.
Works - but union is much faster.