Accenture Interview Question

Write code in sql and python. Nothing complicated. Only basics