Hi all
I have results with different columns and i want to order the data according to different columns under different conditions.
I have four columns: isflagged(T/F), FlaggedAt(Time), createdAt(time),updatedAt(time).
For the rows which have isFlagged as T, i want them at top in result, order by FlaggedAt descending.
and for the rows which have isFlagged as F , want them to be order by createdAt when created is not null otherwise by updatedAt.
How can I acheieve this,
Thanks