将每个日期的数据分配给两个类别时,按日期按日期按日期进行分组
我正在研究一个类似于 this 和在那里发布的答案帮助我弄清楚了如何解决自己的问题。
我遇到的其他问题是 - 如果我希望以以下格式输出我的查询,该如何修改查询? :(
{"label": "2020-08-21", "value": 5, "A": 2, "Others": 3}
例如输出{“ label”:“ 2020-08-21”,“ value”:7,印度:3,其他:4})
提前谢谢! :)
I am working on a problem similar to this and the answer posted there helped me figure out how I can work with my problem.
Additional question I have is - how can I modify my query if I want my output in the following format? :
{"label": "2020-08-21", "value": 5, "A": 2, "Others": 3}
(example output {"label": "2020-08-21", "value": 7, India: 3, Others: 4})
Thank you in advance!! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在这种情况下,您可以简单地分组:
Playground示例
In this case you can simply group:
Playground example