I’m trying to read data form 2 different Data Bases but I’m not allowed to use DB Links,
is there another way to achieve this?
I merged 2 results in a Java List but it doesn’t work when i use group by with aggregation functions.

I had an idea but i have questions about it, my idea is select the data from 2 databases into a file then read the file as DB and apply aggregation functions here.

something like this
enter image description here

is there a way to read a file as DB with hibernate?

Thank you