2631. Group By - Explanation

Problem Link