title: View to identify grouped values or object
body: <blockquote>
    <p><img src="https://i.stack.imgur.com/fQ5ZI.png" alt="enter image description here"></p>
  </blockquote>
  
  <p>As an example I have 5 objects. An object is the red dots bound together or adjacent to each other. In other words X+1 or X-1 or Y+1 or Y-1.</p>
  
  <p></p>
  
  <blockquote>
    <p><img src="https://i.stack.imgur.com/HujQN.png" alt="enter image description here"></p>
  </blockquote>
  
  <p>I need to create a MS SQL <strong>VIEW</strong> with will contain the first XY coordinate of each object like:<br></p>
  
  <pre><code>    X,Y
  =======
  1.  1,1
  2.  1,8
  3.  4,3
  4.  5,7
  5.  6,5
  </code></pre>
  
  <p>I can't figure out how to group it in a <strong>VIEW</strong> (NOT using stored procedure). Anybody have any idea would be of great help.
  Thanks</p>