IBM Interview Question

the interview in java core, OOP ,SOLID ,Spring , sql quires as they asked to write a complex query using joins and aggregation functions