Aggregation to get a Duration

Hi Folks,

I’m trying to get a duration for o set o time. Someone can help me? I have tried elapsed, but I don’t get a right output.

2018-11-20T04:02:28.105Z counter free 1
2018-11-20T04:03:28.104Z counter free 1
2018-11-20T04:04:28.104Z counter free 1
2018-11-20T04:05:28.104Z counter free 1
2018-11-20T04:06:28.105Z counter free 1
2018-11-20T04:07:28.105Z counter free 1
2018-11-20T04:08:28.104Z counter free 1
2018-11-20T04:09:28.105Z counter free 1
2018-11-20T04:10:28.105Z counter free 1
2018-11-20T04:11:28.104Z counter free 1
2018-11-20T04:12:28.104Z counter free 1
2018-11-20T04:13:28.105Z counter free 1
2018-11-20T04:14:28.105Z counter free 1
2018-11-20T04:15:28.105Z counter free 1
2018-11-20T04:16:28.105Z counter free 1
2018-11-20T04:17:28.104Z counter free 1

I’d like to get a duration grouped by status (in this case ‘free’).

Thanks,
Fabricio