開始使用免費開始

找出訂單總額

BigQuery 常見的用途之一是建立分析報表,例如從查詢中找出前 10 名的結果,或是在特定時間範圍內的結果。

在這個查詢中,你要使用 ecommerce.ecomm_payments,找出總成本最的 10 筆訂單。

本練習屬於課程

BigQuery 入門

檢視課程

練習說明

  • ecommerce.ecomm_payments 中選出最小的 10 筆訂單,對 payment_value 欄位使用 SUM,並取前 10 筆資料。

動手互動練習

試著完成這個範例程式碼,體驗一下這個練習。

-- Add the correct column and limit values

SELECT
	-- Add the column to calculate the SUM
	order_id, SUM(___)
FROM 
    ecommerce.ecomm_payments
GROUP BY order_id
-- Add the correct column to order
ORDER BY ___
-- Add the correct number of rows to limit
LIMIT ___;
編輯並執行程式碼