是否可以从此 SQL 中删除子查询?我需要按“匹配”分数排序,但显然不能按别名排序。
SELECT *
FROM
(SELECT b.shortDesc,
b.img,
sm.uri,
match(`bodyCopy`, `shortDesc`) against ('Storage' IN NATURAL LANGUAGE MODE WITH QUERY EXPANSION) AS score
FROM `blog` b
JOIN `sitemap` sm ON sm.id = b.pageId
WHERE 'Active' IN (b.status, sm.status)
) t1
WHERE score > 0
ORDER BY score DESC