How Does Group By Work