說我有以下產品模式,它具有常用屬性(如標題等)以及數組中的變體。 我會如何按照價格從低到高排列產品? drop table if exists product;
create table product (
id int,
data jsonb
);
insert into product values (1, '
{
"product_id": 10000
提取元件通過使用jsonb_array_elements()函數提取出從Postgres的jsonb數據陣列,它給了錯誤: cannot extract elements from a scalar 我假定它是由於NULL在回電時,增加了NULL檢查條件但不起作用。任何幫助讚賞。 select id ,
CASE
WHEN report IS NULL OR
(re