Saviynt Interview Question

SQL question based on joins, group by and having