• Yes, a recursive CTE solves this rather nicely:

    ;WITH WGBizTree (bid, bname, wgid, wgname) AS

    -- anchor part

    (SELECT wb.bid, b.name AS bname, wb.wgid, w.name AS wgname

    FROM users_workgroup uw

    INNER JOIN workgroup_bizunit wb ON uw.wgid = wb.wgid

    INNER JOIN bizunit b ON wb.bid = b.id

    INNER JOIN workgroup w ON wb.wgid = w.id

    WHERE uw.uid = @user-id

    UNION ALL

    -- recursive part

    SELECT b.id, b.name AS bname, bt.wgid, w.name AS wgname

    FROM WGBizTree bt

    INNER JOIN bizunit b ON bt.bid = b.parent_id

    INNER JOIN workgroup w ON bt.wgid = w.id)

    SELECT bname, wgname

    FROM WGBizTree

    ORDER BY bname, wgname

    The key is to have an anchor query that gets the business units directly associated to the workgroups that the specified user is in, then join itself back to the bizunit table by parent_id to get the children business units.