title: SQL - Joining tables with no common column
body: <p>New at this so any tips would be appreciated!</p>
  
  <p>I have the following query and the last bit of data I need is to bring in CONTACT.DATUS. The problem is that the CONTACT table has nothing in common (that I know of) with any of the tables I am already using. I can link them by going from tables SO -> CUSTOMER -> CONTACT but I haven't the slightest idea if that is even possible. You can see where I am trying to do this in the last join but clearly this wont work.</p>
  
  <p>Thanks for any help you guys can send my way!</p>
  
  <pre><code>Select DISTINCT
   so.num AS Ref
  , so.shiptoname AS Recipient_Full_Name
  , so.shiptoaddress AS Address_1
  , so.shiptocity AS City
  , stateconst.name AS State
  , so.shiptozip AS Zip
  , so.billtoname AS Buyer_Name
  , contact.datus AS Buyer_Email
  , qbclass.name AS Class
  , carrier.name AS Carrier
  , CAST(soitem.datescheduledfulfillment as date) AS Fulfillment_Date
  From SO
  JOIN stateconst
  ON so.shiptostateid=stateconst.id
  JOIN qbclass
  ON so.qbclassid=qbclass.id
  JOIN soitem
  ON so.id=soitem.soid
  JOIN carrier
  ON so.carrierid=carrier.id
  JOIN contact
  ON so.customerid=customer.id
  ON customer.accountid=contact.accountid
  WHERE CAST(soitem.datescheduledfulfillment as date) = '5/16/16'
  AND qbclass.name&lt;&gt;'C- Online' AND qbclass.name&lt;&gt;'InterCompany'
  </code></pre>