title: MYSQL GROUP BY 2 Tables
body: <p>I have 2 tables:</p>
  
  <pre><code>games
  softwares
  </code></pre>
  
  <p>And I have the rows:</p>
  
  <p>games:</p>
  
  <pre><code>id | ref_id | title
   1 |   20   |  nikita
   1 |   18   |  simba
  </code></pre>
  
  <p>softwares:</p>
  
  <pre><code>id | ref_id | title
   1 |   18   |  adware
   1 |   19   |  acdsee
  </code></pre>
  
  <p>Now I want to do a GROUP BY ref_id and get:</p>
  
  <pre><code>20
  18
  19
  </code></pre>