title: Specifying SELECT, then joining with another table
body: <p>I just hit a wall with my SQL query fetching data from my MS SQL Server.</p>
  
  <p>To simplify, say i have one table for sales, and one table for customers. They each have a corresponding userId which i can use to join the tables.</p>
  
  <p>I wish to first <code>SELECT</code> from the sales table where say price is equal to 10, and then join it on the userId, in order to get access to the name and address etc. from the customer table.</p>
  
  <p>In which order should i structure the query? Do i need some sort of subquery or what do i do?</p>
  
  <p>I have tried something like this</p>
  
  <pre><code>SELECT * 
  FROM Sales
  WHERE price = 10
  INNER JOIN Customers
  ON Sales.userId = Customers.userId;
  </code></pre>
  
  <p>Needless to say this is very simplified and not my database schema, yet it explains my problem simply. 
  Any suggestions ? I am at a loss here.</p>