I’ve created a database with two tables: Table1 and Table2.
Table1 Contains the following data:
Account# Account Owner
1 Person1
2 Person2
Table2 Contains:
Account# Date Modified Status
1 5/15/2011 Open
2 4/15/2011 Closed
1 5/21/2011 Pending
2 6/15/2011 Cancelled
Using SQL, how can I merge these two tables so that It will give me the latest status for each account?
This will do it:
Will result in: