【发布时间】:2021-10-11 01:03:26
【问题描述】:
我目前在这里遇到了这个问题。我可以知道如何在查询中包含 2 个 ORDER BY 子句,以便我可以通过 DESC 订购 Main_Actor_Payment 和 Supporting_Actor_Payment。有了我现在的条款,我只能订购supporting_actor_payment。有人可以帮我按降序订购它们。非常感谢。
SELECT main_actor.First_Name,
main_actor.Last_Name,
main_actor.Payment_amount AS MAIN_ACTOR_PAYMENT,
supporting_actors.First_Name,
supporting_actors.Last_Name,
supporting_actors.Payment_amount AS SUPPORTING_ACTOR_PAYMENT
FROM main_actor
INNER JOIN supporting_actors USING(MOVIE_ID)
ORDER BY supporting_actors.Payment_amount DESC
【问题讨论】:
-
提供样本数据作为 CREATE TABLE + INSERT INTO(3-5 行)和该数据的所需输出。作为格式化代码和格式化表格,不是截图!
标签: mysql sql sql-order-by