For sorting we use order by clause in select statement. This is used to sort data in Ascending order or Descending order. To group the data based on particular column we use group by clause.
Related to database or Oracle.