I have a contact table looks like id type owner_id owner_type value 11 email 21 person [EMAIL PROTECTED] 12 phone 21 person 303-777-8888 13 PO Box 18 business 220 14 cell 21 person 101-202-3344 .........
The reason for such a table is that I get room for any kind of contact info. even future ones. For practical reasons, I need a view from the above to contain only the following info owner_id email phone such that the owner_type = 'person' and column owner_id has no duplications what the sql should be to create such a view? thanks a lot