I have a file in json, but I have trouble separating the dates in the year-month, for instance, I have in SQL (AWS)
SELECT json_extract_scalar(json, '$.date') Date
FROM table_json
Input:
Date
------------------------
2016-03-08T01:28:57.546Z
2016-03-07T05:03:58.455Z
....
2016-04-07T05:03:58.455Z
2016-04-07T05:03:58.455Z
2016-04-08T05:03:58.455Z
2016-05-07T05:03:58.455Z
...
and I want to have something like
Date
--------
2016-03
2016-04
2016-05
....