Skip to content

Commit

Permalink
fix: groupby on datetrunc on meter wide, not ts (et/somenergia-jardin…
Browse files Browse the repository at this point in the history
…er!128)

Merge branch 'fix/wide-meter-groupby' into 'main'
  • Loading branch information
polmonso committed Feb 27, 2024
2 parents 4de4347 + aa915d1 commit 4d6dec2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4d6dec2

Please sign in to comment.