Guardian Life interview question

Encapsulation Inheritance Sql command to find second max element