title: sql left join for two tables using a CONCAT string as the argument
body: <p>I need to get a title from table 2, table 2 has title and id column.
  Table 1 has some data and three of these columns concatenated together makeup the id that can be found in table 1.</p>
  
  <p>I used CONCAT_WS() function and gave this column an alias name and need to use the Alias for the on argument(At least this is what I understood I needed to do)</p>
  
  <p>I thought this could be a simple left join, yet it is not working for me.</p>
  
  <p>This is my query</p>
  
  <pre><code>SELECT
      table_openers.mail,
      table_openers.f_name,
      table_openers.l_name,
      table_openers.Quality,
      CONCAT_WS('-',
              table_openers.esp,
              table_openers.acc,
              table_openers.group) as 't1aid',
      table_groups.aid,
      table_groups.group_name
  FROM
      lance_mailstats.table_openers
          LEFT JOIN
      lance_mailstats.table_groups ON table_groups.aid = t1aid;
  </code></pre>
  
  <p>I get results for mail, f_name, l_name, Quality and t1aid, but the aid and group_name columns of the second table return null.</p>