title: mysql inner join on multiple select statements
body: <p>Trying to do an inner join on two composite tables, having trouble with the syntax. Here's what I have:</p>
  
  <p><code>
  SELECT
  count(*)
  FROM
  (
     SELECT DISTINCT seller FROM Items, Users WHERE Items.seller = Users.userID t1
     INNER JOIN
     (
        SELECT DISTINCT UserID FROM Bids, Users WHERE Bids.UserID = Users.userID
     )
     t2 ON t1.userID = t2.userID
  )
  </code></p>
  
  <p>I'm guessing it has something to do with the parantheses/lack of as/or whatever. I guess what I'm really asking here is how to give my subqueries aliases, but not using as in the FROM part. Is it valid just to have t1 after User.userID and identify that whole table as t1?</p>