{#- Hello-world gold table — replaced by /plan + /build-next -#}
CREATE OR REFRESH LIVE TABLE {{ catalog }}.default.gold_customer_summary
COMMENT "Sample gold: customer summary metrics"
TBLPROPERTIES ("quality" = "gold")
AS SELECT
  COUNT(*) AS total_customers,
  ROUND(AVG(balance), 2) AS avg_balance,
  ROUND(AVG(risk_score), 3) AS avg_risk_score,
  ROUND(AVG(age), 1) AS avg_age,
  MIN(signup_date) AS earliest_signup,
  MAX(signup_date) AS latest_signup,
  current_timestamp() AS _last_updated
FROM {{ catalog }}.default.silver_customers;
