I have a table named tb_log
, in it I have some data id
, usuario_id
, produto_id
, ..., data
.
I need to group records by date as follows: All records that have a time difference of up to 10 minutes.
That is, if the first and second have a difference of 10 minutes, group, if the third has a 10-minute difference with the first or second, it enters the same grouping.