Hi, I am trying to write a query to select some records from our database where the disabled date is greater than the date last paid by employer. In the database there are multiple similar records but the sequence number might be different, ie The sequence number might be 1, 2, 3, 4, etc. I want to choose the record with the largest sequence number. Here is my code, but it does not work.
Any help is much appreciated. Thanks.
SELECT * FROM DATA WHERE DISABLED_DATE > LAST_DAY_EMPL_PAID_DATE GROUP BY MAX(SEQUENCE_NUM)
Any help is much appreciated. Thanks.
SELECT * FROM DATA WHERE DISABLED_DATE > LAST_DAY_EMPL_PAID_DATE GROUP BY MAX(SEQUENCE_NUM)