SELECT invoice_number "Invoice",
       substr(p.lastname || ', ' || p.firstname,1,25) "Customer",
       substr(pr.description,1,35) "Product",
       oi.quantity "Q",
       oi.quantity * (pr.price * (1 - oi.discount)) "Price"
  FROM order_header oh JOIN person p ON p.id = oh.customer_id
                       JOIN order_item oi USING (invoice_number)
                       JOIN product pr USING (product_id)
/
