## sighup (r...@sighup.eu):
> How can I extract the value of the 'items' key either as two rows and or
> a sum of both.
select id, jsonb_array_elements(markers)->>'items' from data;
And as jsonb_array_elements() returns a setof jsonb:
with tab(id, items) as (
select id, (jsonb_array_elements(m
On 13/04/2016 11:53, Vitaly Burovoy wrote:
On 4/13/16, Vitaly Burovoy wrote:
On 4/13/16, sighup wrote:
Hi, please excuse either my stupidity or naivety regarding this but I'm
a bit confused. Give the following basic table structure :
TABLE Data (
ID INT NOT NULL,
Markers json
On 4/13/16, Vitaly Burovoy wrote:
> On 4/13/16, sighup wrote:
>> Hi, please excuse either my stupidity or naivety regarding this but I'm
>> a bit confused. Give the following basic table structure :
>>
>> TABLE Data (
>> ID INT NOT NULL,
>> Markers jsonb NOT NULL
>> );
>>
>> And the fol
On 4/13/16, sighup wrote:
> Hi, please excuse either my stupidity or naivety regarding this but I'm
> a bit confused. Give the following basic table structure :
>
> TABLE Data (
> ID INT NOT NULL,
> Markers jsonb NOT NULL
> );
>
> And the following data:
>
> INSERT INTO Data (ID, Marke