title: Why is this query (potentially) only returning posts that are questions?
body: <p>I'm trying to write a simple query in <a href="https://data.stackexchange.com/" rel="nofollow noreferrer">Data Explorer</a> to find out the number of answers a user has for a certain tag.  Here's what I have so far (also <a href="https://data.stackexchange.com/stackoverflow/query/147049/upvoted-posts-for-userid-with-certain-tag" rel="nofollow noreferrer">here</a>):</p>
  <pre><code>SELECT Count(*)
  FROM Users u
     JOIN Posts p ON p.owneruserid = u.id
     JOIN PostTags pt ON pt.PostId = p.Id
     JOIN Tags t  ON t.Id = pt.TagId
  WHERE u.Id = ##UserId##
       AND t.TagName IN 
       (
         ##Tag1:string##
       )
  </code></pre>
  <p>The problem is that this is only returning posts that are questions.  I've tried modifying the WHERE clause to:</p>
  <pre><code>WHERE u.ID = ##UserId## AND p.postTypeId = 2 ...
  </code></pre>
  <p>To only return posts that are answers, but it returns a count of 0, which is leading me to believe that my JOINs are only resulting in posts that are questions.  Can anyone see why this is happening, and how to modify this query to show answers as well?</p>
  <p>FYI the ultimate goal is to try to see how many more answers are needed for a tag bronze/silver/gold badge.</p>