title: SQL query to select rows based on condition
body: <pre><code>SELECT
      MNo, X, Y, Z
  FROM
      Coord C
      JOIN Result R ON R.ResultID = C.ResultID
      JOIN Member M ON M.MemberID = R.MemberID
  WHERE
      M.StdID = @stdID
  GROUP BY
      MNo
  </code></pre>
  
  <p>I have a query witch gives me x-, y- and z-coordinates for every Member represented by MNo. Some Members can have more than one row of coordinates, and I would like to get the mean of those coordinates (and only those), like</p>
  
  <pre>
  MNo     x       y       z
  15      10.6    12.3    20.1
  16      11.1    17.8    14.0
  </pre>
  
  <p>omitting Members 1-14 and 17- with only one row of coordinates. How can I do this?</p>