Skip to content

Tag: arrays

Presto – How to convert a field with map to rows

I’m new to Presto SQL and I am stuck to a issue and I really need your help. I have a table with a field “Info”: I want to pull all order_id(s) and convert them as rows, the output may look like this: My query: I tried the query above but it can only returns the order_id as an array.

Nested array in a SQL query

I’m fairly new to programming and I’m struggling with an SQL Query. I want, that the purchased articles (article_id) are grouped in an array, so they are connected to the date column. For a further process, they might be combined ( so date x is combined with articles_id [A,B,C]) To make it clearer…

Repeating JSON Aggregated Array with Row Limits

I have an Oracle 19 database with a JSON aggregated array which I need to cut off and repeat after a set number of rows, for example: …etc. Here’s some basic SQL to illustrate how my current dataset is put together: I need to push customer data to an API endpoint. Pushing 1 customer record at a ti…