I have 2 tables like this one
name | fNatId | mNatId
=======================
Smith | 1 | 1
Doe | 1 | 0
Owen | 0 | 2
and this one
id | countryName
================
0 | U.S.
1 | U.K.
2 | Canada
And I want to translate the first table into this
Name | Father's Nationality | Mother's Nationality
=====================================================
Smith | U.K. | U.K.
Doe | U.K. | U.S.
Owen | U.S. | Canada
How do I do this? Using two LEFT JOIN
's throws Not unique table/alias
error. Using only one would match both the columns into either father's or mother's.