1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to BigQuery

Connected

Exercise

Using STRING_AGG and ARRAY_CONCAT_AGG

As you recall, the special aggregates fall into three core groups. This exercise will walk through two queries focusing on string and array aggregations. We can explore these two functions using our orders and order_details data.

Instructions 1/2

undefined XP
  • 1

    Concatenate distinct values from the product_category_name_english column using the STRING_AGG function, and filter records using the ARRAY_LENGTH function in the WHERE clause.

  • 2
    • Concatenate the array data in the order_items column using the ARRAY_CONCAT_AGG function and aggregate the results by seller_id.