in reply to Re^4: Get top N rows in each group with DBIx::Class
in thread Get top N rows in each group with DBIx::Class

Let us know if it works!

BTW, this is a tactic easily used with CTEs, where each CTE is like another step. With good naming (long table names) is can be self-explanatory too.

If you cannot use CTEs, just nest sub-tables. Same difference, though not as clear due to formatting.

  • Comment on Re^5: Get top N rows in each group with DBIx::Class