如何将两个SQL查询与不同的ORDER BY子句组合在一起

问题描述:

我在网上看过,但只能找到两个与相同 order by组合的查询.

I looked online, but I could only find two queries combined with the same order by.

第一个查询:

SELECT
  Name
  , Priority
FROM Music
WHERE `Priority` > 0 AND `date` > '2014-10-27 20:04:25'
ORDER BY `Priority` DESC

第二个查询:

SELECT
  Name
  , Priority
FROM Music
WHERE `Priority` = 0 AND `date` > '2014-10-27 20:04:25'
ORDER BY `date`

我需要将第一个查询和第二个查询合并为一个,在其中执行第一个查询,然后执行第二个查询,这给出了完整的列表.

I need to combine the first and the second query into one, where the first query is executed and then the second query is executed giving me a complete list.

不仅是1个查询...优先级都是>或= 0

Is it not just 1 query... Where Priority is both > or = 0

select Name, Priority 
from Music 
where `Priority` >= 0 
AND `date` > '2014-10-27 20:04:25' 
order by `Priority` DESC, `date`