postgresql-14-first-last-agg

PostgreSQL extension providing first and last aggregate functions
  https://github.com/wulczer/first_last_agg
  0
  no reviews



First-last-agg is a simple extension providing two aggregate functions, last and first, operating on any element type and returning the last or the first value of the group.

Since by default the ordering inside groups created by a GROUP BY expression is not defined, it is advisable to use an ORDER BY clause inside the aggregate expression (see the aggregate function syntax).