Hevo Data interview question

regarding oops and sql logic