FIS interview question

Oops concept and sql queries