-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
Milestone
Description
I'm looking to do something similar to this... https://stackoverflow.com/questions/6332043/sql-order-by-multiple-values-in-specific-order
Where I already know the specific order to apply before creating the query.
In raw sql this would be written like so...
WHERE
id IN ('a','b','c') ...
ORDER BY
CASE id
WHEN 'a' THEN 3
WHEN 'b' THEN 1
WHEN 'c' THEN 2
END, id