I am trying to sort a query using ORDER BY, where I need to sort 3 columns one by one. And the third column matters.
For example: if I have 3 columns a, b and c I need to use ORDER BY a, b desc, c = '3' asc, c
What I want to do is the first sort order is a, then b in desc order, then I want the values that have 3 to be sorted, and then the rest of the values that are not 3.
source
share