SELECT only one record of THE OLDEST OR NEWEST DATA FOR SUBTYPES: 1,2,3,4, 5.

04-26-2023 10:37 AM
Labels (3)
New Contributor

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. 

0 Kudos
0 Replies