title: Group_Concat and Inner Join
body: <p>I have a query that I wrote but trying to refer to another table in the <code>group_concat()</code> function and not quite sure how to do it.  Have tried quite a few ways and only get errors.</p>
  
  <p>Here is the working query:</p>
  
  <pre><code>SELECT StyleID, 
         StyleName, 
         ItemID, 
         Sizes, 
         Prices, 
         Stock, 
         OtherDetails,
        (SELECT GROUP_CONCAT(DISTINCT Styles.ItemID ORDER BY Styles.ItemID SEPARATOR '|')
         FROM Styles) ItemList 
  FROM Styles 
  ORDER BY ItemID ASC
  </code></pre>
  
  <p>ItemList comes back with the desired result:</p>
  
  <pre><code>9|13|14|16|17
  </code></pre>
  
  <p>What I want to do is to have the name that comes with the id returned that is in another table (Categories) like:</p>
  
  <pre><code>9~T-Shirts|13~Tanks....etc.
  </code></pre>
  
  <p>Any help would be great.</p>