title: Output Name Field is DIfferent With the Output without Name Field MYSQL
body: <pre><code>SELECT users.id as uid,   projects.id as pid
              FROM users  
              inner join usergroup on usergroup.id = users.user_group
              inner join bookings on bookings.agent_id = users.id 
              inner join units on bookings.unit = units.id
              inner join types on types.id = units.types_id 
              inner join projects on projects.id = types.project_id
              WHERE bookings.status = 'Accepted' AND units.status = 'Sold'
              GROUP BY  pid
  </code></pre>
  
  <p>with the query above, i get the correct and logic output: </p>
  
  <pre><code>pid   |   uid
  1          1
  2          1
  9          12
  10         14
  </code></pre>
  
  <p>then i want to show the user's name, so i added 1 field in query as shown below:</p>
  
  <pre><code>SELECT users.id as uid,  users.f_name, projects.id as pid
              FROM users  
              inner join usergroup on usergroup.id = users.user_group
              inner join bookings on bookings.agent_id = users.id 
              inner join units on bookings.unit = units.id
              inner join types on types.id = units.types_id 
              inner join projects on projects.id = types.project_id
              WHERE bookings.status = 'Accepted' AND units.status = 'Sold'
              GROUP BY  pid
  </code></pre>
  
  <p>but i got a different output for uid:</p>
  
  <pre><code>pid    |    uid
  1            1
  2            1
  9            9
  10           11
  </code></pre>
  
  <p>This is not logic and anyone know why? Let's assume both are correct but why will output different result?</p>