How are these tables related? You have no customers defined that match the customerid values within the invoice table. fiddle