4 ms·
But OP says every single time in their post which nicely fits a view as building block for more readable and simpler sql. Their issue seems not a one of filteri
by tluyben2 4y ago
But OP says every single time in their post which nicely fits a view as building block for more readable and simpler sql. Their issue seems not a one of filtering problem.
- wodenokoto 4y agoYou can't build a view that allows you to do that query with an arbitrary function instead of MAX. It's _every single time_ you need to do this kind of trivial querying you have to write this convoluted mess of SQL.
- oedo 4y ago>with an arbitrary function instead of MAX Many systems support user-defined aggregates[0][1] [0] https://www.postgresql.org/docs/current/sql-createaggregate.html https://www.postgresql.org/docs/current/sql-createaggregate.... [1] https://docs.oracle.com/en/database/oracle/oracle-database/21/addci/using-user-defined-aggregate-functions.html https://docs.oracle.com/en/database/oracle/oracle-database/2...