Murex interview question

Java algorithm and sql queries