Perform optimizations in BigQuery
So far in this chapter, you have learned several methods to query data in BigQuery that make the most of the architecture of BigQuery. In this set of exercises, you will put those concepts into practice while optimizing a query. Imagine that you have been tasked to write a query for your finance department that provides information about the number of customers using payment plans over the last 90 days. The report will show:
- The number of customers using a payment plan
- Grouped by the number of payment installments
- The average payment per installment for each group
This exercise will take you through some of the steps to build this query while also working to practice query optimizations at each step.
Bu egzersiz
Introduction to BigQuery
kursunun bir parçasıdırUygulamalı interaktif egzersiz
Bu örnek kodu tamamlayarak bu egzersizi bitirin.
SELECT
p.payment_installments,
COUNT(p.order_id)
FROM ecommerce.ecomm_payments p
-- Add the join conditions
JOIN ecommerce.ecomm_order_details o ___ (___)
-- Group by the payment_installments column
GROUP BY p.___