i have a query which looks like this

```
select max(mytime), type, id from my table where id = 1
group by id, type

```

This gives me results similar to

```
time              type               id
2018-01-01        green              1
2017-01-03        blue               1
2017-03-03        red                1

```

I want the type to be on the same based on the max value. So it will take the max time of all similar id's in this case '1' and copy that type for all entries. It should look like

```
time              type               id
2018-01-01        green              1
2017-01-03        green              1
2017-03-03        green              1

```