2

Related to this and this questions, having the following table, I would like to select just one row per minute:

table

I have tried this expression, unsuccessfully:

time = array_min (array_agg ( time, group_by:=ele))

How should I tweak it in order to just get one row per minute, as in here?

11/7/23 01:47:XX
11/7/23 01:48:XX
11/7/23 01:49:XX

(Note that the seconds are not important, they can be anything between 00 and 59).

1 Answer 1

3

I have a datetime field named time.

This will select first occurrence of each minute (each year.month.day_hour.minute),

ordered by time. Change "time" to the name of your datetime field.

array_first(array:=
array_agg(expression:=$id, group_by:=format_date( "time", 'yy.MM.dd_hh.mm'), order_by:="time"))=$id

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.