-- Creating table that has a column to hold arrays CREATE TABLE grades ( student_id int, email text[][], test_scores int[] ); -- Insering array values in the table INSERT INTO grades VALUES (1, '{{"work","work1@datacamp.com"},{"other","other1@datacamp.com"}}', '{92,85,96,88}' ); -- Querying array SELECT email[2][1] as type, email[2][2] as address, test_scores[1] FROM grades -- NOTICE : ANY (email) = 'other' is not the right syntax, it should be 'other' = ANY (email) WHERE 'other' = ANY (email); -- Alternative: WHERE email @> ARRAY['other'];