答案 0 :(得分:0)
使用psydo列尝试此解决方案
SELECT `feedback component`,
feedback,
`feedback component` = 'Comments' AS Filter
FROM table
ORDER BY Filter
如果ORDER BY Filter
不能直接使用
答案 1 :(得分:0)
SELECT feedback_component, feedback
FROM table
WHERE feedback > 0
UNION ALL
SELECT feedback_component, feedback
FROM table
WHERE concat('',feedback * 1) != feedback;
希望它能满足您的要求
答案 2 :(得分:0)
由于您的组件名称是固定的,并且似乎没有任何其他方式来逻辑排序行(不是按字母顺序排列,没有提供定义顺序的其他列)我不会看到除了定义顺序的case语句之外,还有其他任何方法:
SELECT `Feedback Component`,
`Feedback`
FROM YourTable /* Fill in these bits with your names */
ORDER BY CASE `Feedback Component`
WHEN 'Clarity of session objectives' THEN 1
WHEN 'Questions answered clearly and completely' THEN 2
WHEN 'Trainers knowledge level' THEN 3
WHEN 'Usefulness of session to your work' THEN 4
WHEN 'Overall session rating' THEN 5
WHEN 'Comments' THEN 6
END