Skip to main content

Retrieving BPD Coverage by Field

Learn how to calculate national BPD field coverage percentages using Snowflake, including the AI prompt and SQL query example.

Updated this week

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
​****

Did this answer your question?