SELECT
usage_date,
cluster_id,
custom_tag,
SUM(cost) AS total_cost
FROM
system.billing.usage
WHERE
usage_date BETWEEN date_sub(CURRENT_DATE, 7) AND CURRENT_DATE -- For weekly timeframe
AND custom_tag[] IS NOT NULL
GROUP BY
usage_date,
cluster_id,
custom_tag
ORDER BY
usage_date,
cluster_id,
 
[PARSE_SYNTAX_ERROR] Syntax error at or near ']'. SQLSTATE: 42601 line 10, pos 15