Genesys Interview Question

SQL joins scenario based and window functions