This message was deleted.
# general
s
This message was deleted.
d
I know how to model data that's "an event happened at time T" but not this.
j
This sounds like a semi-additive measure (measures that don't add up over time). In Imply's Pivot analytics query tool there is a function called PIVOT_NESTED_AGG() that handles this fairly elegantly ... But without that function all I can think of is to nest two aggregates, one within the other, e.g.
Copy code
select dim1, sum(avg_conn) avg_conn
  from (
        select dim1, dim2, avg(conn) avg_conn
          from table
         group by dim1, dim2
       )
 group by dim1
Let me know if that isn't what you are looking for. Thanks. John
s
this blog talks about how the PIVOT_NESTED_AGG function achieves this by issuing a nested query to Druid https://blog.hellmar-becker.de/2022/07/31/using-imply-pivot-with-druid-to-deduplicate-timeseries-data/
b
@Hellmar Becker ftw!