使用 USING
eSymphony 想向最忠诚的客户致谢,并寄送一张礼品卡。您的任务是找出在该公司消费金额最高的客户。
您不确定将运行您查询的人偏好哪种写法,因此决定同时展示您的 SQL 能力:在连接时既使用 USING 子句,也使用 ON。
本练习是课程的一部分
Oracle SQL 入门
交互式实操练习
通过完成这段示例代码来试试这个练习。
-- Select the customer first and last name, and the total amount
SELECT ___, ___, ___
-- Join the Customer and the Invoice tables
FROM Customer c ___
-- Complete the common joining column
ON ___ = ___