Highest Actual Peak by Provider & Year
General Explanation
What is this recipe?
This recipe is to analyze the highest max peak for each provider, by calendar year.
Use case
What is this recipe for?
This recipe is for users that want to analyze their highest demand usage for each provider territory.
Snowflake SQL
What’s the snowflake SQL for this recipe?
What does the SQL for this recipe mean?
demand max grouped by provider, by year
select provider_id
, any_value(provider_name) as provider_name
, year(period_end_date) as calendar_year
, max(standardized_measured_max_demand_usage_value) as highest_measured_max_demand
, any_value(standardized_measured_max_demand_usage_unit_of_measure) as unit_of_measure
from <YOUR_SNOWFLAKE_SHARE>.datahub_meters_by_statement_current
where standardized_measured_max_demand_usage_value is not null
group by provider_id, calendar_year
order by provider_name, calendar_year desc;
This query selects a few informative fields, provider_id
, provider_name
, the year of the period_end_date
, and the unit of measure.
The key part of this query is max(standardized_measured_max_demand_usage_value) as highest_measured_max_demand
and group by provider_id, calendar_year
, which together will select the highest max peak demand usage value for that provider for each calendar year. It then orders by provider_name
first, then calendar_year
second to show the change year over year for each provider.
Return format
What’s the return format and an explanation of each returned field?
PROVIDER_ID | PROVIDER_NAME | CALENDAR_YEAR | HIGHEST_MEASURED_MAX_DEMAND | UNIT_OF_MEASURE |
---|---|---|---|---|
1ECE16… | AEP Appalachian Power | 2023 | 133.642000 | kw |
1ECE89… | AEP Appalachian Power | 2022 | 93.0000 | kw |
Updated 7 months ago