SQL - CTE - Multiple tables - Join - Concatenate.

Common Table Expressions example

1 2 3 4 5 6 7 8 9 4 5 3 2 8 4 2 65 61 21

  Title,

  DateOfBirth

    FROM  Person.Person),

-- ########################## SET TWO ################################

AddressCTE (ID, Addy1, Addy2, City, State, Zip)

AS   (SELECT PersonID,

        AddressLine1,

        AddressLine2,

  City,

  State,

  PostalCode

    FROM  Person.Address),

-- ######################### SET THREE ###############################

IncomeCTE (ID, Income)

AS (SELECT PersonID,

IncomeSourceID