HirePro interview question

SQL query using join and sub query