select t.id, t.date, t.source, t.description, t.amount, r.category_id, r.regex, r.flags, r.source, r.description 
from ${databaseName}.transaction t
inner join ${regexDatabaseName}.regex r on r.id = t.regex_id