Infosys Interview Question

oops concepts, sql queries