Finding order total value
A common use case for BigQuery is creating analytical reports, such as finding the top 10 results from a query or results within a certain timespan.
For this query, you will find the 10 smallest orders by total cost using the ecommerce.ecomm_payments
.
Diese Übung ist Teil des Kurses
Introduction to BigQuery
Anleitung zur Übung
- Select the ten smallest orders from the
ecommerce.ecomm_payments
usingSUM
on thepayment_value
column for the first 10 rows of data.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
-- 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 ___;