skip to Main Content

How to query PostgreSQL table for common elements in array column and aggregate results?

I have the following schema in PostgreSQL 12: CREATE TABLE test_aggregate( id_semilavorato text NOT NULL PRIMARY KEY, array_allestimenti text[] ); INSERT INTO test_aggregate VALUES ('A',ARRAY['IDA1','IDA2']); INSERT INTO test_aggregate VALUES ('B',ARRAY['IDA1']); INSERT INTO test_aggregate VALUES ('C',ARRAY['IDA2']); INSERT INTO test_aggregate VALUES ('D',ARRAY['IDA3']);…

VIEW QUESTION
Back To Top
Search