title: SQL Joining multiple tables, columns from 3rd table not showing
body: <p>Hello i've the following SQL query</p>
  
  <pre><code> Select catalogid , numitems, allitems - numitems ignoreditems
          from ( 
          select i.catalogid,
           sum(case when (ocardtype in ('PayPal','Sofort') OR
                          ocardtype in ('mastercard','visa') and
                          odate is not null) then numitems
                          else 0 end) numitems,
           sum(numitems) allitems 
          from orders o
          join oitems i on i.orderid=o.orderid
          join products T1 on T1.catalogid = i.catalogid
          group by i.catalogid
          ) X 
  </code></pre>
  
  <p>in the last join statement table products contains 8 columns and they don't show in the result query, i can only see the columns catalogid, numitems and ignoreditems, so what am i doing wrong, if i have to select those columns in order to make them appear how can i do it with this syntax?</p>