First off, no, this is the right place - and welcome to CP!
SQL has an EXCEPT clause:
EXCEPT and INTERSECT (Transact-SQL)[
^] which removes entries from one query that are present in the other.
So what I'd do is:
1) SELECT all shipments that are completed.
2) SELECT all shipments that are in invoices with uncompleted items.
3) Use EXCEPT to remove everything in 2 from 1.
4) SELECT invoices which contain only items left in 3.
I don't know how complex this is to do with your system - I don't know the data structure - but that should resolve to three selects:
SELECT ... FROM
(SELECT completed
EXCEPT SELECT uncompleted)
With either a JOIN or a WHERE on the outer one depending on your data structure.
Once I'd got it checked damn carefully, it could become a DELETE.