BaşlayınÜcretsiz Başlayın

ANY_VALUE

One of the new functions you learned that is specific to GoogleSQL is the ANY_VALUE aggregate that allows you to return a value from a text column. You can use this in combination with HAVING to find a maximum or minimum value. This allows us to have some flexibility to return a single value when aggregating across a large dataset.

Bu egzersiz

Introduction to BigQuery

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Complete the query by using the ANY_VALUE aggregate function on the product_category_name_english column, including the HAVING clause to find the maximum value of product_photos_qty, and assign the alias random_product to the result.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

-- Finish the query below by adding the ANY_VALUE function

SELECT
  product_weight_g,
    -- Complete the query by adding the ANY_VALUE function on the product category column
	___
FROM ecommerce.ecomm_products
GROUP BY product_weight_g;
Kodu Düzenle ve Çalıştır