PR #21631's implementation causes issues with PostgreSQL and potentially
other stricter RDBMSes, indeed doing an ORDER BY using a function is not
supported.
In this fix we're computing the day of each user birthday and
employment day in the SELECT columns, and use those columns as a sorting
key.