I have a table that looks like this:

```
  ID               AMID           DESC                  value 
  -----------------------------------------------------------------
  100              type A         AMID type A             10
  101              type B         AMID type B             18
  102              type C         AMID type C             34
  101               null            null                   4
  102               null            null                  19
  103              type D         AMID type D              6   
  103              type E            null                  7 

```

The table contains around 6 million rows.

Now I want to have the result like this

```
  ID               AMID           DESC                  value 
  -------------------------------------------------------------
  100              type A         AMID type A             10
  101              type B         AMID type B             18
  102              type C         AMID type C             34
  101              type B         AMID type B              4
  102              type C         AMID type C             19
  103              type D         AMID type D              6   
  103              type E            null                  7

```

It has show the same values when the AMID for ID in both rows are equal are one of it is null, if the AMID is different then leave it like that..

Thanks in advance for the help..

Cheers,

Harish