Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
86 views

I have two tables: my_temp: employee_id date start_granula end_granula count_seconds 2223eb0f0d0x 2025-08-22 07:40:00 07:50:00 625 2223eb0f0d0x 2025-08-22 08:10:00 08:20:00 513 2223eb0f0d0x 2025-08-22 ...
Татьяна Задорожняя's user avatar
1 vote
1 answer
52 views

I have this query: SELECT organisation_id, count((j->>'invoiceId')) AS count, sum((j->>'advanceAmount')::numeric(20,4)) AS sum FROM runs LEFT JOIN jsonb_array_elements(...
Pedro Borges's user avatar
  • 1,791
1 vote
2 answers
168 views

I want to know if json array contains a particular element or not. I am trying the below query for getting the result. But it is not working as expected. with cte as ( select jsonb_array_elements(...
Madhu's user avatar
  • 49
1 vote
2 answers
70 views

In our DB we have tables, that have 6-8 M records, this data is static and in order of performance optimization we decided to store some data from this tables in separate table, and for predefined ...
Юрий Яхница's user avatar
0 votes
1 answer
540 views

Here is a sample of the data that I am working with: id | col1 | col2 1 | Name1 | {'spec_details': {'spec_values': [{'name':'A','value':2}, {'name': 'B', 'value': 5}, {'name': 'C', '...
Phoenix's user avatar
  • 425
0 votes
0 answers
33 views

Good day please, help with this. I have table "tickets" with column printer_catalog: records from 1st row of column printer_catalog {"Refueling::HP 1005 (65gr)::2 pcs","...
Jonibek's user avatar
  • 98
2 votes
1 answer
165 views

I have a database table(call it table) with jsonb column(lets say column). Column contains bellow data: { "country": "GB", "channel": "mobile", "...
ChlnooL's user avatar
  • 55
0 votes
1 answer
39 views

I have users table which has a cart column of type jsonb array, for example: [{"product_id": 1, "qty": 2}, {"product_id": 2, "qty": 3}] and products table ...
Pugalarasan's user avatar
0 votes
1 answer
58 views

I have this table: CREATE TABLE driver_orders ( id SERIAL PRIMARY KEY, driver_id INTEGER NOT NULL, seats JSONB NOT NULL ) I store this value in that table: id driver_id seats 1 10029 [{"id&...
ABDULLOKH MUKHAMMADJONOV's user avatar
0 votes
3 answers
417 views

In a table called temporay_data with a data field called temporary_data too, filled with this JSON structure { "FormPayment": { "student": [ { &...
Rudinei Pereira Dias's user avatar
0 votes
1 answer
76 views

I have a metadata column in my sequelize Notifications model metadata: { type: DataTypes.ARRAY(DataTypes.JSONB) } I want to do a bulkInsert for the notifications table using a seeder file but each ...
Austin's user avatar
  • 434
1 vote
2 answers
132 views

I have a jsonb column in the following format: { "targets": { "01d7de90-57fd-4c4f-b7c9-3b956762fe25": { "id": "01d7de90-57fd-4c4f-b7c9-3b956762fe25",...
Nikowhy's user avatar
  • 151
0 votes
1 answer
47 views

I have a column "data" with datatype json that may be empty { } or may contain some keys already: { "category": "alpha", "verified": true } I want to have a ...
user21823446's user avatar
0 votes
1 answer
2k views

I have a table in postgres called day, which contains a jsonb column called plan_activities. I have a day record with day.id = 18 and plan_activities contains the following JSON: [ { "...
Schoxy's user avatar
  • 1
0 votes
1 answer
96 views

I have two tables like these in postgres db : TABLE tag ( id number, name nvarchar ); TABLE article ( id number, tags jsonb // List<String> list of **name**s of tags from tag ...
Fahimeh Rahmatipoor's user avatar
0 votes
1 answer
219 views

CREATE OR REPLACE FUNCTION update() RETURNS TRIGGER LANGUAGE PLPGSQL AS $$ BEGIN with name_array as (select jsonb_array_elements(inputs #> '{lists}') AS lists from random.model ...
Luke's user avatar
  • 1
1 vote
2 answers
406 views

I have a table which stores timestamps but they're in a jsonb array column like this: id cycles 5 [{"end": "2022-10-18T18:31:34.529667Z", "start": "2022-10-05T19:01:...
Luis Enrique Garduno Morales's user avatar
1 vote
0 answers
46 views

I have a postgresql table named events Name Data Type id character varying idx integer module character varying method character varying idx integer block_height integer data jsonb where data is like [...
Bruce's user avatar
  • 11
0 votes
2 answers
574 views

I have a two part question We have a PostgreSQL table with a jsonb column. The values in jsonb are valid jsons, but they are such that for some rows a node would come in as an array whereas for ...
adbdkb's user avatar
  • 2,259
0 votes
1 answer
442 views

I have the following jsonb column in my table requests called tasks +------------------------------------------------------------------------------------------------------------------------------------...
Kingsley Simon's user avatar
1 vote
2 answers
1k views

I have a jsonb column such that: | id | fee | |----------|----------------------------------------| | 1 | "[{"Step": "step1", &...
Gautam's user avatar
  • 238
0 votes
1 answer
226 views

How to extract data from a jsonb column Data Table Id Result 1001 {"Green": {"value": "250.3", "reading": "250.3"}, "MbSampleType": {"...
Satish's user avatar
  • 5
1 vote
2 answers
181 views

I'm new to JSONB and I am wondering, if the following would be possible with a single query: I have a lot of tables that look like this: ID (INT) | members (JSONB) all the tables has only one row. ...
Tzach's user avatar
  • 13
0 votes
1 answer
956 views

I have jsonb-array: element_values := '[ { "element_id": "a7993f3d-9256-4354-a147-5b9d18d7812b", "value": true }, { "element_id": "...
Prosto_Oleg's user avatar
1 vote
2 answers
159 views

I have a JSON node on which I have to write a PSQL query, My table schema name(String),tagValues(jsonb). Example tagValue data is given below Name_TagsTable uid | name(String)| ...
Tarun Annapareddy's user avatar
0 votes
1 answer
156 views

How to add an element in a jsonarray object stored in a dict to a specific key and row of this postresql table with psycopg2 python lib : To illustrate, go from this : | json_column ...
Théo Cany's user avatar
0 votes
1 answer
144 views

I have a jsonb object like this: { "applicants": [ { "last_name": "ss", "first_name": "ss", "age": 31 }, { ...
fractal5's user avatar
  • 2,172