Hi everyone.
I have a VIEW with fields as follow:
- ID_MEZZO NUMBER(22)
- KM NUMBER (22)
- QUANTITA NUMBER(22)
- DATE_ER DATE
I need to create a view that has, within a certain DATA_ER range:
- an aggregate operator in KM which returns the difference between the last and the first KM value grouped by ID_MEZZO;
- aggregate operator with the sum of the values in the QUANTITA field, grouped by ID_MEZZO.
What is the best approach to make a custom aggregate operator such as this?
I’ve tried with several views, but I encountered difficulties because I need to filter items before doing the actual view.
I’ve tried with a STORED PROCEDURE approach, but I’d like to avoid them.
I’ve tried building a custom page, but I don’t know how to dynamically add columns and values.
I’m trying using jQuery on the view above. This could work, but doesn’t seem to be the best “phpmakerish†approach.
Is there a way to customize the default phpmaker aggregate function?
Regards.