When we interact with database records, we specify a criteria with an order(asc or desc) to get the results sorted by a particular field. Usually we sort on the basis of one field but a situation may arise to sort the objects on the basis of two or more fields. Here is a simple example: