Things may have changed but I believe this is what works now, I included the transactionline table as well,
SELECT top 2
Transaction.entity,
Customer.id
from transaction
left join transactionline
on transaction.id=transactionline.transaction
left join customer
on transaction.entity = customer.id