Para coletarmos a versão do Oracle Apex usando SQL:
C:\Users\bruno>sqlplus /@RMANDB
SQL*Plus: Release 11.1.0.6.0 - Production on Sex Jan 22 12:59:04 2021
Copyright (c) 1982, 2007, Oracle. All rights reserved.
Conectado a:
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
SQL> SELECT * FROM apex_release;
VERSION_NO
--------------------------------------------------------------------------------
API_COMPATIBILITY
--------------------------------------------------------------------------------
PATCH_APPLIED
--------------------------------------------------------------------------------
19.1.0.00.15
2019.03.31
APPLIED
SQL>