title: GROUP_CONCAT from multiple subqueries?
body: <p>I can't seem to figure this out for the life of me :x</p>
  
  <p>I have two tables..</p>
  
  <ul>
  <li>1 = Tag Links </li>
  <li>2 = Tag Data</li>
  </ul>
  
  <p>When I query for a profile, each profile can have multiple entries in the tag links table.
  Once I retrieve the tag links, I want to get the tag text from the tag data table.</p>
  
  <p>I can do this with:
  <code>SELECT * FROM platform.tagWords WHERE tagId IN (SELECT tagId FROM platform.user
  sProfilesTags WHERE userId = 1001)</code></p>
  
  <p>But it goes through each tag (around 50,000) and then checks if it is assigned to the user so that isn't exactly a solution as each query takes 5-8 seconds.</p>
  
  <p>Is there a way to reverse this?</p>
  
  <p>Any tips or advice will be much appreciated.</p>
  
  <p>Thanks in advance!</p>
  
  <p>*update</p>
  
  <p>So I'm trying to give this a stab with a join, but I'm stuck there too :P</p>
  
  <pre><code>SELECT                                                                          
  
    GROUP_CONCAT(tagWords.tagWord SEPARATOR ', ') AS tags,                        
    usersProfiles.*                                                                
  
  FROM platform.users u                                                          
  
  INNER JOIN platform.usersProfilesTags ON usersProfilesTags.userId = u.userId   
  INNER JOIN platform.usersProfiles ON usersProfiles.userId = u.userId           
  INNER JOIN platform.tagWords ON tagWords.tagId = usersProfilesTags.tagId       
  
  WHERE u.userName = 'mattstest'
  </code></pre>