ComeçarComece de graça

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.

Este exercício faz parte do curso

Introduction to BigQuery

Ver curso

Instruções do exercício

  • Select the ten smallest orders from the ecommerce.ecomm_payments using SUM on the payment_value column for the first 10 rows of data.

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

-- 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 ___;
Editar e executar o código