Group By Date

Are there any recent developments on supporting group by date? Would be nice to do some analytical queries such as grouping by a time bucket such as hour, or day.

Thanks,
Nick

Nope, Group By works only on edges. You could have a structure that represents days, hours, and so on. This way you could have a grouping query.

How would you suggest to go about this? Our use case is user views of profiles. We create a Node each time a user views another profile. This is down to the second. Would I have to create a Day structure for a specific day that matches that timestamp, create it if it doesn’t exist and then make an edge to the view Node?

Exactly. You can use Upsert Block for this.

I don’t see a problem. You would group it by a range, not minutes, seconds or ms. So it is fine to use Upsert. The precision would come from the value edge, so you would use the relational edge to use group by feature.

1 Like

Awesome, we’ll give that a try. Thanks Michel!