Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

how to find the start dates from history - response (7) by Qaisar Aftab Kiani

$
0
0
And If you need the complete record then you can SELECT TBL1.* FROM <<TABLE_NAME>> AS TBL1 INNER JOIN ( SELECT CUSTOMER_ID, MIN(START_DATE) MIN_START_DATE FROM <<TABLE_NAME>> GROUP BY CUSTOMER_ID ) TBL2 ON TBL1.CUSTOMER_ID = TBL2.CUSTOMER_ID AND TBL1.START_DATE = TBL2.MIN_START_DATE  

Viewing all articles
Browse latest Browse all 27759

Trending Articles