/*This SQL script uses the Demo database.

  This sample illustrates complex sql statements linking
 4 tables together to come up with a "Sales" information
  table.
*/

SELECT *
FROM
 customer a,
 orders b,
 items c,
 parts d
WHERE
  (a.custno = b.custno) AND 
  (b.orderno = c.orderno) AND 
  (c.partno = d.partno)
ORDER BY
  a.company,
  orderno
