Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

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 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>