I have 1 aggregate with multiple static sorts that have been applied. What will be the answer?
1] aggregate, it is sorted based on "CreationDate". What would happen on adding another sort condition on "Name" attribute?
Initial 2 options are invalid, I believe option "c" is the correct, please confirm.
Hello,
When you have multiple sorts first sort will get applied. and then on he rows which cannot be sorted based on the first sort, they will get sorted with the second sort, and so on. That is why "C" is correct for me.
Thanks,
Neha
Option C is the correct answer.
For records with the same value in the 'Created Date' attribute will be sorted based on 'Name' attribute.
This process will be continued if you apply any 3rd sorting condition, it will get applied on the result of 1st and 2nd sort.
Also refer Link
Hope this helps.
Regards,
Anees
Hey @Pradip Chavhan
Priority will always be given to the first sort criteria defined. The aggregate will make sure to sort first by Creation date after that the next sort criteria will be used only if 2 or more records have same creation date.
In this you will see that no sorting via Name if there is a different creation date
Please refer the below eg
Date Name01/02/24 AAA01/02/24 ABB01/02/24 ACC02/02/24 CCC03/02/24 BBB
IN the first 3 records the sort for name is maintained as they have same name and there record creation date is same, but if record creation date is different no sort order wrt Name column will be entertained.
Thanks Shlok
I appreciate, confirming the response.
In the Aggregate, we can consider many columns in sort criteria. Sorting would be done on the basis of Sort Column Order. Just think a simple example that there is one Student Table and having the First Name and Last Name Column. Now, we want to sort the student by First Name and Last Name. In Aggregate, sorting order we need to provide first column as First Name and second one will be the Last Name.