Multiple joins at once

Comments

2 comments

  • Official comment
    Joel Stewart

    Thanks for the question Andy! Both joins will be applied to the data set so yes, the inner join will limit results. Logically, the order of the joins does not matter -- the end result is the same in this case.

    In your example, there are three data sets: Set1, Set2 and Set3. Set1 and Set2 are inner joined on an ID column. Additionally Set2 is outer left joined to Set3 by ID.

    To build a full example, let's suppose this is in your data set which gives us full coverage of all possibilities of combinations of rows:

    Set1 - Animals:
    1, Ant
    3, Cougar
    5, Elephant
    7, Giraffe

    Set2 - RadioWords:
    1, Alpha
    2, Bravo
    3, Charlie
    4, Delta

    Set3 - Food:
    1, Apple
    2, Banana
    5, Egg
    6, Fries

    The expected output should contain the following data after performing your join:
    1, Ant, Alpha, Apple
    3, Cougar, Charlie, [null]

    Hope this helps!

    Comment actions Permalink
  • Andy Varshneya

    Thanks Joel!

    Your explanation makes sense. Let me try it out.

    0
    Comment actions Permalink

Please sign in to leave a comment.