Confusing use of cte ,inner join and union all
<p>I am confused about the use of inner join on the CTE here. what is in a as appears in the inner join at the end and what is in cte1 c?</p>

<pre><code>WITH cte1 AS
      (SELECT id,geographyname,
              OriginalGoals,                
          ParentGeographyname,
          0 AS HierarchyLevel,
          paradigm
   FROM businessobject_RefinementMaster
   WHERE Id = @Geo
     UNION ALL
     SELECT a.id,
            a.geographyname,
            a.OriginalGoals,                
            a.ParentGeographyName,
            HierarchyLevel-1 AS HierarchyLevel,
            a.paradigm
     FROM businessobject_RefinementMaster a
     INNER JOIN cte1 c ON c.ParentGeographyname = a.geographyname
     AND c.paradigm=a.paradigm )
</code></pre>

<p>what will be the result of this query?</p>