I have a requirement wherein i have 3 columns, Owning_stream, changeReq Number, Sate_id (proposed, awaiting approval etc). I am able to calculate the maximum of _time group by State_id. But i want to add one more column in the final result which displays the difference between maximum and minimum dates from previous column.
It's not clear to me what you seek, but perhaps this will help.
... | stats max(_time), range(_time) by State_id
The range function calculates the difference between the maximum and minimum values of the given field.