I have few subtypes of services that were installed at different times with a lot of duplicates. How do I select only one data the oldest (or newest) for each subtype:
I have used: INSERVICEDATE < date '2022-12-02 00:00:00' AND SUBTYPECD =1 but I get too many records.