APIJSON
APIJSON copied to clipboard
使用apijion实现先jion后分组的问题咨询
问题:打算使用apijson来实现SQL:select table2.team,sum(hours) from table1 inner join table2 on table2.id = table1.father_id group by table2.team; ,但是构建的request一直满足不了预期,特此咨询您一下。
构建的apijson的请求格式: { "[]": { "join":"&/table1/id@", "table2": { "@column": "sum(hours):total" }, "table1": { "id@": "/table2/father_id", "@column": "team", --------这里添加了一个jion后展示的列,但是返回结果一直没有team只有sum(hours)? "@group": "team" } } }
返回结果(没有team展示出来,我请求参数哪里有问题?请多指教,多谢啦): "[]": [ { "table1": { "total": 75 } }, { "table1": { "total": 40 } }, { "table1": { "total": 30 } } ]
https://github.com/Tencent/APIJSON/issues/245