Postgresql – Postgres 14 delete with count in where clause
I wanted to delete all records except the one with the highest value so I did CREATE TABLE code ( id SERIAL, name VARCHAR(255) NOT NULL , value int NOT NULL ); INSERT INTO code (name,value) VALUES ('name',1); INSERT INTO…