Category "postgresql"

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

AWS DMS Error - Unable to use plugins to establish logical replication on source PostgreSQL instance

I'm getting this error trying to replicate a postgre database (not RDS) to another postgre database (also not RDS). I get this connection error but the endpoint

How to use custom schema which is created by us in postgresql rds as target instead of public schema in aws glue job?

I need to move table from aws data catalog to the schema which i created in aurora postgresql instance. I tried this using glue job. I have created connection f

Hibernate - Map View to Entity - view is not mapped [SELECT la FROM ListAgent la]

In an effort to power an autocomplete, I resolved to map a PostgreSQL view. I followed a tutorial for this. It seems that it does not work at all : I've always

Syntax error when trying to insert record into posgtresql using pg8000 driver

When I am trying to insert a record into Postgresql I am getting below error. pg8000.exceptions.DatabaseError: {'S': 'ERROR', 'V': 'ERROR', 'C': '42601', 'M':

sequelize migration throws ERROR: function uuid_generate_v4() does not exist

I enabled uuid extension with CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; Then ran same query generated by sequelize for migration and it worked, create table i

Azure Postgres & Query Performance Insight: Query text not showing

I have enabled Query Performance Insights, however, the Query Text fields are left empty, as you can see from the screenshot below. I have enabled the Query St

mismatched input 'as'. Expecting: ',', <expression>

My query in PRESTO returns this error Query failed (#20220506_153121_03035_vycq3): line 6:41: mismatched input 'as'. Expecting: ',', I don't know why, anybod

How should I optimize the order by index

1.select * from transactions where from_account_id = 51118 order by block_number, index desc limit 20; Limit (cost=295.39..4973.89 rows=20 width=605) ->

Postgres SQL Query to total column with multiple filters

I have a Postgres table that contains a date and status field. I want to create a query that will return the date, plus the total number of records and then th

Inconsistency between postgres and hibernate

Inconsistency between hibernate and postres. Consider we have table student having 2 columns id(Primary Key) and name. Perform the following concurrent query on

Trying to use nominal typing for id in typeorm typescript

I was following this article TypeORM Best Practices using Typescript and NestJS at Libeo. I got to the point of using nominal typing in our entity ID @PrimaryG

Django constraints when removing columns in manual migrations

Django silently removes constraints when removing columns, then arbitrarily chooses to include them in migrations. I've encountered an odd bug(?) in Django in o