GROUP BY clause is used to aggregate records by the specified columns which allows you to perform aggregation functions on non-grouped columns
(such as COUNT, AVG, SUM, etc). Whereas, ORDER BY clause is used to alter the order in which items are returned.
Try this:
TABLE:
ID NAME
1 Peter
2 John
3 Greg
4 Peter
SELECT *
FROM TABLE
ORDER BY NAME
=
3 Greg
2 John
1 Peter
4 Peter
SELECT Count(ID), NAME
FROM TABLE
GROUP BY NAME
=
1 Greg
1 John
2 Peter
SELECT NAME
FROM TABLE
GROUP BY NAME
HAVING Count(ID) > 1
=
Peter