EPAM Systems interview question

Implement thread safe singleton pattern, review sql query