slice Interview Question

R1 overview: Sql- 80%, Python- 20%