In some cases, we may want to build features that reflect the earliest known or most recent information about a characteristic such as charges at first arrest, current employment status, outcome of last inspection, etc.
The built-in postgres aggregate function (e.g., min, max, avg, etc) don't make this possible but first and last aggregates are available through a postgres extension, which can be invoked with an ORDER BY clause in the aggregate call (e.g., LAST(employment_status ORDER BY knowledge_date ASC).
I don't think it would be difficult to implement this here and would be useful, but how do we feel about providing options that rely on postgres extensions rather than built-in functionality?
In some cases, we may want to build features that reflect the earliest known or most recent information about a characteristic such as charges at first arrest, current employment status, outcome of last inspection, etc.
The built-in postgres aggregate function (e.g., min, max, avg, etc) don't make this possible but
first
andlast
aggregates are available through a postgres extension, which can be invoked with anORDER BY
clause in the aggregate call (e.g.,LAST(employment_status ORDER BY knowledge_date ASC)
.I don't think it would be difficult to implement this here and would be useful, but how do we feel about providing options that rely on postgres extensions rather than built-in functionality?