I am a PostgreSQL newbie, and I have two tables like this:
Attendees(AttendeeId, Name)Couples(CoupleId, AttendeeIdMan, AttendeeIdLady)
How do I create a view like this?
Attendees_Couple(CoupleId, Name_Man, Name_Lady)
For now, I came out with something like the below, but then I got stuck.
CREATE VIEW Attendees_Couple AS
SELECT a."Name"
FROM "Attendees" a, "Couples" c
WHERE a."AttendeeID" = c."AttendeeIdMan"....
Any hint or help will be appreciated!