Hi all,

I have to retrive the top n records in each group.
In Oracle I could achieve this easily using partition and rank function.

I need to achieve this same function using postgres.

Thanks in advance.