Good day to all of you, I would to raise this questions on my query.This issues occurs when using decrypt functionalities with group by functionalities.
SELECT decrypt(a.email_address, 'secret', 'aes') AS email_address,
decrypt(atx.account_description, 'secret', 'aes') AS account_description,
a.account_id, a.account_type_id
FROM account_type AS atx
INNER JOIN accounts AS a ON atx.account_type_id=a.account_type_id
GROUP BY email_address
Table Fields Are :
Account_type <- table names
account_type_id - INT
account_description - BYTEA
Accounts <- table names
account_id - INT
account_type_id - INT
email_address - BYTEA
ERRORS shows this file
ERROR: column "atx.account_description" must appear in the GROUP BY clause or be used in an aggregate function
LINE 1: SELECT decrypt(atx.account_description, 'secret', 'aes') AS ...
Did i do something wrong on the GROUP BY?Please advised.
But when you query something like this on MYSQL no problem encounter.As for the postgres is way to strict.I'm sorry i'm still newbie on postgres.This is the first time i'm using postgres on our new system.