Given the following sample table schema
Customer Table
CustID 1 2 3
Invoice Table
CustID InvoiceID 1 10 1
select CustID from InvoiceTable where InvoiceID in (10,20) group by CustID having COUNT(distinct InvoiceID) = 2