0

I have a table listings which has a jsonb column mls_ids.

When I run

select jsonb_array_elements(mls_ids) as objects from listings where objects = '{}';

I receive this error:

ERROR:  column "objects" does not exist

I'm sure this is just basic SQL that I'm messing here but I haven't figured it out yet.

What I am trying to achieve in the query is return the rows that have an empty hash as an element in the array.

wuliwong
  • 4,238
  • 9
  • 41
  • 69

0 Answers0