我正在尝试在Google BigQuery中查询多个产品范围的自定义维度。结果如下所示:
我想要在结果中获取合并的行,结果应该是这样的:
使用BigQuery的查询语句可以实现吗?
编辑
请查看我使用的现有查询语句:
![Current set of results](https://istack.dev59.com/LcNgU.webp)
![Expected set of results](https://istack.dev59.com/N9Yzp.webp)
SELECT IF(hits.product.customDimensions.index=21, hits.product.customDimensions.value, NULL) cd21,
IF(hits.product.customDimensions.index=22,
hits.product.customDimensions.value, NULL) cd22
FROM [<table_id>.ga_sessions_20160510]
WHERE hits.product.productListName LIKE "%test%"
AND hits.product.isImpression IS TRUE
AND hits.product.customDimensions.index IN (21,22)