title: Logical steps to manipulating matrix with SQL
body: <p>I have a data table whereby individuals are assigned to any number of roles  as well as any number of Property codes .  All of this information comes to me in 1 table (first table in the image).</p>
  
  <p>Ultimately I'm trying to manipulate the data in such a way that the resulting table expresses the logic illustrated in the bottom screenshot.</p>
  
  <p>Is this going to be possible via SQL or should I seek another solution?</p>
  
  <p>I assume any solution would involve multiple joins?</p>
  
  <p>Table 1, 2, 3
  <a href="https://i.stack.imgur.com/XF4ya.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XF4ya.jpg" alt="enter image description here"></a></p>
  
  <p>Optimal resultant table:
  <a href="https://i.stack.imgur.com/ISpqI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ISpqI.jpg" alt="enter image description here"></a></p>