I could not make coalesce in the top level select to work even though
people on the internet say it should work. I'll do the sub select that
seems like it would work fine.
On Sat, Sep 10, 2016 at 3:22 AM, Karl Czajkowski wrote:
> On Sep 10, Tim Uckun modulated:
> > I am trying to get the child e
On Sep 10, Tim Uckun modulated:
> I am trying to get the child elements of a one to many table to be
> rolled up into a json field in the parent table. The query I am running
> is...
The problem is aggregating over the results of the left-outer join,
which introduces NULLs. You can try pushing tha
On Fri, Sep 9, 2016 at 8:30 AM, Tim Uckun wrote:
> I am trying to get the child elements of a one to many table to be rolled up
> into a json field in the parent table. The query I am running is
>
> select
> ob.id
> ,case when array_position(array_agg(im.image_type), null) = 1 then
> '[]