diff --git a/dbt_jardiner/models/jardiner/intermediate/dset/int_dset_meter__readings_wide_hourly.sql b/dbt_jardiner/models/jardiner/intermediate/dset/int_dset_meter__readings_wide_hourly.sql index 503a9a5..e4b896b 100644 --- a/dbt_jardiner/models/jardiner/intermediate/dset/int_dset_meter__readings_wide_hourly.sql +++ b/dbt_jardiner/models/jardiner/intermediate/dset/int_dset_meter__readings_wide_hourly.sql @@ -13,7 +13,7 @@ with meter_readings_hourly as ( sum(meter_reactive_energy_q4) as meter_reactive_energy_q4, sum(meter_instant_exported_energy) as meter_instant_exported_energy from {{ ref("int_dset_meter__readings_wide") }} - group by plant_uuid, plant_name, ts - order by ts desc + group by date_trunc('hour', ts), plant_uuid, plant_name + order by date_trunc('hour', ts) desc ) select * from meter_readings_hourly