ComeçarComece de graça

Logical aggregates

The last set of special aggregate functions you will use are the logical operators LOGICAL_AND and LOGICAL_OR. These provide an efficient way to find if any data set contains a true boolean. This helps when grouping by data to quickly see if all or one of those values is true. For example, this exercise will look at groups of data to see if they have been delivered or if at least one of the values has been delivered.

Este exercício faz parte do curso

Introduction to BigQuery

Ver curso

Exercício interativo prático

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

-- Complete the query using LOGICAL_AND

SELECT
  customer_id,
  -- Fill in the LOGICAL_AND function
  ___ as all_delivered
FROM ecommerce.ecomm_order_details
GROUP BY customer_id;
Editar e executar o código