title: MYSQL Inner Join returning duplicate results ( Already Using DISTINCT )
body: <p>I have the following query: </p>
  
  <pre><code>SELECT DISTINCT * FROM group_members
  INNER JOIN groups ON groups.group_id = group_members.group_id
  WHERE group_members.user_id = *1* OR groups.created_by = *1*
  </code></pre>
  
  <p>However when it executes I get the following results: </p>
  
  <pre><code>Test - user 1
  Test - user 2
  </code></pre>
  
  <p>But I want </p>
  
  <pre><code>Test - user 1, user 2
  </code></pre>
  
  <p><strong>I can't seem to understand how to modify my query to produce this. Would anyone have an idea?</strong></p>
  
  <p><strong>In essence, I am trying to query for all the groups the user has either created or is part of</strong></p>
  
  <p>Groups Schema: </p>
  
  <ul>
  <li>group_id (primary key)</li>
  <li>group_name</li>
  <li>group_description</li>
  <li>created_by</li>
  <li>group_creation_date</li>
  </ul>
  
  <p>Group_Members Schema</p>
  
  <ul>
  <li>member_id (primary key)</li>
  <li>group_id (foreign key)</li>
  <li>user_id (foreign key - users table)</li>
  <li>date_added</li>
  </ul>