This article explains how to calculate the percentage of national dataset coverage for a specific BPD field using Snowflake. It includes both a Cortex code prompt example and a sample SQL query.
Cortex Code Input:
Give me national coverage percentages for the following field [Field Name]
β
SQL:
SELECT
COUNT(CASE WHEN [Field Name] IS NOT NULL THEN 1 END) * 100.0 / COUNT(*) AS [Field Name]_coverage_pct
FROM
β****
