Skip to main content
0 votes
2 answers
77 views

I have a trigger to update a field when there is an update performed on a table. But the trigger updates all the records in the table instead of specific records. Trigger create or replace trigger ...
Jim Macaulay's user avatar
  • 5,251
1 vote
1 answer
155 views

I have two owners in my postgresql database e.g. testdb, I have some tables of owner1 and some tables of owner2. I am facing issue in setting replica identity full for tables of owner1 using owner2 ...
Neeraj Kumar's user avatar
-1 votes
1 answer
32 views

I am using postgres database, i am working with fastapi code where i want to find the data from database using the tags given. The tags column is json type and input will be the python list. I take ...
Karan N's user avatar
0 votes
1 answer
36 views

How can I extract an SQL query from a string that has leading comments and return the query along with any comments after the query, while ignoring any comments before the query. Example : Input: I) \...
Raj's user avatar
  • 1
0 votes
2 answers
958 views

I'm creating a statistic reporting tool and facing an issue related to memory due to a high query result (application server not responding due to RAM is full). I can't restrict the query result by ...
Prasanna Kumar J's user avatar
0 votes
1 answer
161 views

I have created a table where I have given 10 entries of employee details as below: I used the below few queries to fetch the 10th highest salary of the employee: 1). SELECT * from ( select emp_id, ...
Sonal Bhattacharya's user avatar
1 vote
3 answers
167 views

I have troubles creating certain aggregations. I'm using this table in Postgres: CREATE TABLE public.courier ( sender_app_type character varying(255), customer_id integer, from_id integer, to_id ...
Julio's user avatar
  • 543
1 vote
1 answer
366 views

I'm currently trying to figure out a way to restart all of my sequences (40 in total) to 2. But i don't have a single clue on how to do it. I have this command to change a single sequence back to 2, ...
Italo P.'s user avatar
0 votes
1 answer
44 views

I have a table: client_id order_id items_current_order items_next_order 905562 4254677 {1, 2, 4} {1} 905562 4254645 {1, 2, 5, 6} {1, 6} I need to count the proportion of items from the ...
il il's user avatar
  • 25
-1 votes
1 answer
64 views

I need small help, Below is query through which I am fetching the data after filename and I am getting it but there is scenario where in some cases we don't have '/' after filename so I am planning to ...
Ram's user avatar
  • 287
0 votes
1 answer
119 views

Just general question, can anyone pls help how to perform left join on union data. I have query where I am doing union of data(using table1 and table2) based on few conditions now I need to perform ...
Ram's user avatar
  • 287
1 vote
2 answers
77 views

I have created scenario in fiddle where I have to remove duplicate records and keep only 1 record example : for spotted table mfg_lz.icc_axbi_kanban_job there are 2 records so need to remove ...
Ram's user avatar
  • 287
0 votes
1 answer
77 views

Trying to run sql : https://dbfiddle.uk/VlKz_7fg When I am running sql on fiddle its working fine, however when I am trying to run the same on my database it is throwing - ERROR: invalid regular ...
Ram's user avatar
  • 287
1 vote
1 answer
231 views

Need to fetch tablename from input using sql query.I know this can be done through regex but not sure how hence any help appreciated Input: Field1 field2 a INSERT INTO test.table2{ name, age, city, id}...
Ram's user avatar
  • 287
0 votes
0 answers
91 views

Azure DB for Postgres flexible server I have Azure DB for Postgres flexible server. I have created a database in this server with en_US.utf8 collation. In this database I have created a table with ...
P Suresh's user avatar

15 30 50 per page
1
2 3 4 5
81