Skip to content

Tag: postgresql

UPDATE with RETURNING: Not able to retrieve ResultSet

I’ve tested the following UPDATE-RETURNING statement in my PostgreSQL client, and it correctly updates and returns the updated rows. However, in Java, I’m not able to retrieve the ResultSet. statement.execute() and statement.getMoreResults() always return false and statement.getResultSet() returns null, alway…

Postgresql: join readonly database with csv-file

The task is to join data from local cdv-file with data from remote database. On this database I have readonly writes. So I can’t create new tables in this db. Only recommended way (which I have found) to do this is to: 1. Create new table in db 2. Copy (import) content of csv-file in this new table. 3. …

Iterating multiple times over same table (postgres sql)

i am working with sql from few days as beginner and stuck at a problem! Problem: Given A table user_email_table which columns are (id, user_id, user_id_email) How to get all user co-related to each and every user extending himself user_email_table Desired Output Please Ignore validate data of email fields Thi…

How to group rows by the date part of a timestamp column?

There is a table having timestamp column : I want to get all rows and the sum of the duree_seconde column based on the date part of the connexion column ; that means I want to sum all the duree_seconde column values for each same day, for example if there are data like this : how can I get the