Ok so I have two tables:

**table1:**

```
id, featured_id

```

**table2:**

```
id, assigned_to, media_id

```

The query

```
SELECT * FROM table2 where assigned_to = 1

```

would likely yield multiple rows being returned.

I want to then take a query such as the following:

```
UPDATE table1 (featured_id) (WITH LOWEST media_id FROM table2 WHERE table2.assigned_to = table1.id)

```

I guess for matching the table2.assigned\_to = table1.id I could use `INNER JOIN`. 
But how to populate with lowest value I have no idea perhaps using order by and limit but not sure on syntax. 

Any ideas?