9 lines
272 B
SQL
9 lines
272 B
SQL
-- dbt Gold Regulatory Compliance Mart
|
|
SELECT
|
|
permit_type,
|
|
status,
|
|
COUNT(permit_id) AS total_permits,
|
|
COUNT(DISTINCT company_name) AS unique_companies,
|
|
CURRENT_TIMESTAMP AS mart_refreshed_at
|
|
FROM {{ ref('silver_permits_enriched') }}
|
|
GROUP BY permit_type, status |