GROUP BY and ORDER BY commands

While writing a query for an aggregate function, it becomes difficult for me to determine which column is right to go with GROUP BY command or ORDER BY command. Please help!

GROUP BY is equivalent to ‘for each’ in the instructions, categorizing data of the same name!

ORDER BY simply orders elements numerically or alphabetically either in an ascending(ASC) or descending(DESC) order!