If Impala supports GROUP BY, COUNT and HAVING, then you can use the following.
Here we select the records for matching dates and products, then we count how many product_ids we actually found for each transaction on each day, and we take only those results for which we found all 5 product_ids.
SELECT transaction_id, trans_date, COUNT(product_id) as counter
I assume that that you have 3 tables with identical structure, where the first has the data while the two others are empty.
I also assume that the tables or at least table1 has a primary key.
Searching through the Impala SQL documentation, I don't find any window functions, so a ROW_NUMBER() solution is out of the question.
We could use a random function ...