BNP Paribas Interview Question

C++ basic questions for 10+ years of experience person. SQL find second max.