# Orgs Over Threshold

Use this template when the user asks "List orgs with more than N Starter clusters". Default threshold is `100`; default plan is `Starter`. See SKILL.md for shared rules.

For non-Starter thresholds, confirm the target service plan before changing the filter — `Starter` is the common ask.

```sql
SELECT
  CAST(tenant_id AS STRING) AS tenant_id,
  ANY_VALUE(tenant_alias) AS tenant_alias,
  ANY_VALUE(tenant_name) AS tenant_name,
  ANY_VALUE(tenant_region) AS tenant_region,
  ANY_VALUE(tenant_internal_user) AS tenant_internal_user,
  COUNT(*) AS starter_cluster_count
FROM `gcp-digital-bi.model_tidbcloud.dws_cloud_all_clusters_component_detail_basic_info`
WHERE cluster_service_plan = 'Starter'
  AND cluster_deleted_time IS NULL
GROUP BY CAST(tenant_id AS STRING)
HAVING starter_cluster_count > <threshold_from_user>
ORDER BY starter_cluster_count DESC;
```

Reporting tip: surface `tenant_internal_user` so reviewers can separate internal load from external customer load.
