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 188.8.131.52.0 without problems.