id | datacode | datavalue |
---|---|---|
100 | man | Y |
100 | employed | N |
100 | married | Y |
101 | man | N |
101 | employed | Y |
101 | married | Y |
If i had a table like below, is there any function that allows me to have a row that only returns columns the id, man, married where the value of man and married equal its respective datavalue without self joining.
The desired outcome is as follows:
id | man | married |
---|---|---|
100 | Y | Y |
101 | N | Y |