【发布时间】:2015-06-01 02:07:53
【问题描述】:
我有桌子。
订单表:
id: integer
items: jsonb
物品表:
id: integer
title: string
price: integer
示例订单记录
id: 1,
items: {
"1"=>{"qty"=>3},
"3"=>{"qty"=>12}
}
示例项目记录
id:1, title: "Tesla model S"
id:2, title: "Tesla model W"
id:3, title: "Tesla model D"
请帮助获得结果:
id:1, title: "Tesla model S", qty: 3
id:3, title: "Tesla model D", qty: 12
【问题讨论】:
标签: postgresql join