Postgres SQL 构建json对象
作者:
杰克_王_ | 来源:发表于
2022-12-04 09:32 被阅读0次select jsonb_agg(data)
from (
select jsonb_build_object(
'MobileOperator', MobileOperator,
'MobileQCellCore', MobileQCellCore,
'data', jsonb_agg(jsonb_build_object('UpdateTime', UpdateTime, 'Parvalue', Parvalue,'ProductState', ProductState) order by UpdateTime)) as data
from ods_tsc_product_info
where merchantid = 'xxxxxxxx' and productcategory = 'xxxxxxxx'
group by MobileOperator, MobileQCellCore
) temp
本文标题:Postgres SQL 构建json对象
本文链接:https://www.haomeiwen.com/subject/ztfvfdtx.html
网友评论