I have a table called ABC where I have many columns including ABC_ID, ABC_BGN_DT, ABC_END_DT. Now this ABC_ID is a foreign key in my another table ABC_YER. This table contains values for that ABC_ID beginning from ABC_BGN_DT to ABC_END_DT(one year in each table).
Now I want to query this second table(ABC_YER) for any duplicates/not matching(ABC_BGN_DT to ABC_END_DT) for a particular ABC_ID.
Also I need to query the same table(ABC_YER) if the first row begin date is not matching with the ABC_BGN_DT of ABC for a particular ABC_ID.