I have the following table:
Name Type Value
---------------------
mike phone 123
mike address nyc
bob address nj
bob phone 333
I want to have the result like this:
name value value
-------------------
mike nyc 123
bob nj 333
How can I do it?
it is called a self-join. the trick is to use aliases.
The query assumes that each name has an address, but phone numbers are optional.