I have a some query that returns a table "code_1"(id - distinct).
|---------------------|------------------|
| id | status |
|---------------------|------------------|
| 1 | true |
|---------------------|------------------|
| 2 | true |
|---------------------|------------------|
| 3 | false |
|---------------------|------------------|
| 3 | true |
|---------------------|------------------|
| 4 | false |
|---------------------|------------------|
Based on the data .. I want to get the following table ("code_2")
|---------------------|------------------|
| id | status |
|---------------------|------------------|
| 1 | include |
|---------------------|------------------|
| 2 | include |
|---------------------|------------------|
| 3 | partial |
|---------------------|------------------|
| 4 | exclude |
|---------------------|------------------|
if the id is repeated status is partial, else status = status from code_1 table