I don't really sure what the proper terms in english for my question.
state | date
=============
'a' | 2020-01-01
'a' | 2020-01-02
'b' | 2020-01-03
'b' | 2020-01-04
'a' | 2020-01-05
'a' | 2020-01-06
The desired output is:
state | min_date | max_date
================================
'a' | 2020-01-01 | 2020-01-02
'b' | 2020-01-03 | 2020-01-04
'a' | 2020-01-05 | 2020-01-06
I don't really know even how do it (without a loop).
Help please?