Murex Interview Question

Java algorithm and sql queries