Category "postgresql"

Distinct and List of other column in postgresql

I am using postgres DB and i have table with two column name and sal . name Sal Raunak 10000 Raunak 5000 Rahul 500 Raunak 300

Using SELECT DISTINCT to retrieve nearly identical array values in PGSQL

In an app that I am currently developing users are allowed to locations identified, amongst other things by their latitude/longitude coordinates. The location e

Express JS TypeError: Cannot read properties of undefined (reading 'id')

I am trying to build a database query with express js to get a recipe from a table that joins a recipe's information with specific ingredients from a third tabl

Consume kafka topic JSON data to postgres using JDBC connector

We have a need to push the kafka topic JSON records to postGresSql database. the JSON are compliant to https://json-schema.org/draft-07/json-schema-release-note

How to connect to postgres on another server where postgres is on docker?

I can connect to postgres in that way. On my local machine i run: ssh name@ip -p 22 input --> password and then sudo docker-compose exec postgres bash afte

How to get the top 1% of soloists calculated by the total number of concerts performed

I'm working on this sql challenge, but I don't know if the way to get the top 1% of soloists calculated by the total number of concerts performed. is correct. P

Found non-empty schema(s) "public" but no schema history table. Use baseline() or set baselineOnMigrate to true to initialize the schema history table

I know this has been asked previously but I am spinning in circles here.... I have a postgres 14 database and a Springboot application running flyway-db:7.13.0

How to repeat event for every 2 weeks on multi selection days up to 3 Occurrence's

I'm working on a google calendar kind of repeat feature using angularjs/php. Trying repeat the event for every 2 weeks on multi selection of days and that even

How to create Liquibase changeset for below Postgres index creation statement - concat 2 columns in index

create index if not exists employee_index on employee(emp_id, (emp_first_name|| ' ' ||emp_last_name)); I'm able to use the above statement in Postgres, I w

In a Postgres function, how to return the result of a query that is stored in a table?

Initially let me explain the whole situation. The database is Postgres 13. I need a "dynamic selection" In the first place... The tables I work with have many c

Why doesn't AWS DMS successfully migrate GMT/BST timestamps from and to RDS PostgreSQL databases?

I'm using AWS DMS 3.4.6 to migrate a PostgreSQL 13.6 database to another PostgreSQL 13.6 database, both in AWS RDS. One particular column in my database is a ti

SQL Optimization: multiplication of two calculated field generated by window functions

Given two time-series tables tbl1(time, b_value) and tbl2(time, u_value). https://www.db-fiddle.com/f/4qkFJZLkZ3BK2tgN4ycCsj/1 Suppose we want to find the last

Does it matter to filter results when doing aggregation?

I want to get my sales for each day which is located in my orders_summary table. orders_summary table columns: id, date, amount, sku_id products table columns:

cannot connect to Postgres - password unknown

I can't connect on postgresql. when i go on pgadmin>server>postgresql, it asked me "please enter the password for the user 'postgres' to connect the serve

How to determine the total freespce of the db PostgreSQL

How to identify the total size of the db (Used) and the total size of the db. for the total size of the db (Used) : pg_database_size('dbName') cmmnd works. But

Update all affected rows with specific values on PostgreSQL

I have the simplified version of the table I have below. Each row has an item_order value partitioned by its parent_id. item_id item_name parent_id item_order

PostgreSQL Crosstab Query

Does any one know how to create crosstab queries in PostgreSQL? For example I have the following table: Section Status Count A Active 1 A

Find booking Id between 2 dates SQL (Postgresql)

I have table booking with below records. event_type | from_date | to_date -------------+---------------------+--------------------- party

Right way to save timestamps to database in laravel?

As part of a standard laravel application with a vuejs and axios front-end, when I try to save an ISO8601 value to the action_at field, I get an exception. clas

Window function based on transition of a column value

I have response query like below dest emp 893106 0 717205 1 888305 0 312301 1 645100 0 222001 0 761104 1 And I want to get window function to separate rows li