While playing around with pluggable databases in 12c a few years ago, I wondered what different versions of Apex could be deployed at the same time on different database versions. The idea being that having multiple versions of Apex running at the same time (and accessing the same data) would be a great help during application testing and upgrading.
Getting this info was not as simple as expected, so I thought I'd share my findings with you. So the list is "best effort" and it is not complete - I skipped Apex and database versions that are already antiques.
In the table above, "NOK?" indicates a combination of versions that might or might not be supported; the documentation is not always clear or consistent. To be safe, regard this as a "NOK".
Also note that a "NOK" doesn't mean the combination won't work; it might but it is not supported. For example, on two development servers I've had Apex 5.0.2 running on database 12.2.0.1.0 without problems.
Sources used:
https://mikedietrichde.com/2017/05/02/is-your-apex-version-certified-with-your-database-release/
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=355341795729425&id=1344948.1&_afrWindowMode=0&_adf.ctrl-state=d04kwub2_4