title: SQL How do I query a many-to-many relationship
body: <p>How do I select posts that contain a specific tag if there is a many-to-many relationship between posts and tags?</p>
  <p>The problem I am having is that because of the where <code>tag.name = 'xxx'</code>, only that tag is selected. I want to select all posts that have the tag specified, together with all of their tags, e.g.,</p>
  <pre><code>Post 1 -&gt; tag1, tag2
  Post 2 -&gt; tag1, tag3
  Post 3 -&gt; tag2, tag3
  </code></pre>
  <p>Currently what I get is:</p>
  <pre><code>Post 1 -&gt; tag2 // missing tag1
  Post 3 -&gt; tag2 // missing tag3 
  </code></pre>