结合 WHERE 和 HAVING
您想了解哪些国家为 eSymphony 带来了最多收入。更具体地说,您希望列出总发票金额超过 $100 的国家。有人告知巴黎登记的数据可能有误,因此您决定在分析中排除来自巴黎的发票。
要回答这个问题,您需要同时使用 WHERE 和 HAVING 来筛选数据。
本练习是课程的一部分
Oracle SQL 入门
交互式实操练习
通过完成这段示例代码来试试这个练习。
-- Select the BillingCountry and the total billing amount
SELECT ___, ___(___)
FROM Invoice
-- Group by billing country
___
-- Exclude groups with an invoice amount of more than 100
___