Sort values that contain letters and symbols in a custom order
问题 Can you change the MySQL sort by function? I am trying to sort my values according to an arbitrary order. Currently looking for ways to inject a function that might help me out here short of adding a column and modifying the import. This is the order I want: AAA AA+ AA AA- A+ A A- BBB+ BBB BBB- BB+ BB BB- B+ B B- CCC+ CCC CCC- CC This is my result using sort by: A A+ A- AA AA+ AA- AAA B B+ B- BB BB+ BB- BBB BBB+ BBB- C CC CCC CCC+ CCC- EDIT: Attempting but getting syntax errors: CREATE