how does a group by work in sql. There are any references about how does a group by work in sql in here. you can look below.