You seem to be using a reference for T-SQL or JET Red SQL (for MS SQL Server and MS Access respectively) when you're actually using PostgreSQL which uses completely different functions (and syntax) for string/text processing.
This is the PostgreSQL v12 manual page for string functions and other syntax. You should read it.
As for making your query run on PostgreSQL, change it to this:
Convert account_no to a varchar type so you can use SUBSTRING with it.
- I think it might work without it, but I don't like relying on implicit conversion, especially when localization/locale/culture issues might pop-up.
The LEFT and RIGHT functions for extracting substrings can be reimplemented like so:
LEFT( text, length ) == SUBSTRING( text FROM 0 FOR length )
RIGHT( text, length ) == SUBSTRING( text FROM CHAR_LENGTH( text ) - length )
And use || to concatenate text values together.
Like so:
SELECT
q.*,
(
SUBSTRING( q.account_no_text FROM CHAR_LENGTH( q.account_no_text ) - 4 )
||
SUBSTRING( q.customer_id FROM CHAR_LENGTH( q.customer_id ) - 5 )
) AS "password for my diplomo"
FROM
(
SELECT
ai.*,
ai.account_no::varchar(10) AS account_no_text
FROM
account_info AS ai
)
AS q
Here is a runnable DB-Fiddle.
Screenshot proof:

as password for my diplomowhat?left()function