Model N Interview Question

SQL query joins