the query structure: helper-select in "with" clause - selects most recent entry using \'top 1 transaction_date\'. then does many joins. It takes too much time to r