Fractal Interview Question

SQL Queries involving Window functions, Group by, CTEs and writing optimized queries.