Verification and optimization of SQL query for retrieving clients with active loans. Analysis of correctness, performance, and alternative approaches.