Skip to content

Tag: json

How to deal with JSON column while using GROUP BY

I’m using a query similar to the below one, address is JSON TYPE. But getting below error: I’m trying to get the data of a person who has the max salary for his age and I need to include adress filed which should be JSON So, Is the there any way to achieve this or is this practically possible ?

Postgres Nested JSONB Query

I have a JSONB column, data, in the orders table: I’m trying to select “orders where discount_codes contain a code in codes_array”. I could not figure out how to write this query exactly. I read about the [*] operator but am unsure how to use it in this context. This only searches the first …