COMPANY PROD ID DATE NAME REQD_DATE
XYZ 12345 AAA111 7/1/2011 PETER
XYZ 12345 PPP222 7/1/2002 JOHN
MNS 67890 ZZZ999 9/1/2005 STEVE
MNS 67890 DDD555 9/1/2012 MARTIN
With reference to this above table say '#temp', Whenever COMPANY AND PROD are same, I want to get the min of date {min(DATE)} into column 'REQD_DATE'
Can someone please help me out here?
Thanks in advance!