error create dimension Query execution failed: - Scalar subquery produced more than one element

Hello, please I want to create a dimension that contains all the products that were purchased last year. I have error :

The Google BigQuery Standard SQL database encountered an error while running this query.

Query execution failed: - Scalar subquery produced more than one element

dimension: P_comparable {
    type: string
    sql: (SELECT ${products} FROM ods.magasin WHERE ${buy_date} between '2019-01-01' AND '2019-12-31');;
  }

0 1 2,748
1 REPLY 1
Top Labels in this Space
Top Solution Authors