I'm attempting to update a table with a dollar amount based on the earliest datetime field from another table. For example:

```
Table 1
ID|INITIAL_ANNUAL_RATE_AMT|
1 | NULL (I want to update this to 25.02)

Table 2
ID|ANNUAL_RATE_AMT|STARTING_DATE|
1 |25.01          |1/1/2014
1 |25.02          |1/1/2013

```

I've got a query like this that retreives the earliest date from table 2 and the corresponding objects ID:

```
select ID,
         MIN(t2.STARTING_DATE) as EARLIEST_START_DATE
  from t2
  group by t2.ID

```

But how can I leverage this into an update statement that sets the `INITIAL_ANNUAL_RATE_AMT` in table 1 to the earliest corresponding value in table 2?

Something like this (which currently fails):

```
update t1
set t1.Initial_Annual_Rate__c = t3.ANNUAL_RATE_AMT
from t1, t2
left join
 (select t2.ID
         MIN(t2.STARTING_DATE) as EARLIEST_START_DATE
  from t2
  group by t2.DEAL_ID)
     as t3 ON (t3.DEAL_ID = t1.DEAL_ID)

```