शुरू करेंमुफ़्त में शुरू करें

Approximate statistical functions

GoogleSQL चार अलग-अलग approximate aggregate फंक्शन देता है जो बड़े डेटासेट पर बेहतर प्रदर्शन करते हैं: APPROX_COUNT_DISTINCT, APPROX_QUANTILES, APPROX_TOP_COUNT, APPROX_TOP_SUM. इस अभ्यास में आप हर फंक्शन के साथ वही क्वेरी चलाकर देखेंगें.

यह अभ्यास पाठ्यक्रम का हिस्सा है

BigQuery परिचय

पाठ्यक्रम देखें

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

-- Complete the query to approximate the number of customers that have ordered each product

SELECT
  items.product_id,
  -- Add the correct syntax for the approximate distinct count
  ___ AS estimated_unique_customers
FROM ecommerce.ecomm_orders o, UNNEST(o.order_items) items
JOIN ecommerce.ecomm_order_details od USING (order_id)
GROUP BY items.product_id;
कोड संपादित करें और चलाएँ