To apply the ORDER BY or GROUP BY clauses to json data, you must use the ->> operator to cast the result to a string. We could add an example to https://www.cockroachlabs.com/docs/v2.1/jsonb.html.
This came up on the forum: https://forum.cockroachlabs.com/t/order-by-and-group-by-clauses-on-jsonb-data/2211
@Amruta-Ranade, Can I give it a try? :-)
Thanks.
Go for it!
@Amruta-Ranade I have created a PR, #8679 for this issue. Could you please look into it and let me know the further steps?
Thanks,
Shiwanee :-)
Hi @Amruta-Ranade ! I have implemented the review comments!
Thanks,
Shiwanee
Addressed in https://github.com/cockroachdb/docs/pull/8679
Thank you so much @Amruta-Ranade and @ericharmeling :-)
Shiwanee
Thanks for your contribution, @Shiwanee !