Skip to content
Advertisement

Tag: arrays

How to select size of json array in postgres?

I’ve been fighting this for a long time, but I am not able to construct a query, which would select (and preferably also order by) a count of items in an array. I do have table data like this: And what did I try… also But it sais I’ve tried a lot of different formats but coming from the MS

Split array(bigint) to multiple rows of bigint

I’m querying some data (SQL, presto), each item can be the parent or child of another. The parent IDs and the child IDs are stored in the row for that primary ID as an array(bigint). Each task could be the child of multiple parents. It looks something like: I want a list of all of the parent Ids and each

Advertisement